summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'MLEB/Translate/.phan')
-rw-r--r--MLEB/Translate/.phan/config.php59
-rw-r--r--MLEB/Translate/.phan/stubs/languagedetector.php56
-rw-r--r--MLEB/Translate/.phan/stubs/metayaml.php42
-rw-r--r--MLEB/Translate/.phan/stubs/namespaces.php12
-rw-r--r--MLEB/Translate/.phan/stubs/phplot.php114
-rw-r--r--MLEB/Translate/.phan/stubs/spyc.php18
6 files changed, 301 insertions, 0 deletions
diff --git a/MLEB/Translate/.phan/config.php b/MLEB/Translate/.phan/config.php
new file mode 100644
index 00000000..247d9d4b
--- /dev/null
+++ b/MLEB/Translate/.phan/config.php
@@ -0,0 +1,59 @@
+<?php
+
+$cfg = require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config.php';
+
+// These are too spammy for now. TODO enable
+$cfg['null_casts_as_any_type'] = true;
+$cfg['scalar_implicit_cast'] = true;
+
+$cfg['file_list'] = array_merge(
+ $cfg['file_list'],
+ [
+ 'Message.php',
+ 'MessageCollection.php',
+ 'MessageGroupConfigurationParser.php',
+ 'MessageGroups.php',
+ 'MessageValidator.php',
+ 'MetaYamlSchemaExtender.php',
+ 'TranslateEditAddons.php',
+ 'TranslateHooks.php',
+ 'TranslateUtils.php',
+ ]
+);
+
+$cfg['directory_list'] = array_merge(
+ $cfg['directory_list'],
+ [
+ 'api',
+ 'ffs',
+ 'insertables',
+ 'messagegroups',
+ 'scripts',
+ 'specials',
+ 'stash',
+ 'stringmangler',
+ 'tag',
+ 'translationaids',
+ 'ttmserver',
+ 'utils',
+ 'webservices',
+ '../../extensions/AbuseFilter',
+ '../../extensions/AdminLinks',
+ '../../extensions/cldr',
+ '../../extensions/Elastica',
+ '../../extensions/TranslationNotifications',
+ ]
+);
+
+$cfg['exclude_analysis_directory_list'] = array_merge(
+ $cfg['exclude_analysis_directory_list'],
+ [
+ '../../extensions/AbuseFilter',
+ '../../extensions/AdminLinks',
+ '../../extensions/cldr',
+ '../../extensions/Elastica',
+ '../../extensions/TranslationNotifications',
+ ]
+);
+
+return $cfg;
diff --git a/MLEB/Translate/.phan/stubs/languagedetector.php b/MLEB/Translate/.phan/stubs/languagedetector.php
new file mode 100644
index 00000000..480fb992
--- /dev/null
+++ b/MLEB/Translate/.phan/stubs/languagedetector.php
@@ -0,0 +1,56 @@
+<?php
+
+/**
+ * stub for crodas/LanguageDetector
+ * @phpcs:disable MediaWiki.Files.ClassMatchesFilename
+ */
+
+namespace LanguageDetector;
+
+class Learn {
+
+ public function __construct( Config $config ) {
+ }
+
+ /**
+ * @param callable $callback
+ * return self
+ */
+ public function addStepCallback( $callback ) {
+ }
+
+ /**
+ * @param string $label
+ * @param string $text
+ */
+ public function addSample( $label, $text ) {
+ }
+
+ public function clear() {
+ }
+
+ public function save( AbstractFormat $output ) {
+ }
+
+}
+
+class Config {
+
+ /**
+ * @param bool $use
+ */
+ public function useMb( $use ) {
+ }
+
+}
+
+abstract class AbstractFormat {
+
+ /**
+ * @param string $path
+ * @return self
+ */
+ public static function initFormatByPath( $path ) {
+ }
+
+}
diff --git a/MLEB/Translate/.phan/stubs/metayaml.php b/MLEB/Translate/.phan/stubs/metayaml.php
new file mode 100644
index 00000000..2f0007e8
--- /dev/null
+++ b/MLEB/Translate/.phan/stubs/metayaml.php
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * stub for suggested romaricdrigon/metayaml
+ * @phpcs:disable MediaWiki.Files.ClassMatchesFilename
+ */
+
+namespace RomaricDrigon\MetaYaml;
+
+class MetaYaml {
+
+ public function __construct( array $schema, $validate = false ) {
+ }
+
+ /**
+ * @return bool
+ */
+ public function validateSchema() {
+ }
+
+ /**
+ * @return array
+ */
+ public function getSchema() {
+ }
+
+ /**
+ * @param array $data
+ * @return bool
+ */
+ public function validate( array $data ) {
+ }
+
+ /**
+ * @param array $keys
+ * @param bool $unfold_all
+ * @return array
+ */
+ public function getDocumentationForNode( array $keys = [], $unfold_all = false ) {
+ }
+
+}
diff --git a/MLEB/Translate/.phan/stubs/namespaces.php b/MLEB/Translate/.phan/stubs/namespaces.php
new file mode 100644
index 00000000..9a6c8a05
--- /dev/null
+++ b/MLEB/Translate/.phan/stubs/namespaces.php
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * namespace constant defined in extension.json of Translate extension
+ */
+define( 'NS_TRANSLATIONS', 1198 );
+define( 'NS_TRANSLATIONS_TALK', 1199 );
+
+/**
+ * namespace constant defined in translatewiki.net config
+ */
+define( 'NS_INTUITION', 1240 );
diff --git a/MLEB/Translate/.phan/stubs/phplot.php b/MLEB/Translate/.phan/stubs/phplot.php
new file mode 100644
index 00000000..95fc28ad
--- /dev/null
+++ b/MLEB/Translate/.phan/stubs/phplot.php
@@ -0,0 +1,114 @@
+<?php
+/**
+ * stub for davefx/phplot
+ * @phpcs:disable MediaWiki.Files.ClassMatchesFilename
+ */
+class PHPlot {
+
+ /**
+ * @param int $width
+ * @param int $height
+ * @param string|null $output_file
+ * @param string|null $input_file
+ */
+ public function __construct( $width, $height, $output_file = null, $input_file = null ) {
+ }
+
+ /**
+ * @param string|null $which_font
+ * @return bool
+ */
+ public function SetDefaultTTFont( $which_font = null ) {
+ }
+
+ /**
+ * @param string $which_elem
+ * @param string $which_font
+ * @param int $which_size
+ * @param int|null $which_spacing
+ * @return bool
+ */
+ public function SetFontTTF( $which_elem, $which_font, $which_size = 12, $which_spacing = null ) {
+ }
+
+ /**
+ * @param array $which_dv
+ * @return bool
+ */
+ public function SetDataValues( $which_dv ) {
+ }
+
+ /**
+ * @param string|string[] $which_leg
+ * @return bool
+ */
+ public function SetLegend( $which_leg ) {
+ }
+
+ /**
+ * @param string $which_ytitle
+ * @param string $which_ypos
+ * @return bool
+ */
+ public function SetYTitle( $which_ytitle, $which_ypos = 'plotleft' ) {
+ }
+
+ /**
+ * @param float $which_ti
+ * @return bool
+ */
+ public function SetYTickIncrement( $which_ti = '' ) {
+ }
+
+ /**
+ * @param float|null $xmin
+ * @param float|null $ymin
+ * @param float|null $xmax
+ * @param float|null $ymax
+ * @return bool
+ */
+ public function SetPlotAreaWorld( $xmin = null, $ymin = null, $xmax = null, $ymax = null ) {
+ }
+
+ /**
+ * @param string $which_xtlp
+ * @return bool
+ */
+ public function SetXTickLabelPos( $which_xtlp ) {
+ }
+
+ /**
+ * @param string $which_tp
+ * @return bool
+ */
+ public function SetXTickPos( $which_tp ) {
+ }
+
+ /**
+ * @param float $which_xla
+ * @return bool
+ */
+ public function SetXLabelAngle( $which_xla ) {
+ }
+
+ /**
+ * @param string|int[]|null $which_color
+ * @return bool
+ */
+ public function SetTransparentColor( $which_color = null ) {
+ }
+
+ /**
+ * @param string|int[] $which_color
+ * @return bool
+ */
+ public function SetBackgroundColor( $which_color ) {
+ }
+
+ /**
+ * @return bool
+ */
+ public function DrawGraph() {
+ }
+
+}
diff --git a/MLEB/Translate/.phan/stubs/spyc.php b/MLEB/Translate/.phan/stubs/spyc.php
new file mode 100644
index 00000000..27253438
--- /dev/null
+++ b/MLEB/Translate/.phan/stubs/spyc.php
@@ -0,0 +1,18 @@
+<?php
+
+/**
+ * https://www.php.net/manual/en/yaml.constants.php
+ */
+define( 'YAML_UTF8_ENCODING', 1 );
+
+/**
+ * stub for suggested mustangostang/spyc
+ * @phpcs:disable MediaWiki.Files,MediaWiki.NamingConventions
+ */
+
+/**
+ * @param string $string
+ * @return array
+ */
+function spyc_load( $string ) {
+}