File tree Expand file tree Collapse file tree 4 files changed +11
-2
lines changed
Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ return require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config.php ' ;
Original file line number Diff line number Diff line change 2828 },
2929 "require-dev" : {
3030 "mediawiki/mediawiki-codesniffer" : " 35.0.0" ,
31+ "mediawiki/mediawiki-phan-config" : " 0.10.6" ,
3132 "mediawiki/minus-x" : " 1.1.1" ,
3233 "ockcyp/covers-validator" : " 1.3.3" ,
3334 "php-parallel-lint/php-console-highlighter" : " 0.5.0" ,
4041 " phpunit" ,
4142 " covers-validator" ,
4243 " phpcs -sp" ,
44+ " phan --allow-polyfill-parser --long-progress-bar" ,
4345 " minus-x check ."
4446 ],
4547 "cover" : " phpunit --coverage-html coverage" ,
4648 "fix" : [
4749 " minus-x fix ." ,
4850 " phpcbf"
49- ]
51+ ],
52+ "phan" : " phan -d . --long-progress-bar"
5053 }
5154}
Original file line number Diff line number Diff line change @@ -144,7 +144,9 @@ protected function doConvert() {
144144 $ token ->error ( 'unexpected operator ' );
145145 }
146146 // Resolve higher precedence levels
147+ /** @var Operator $lastOp */
147148 $ lastOp = end ( $ this ->operators );
149+ // @phan-suppress-next-line PhanUndeclaredProperty
148150 while ( $ lastOp && self ::$ precedence [$ token ->name ] <= self ::$ precedence [$ lastOp ->name ] ) {
149151 $ this ->doOperation ( $ lastOp );
150152 array_pop ( $ this ->operators );
@@ -260,6 +262,7 @@ protected function nextToken() {
260262 }
261263
262264 // The single-character operand symbols
265+ // @phan-suppress-next-line PhanParamSuspiciousOrder
263266 if ( strpos ( self ::OPERAND_SYMBOLS , $ word1 ) !== false ) {
264267 $ token = $ this ->newNumber ( $ word1 , $ this ->pos );
265268 $ this ->pos ++;
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public static function compile( array $rules ) {
5050 * Evaluate a compiled set of rules returned by compile(). Do not allow
5151 * the user to edit the compiled form, or else PHP errors may result.
5252 *
53- * @param string $number The number to be evaluated against the rules, in English, or it
53+ * @param string|int $number The number to be evaluated against the rules, in English, or it
5454 * may be a type convertible to string.
5555 * @param array $rules The associative array of plural rules in pluralform => rule format.
5656 * @return int The index of the plural form which passed the evaluation
You can’t perform that action at this time.
0 commit comments