build: Updating mediawiki/mediawiki-phan-config to 0.9.0

Depends-On: I76cbaf355462a41aec40d239577123de6b04223a
Change-Id: I7780d46c2828947cf753ea2390d3b1dd645b6758
This commit is contained in:
libraryupgrader 2019-12-22 01:33:19 +00:00 committed by Umherirrender
parent 6332b4497d
commit 3fe88580cb
4 changed files with 11 additions and 10 deletions

View file

@ -4,7 +4,7 @@
"mediawiki/mediawiki-codesniffer": "28.0.0", "mediawiki/mediawiki-codesniffer": "28.0.0",
"jakub-onderka/php-console-highlighter": "0.3.2", "jakub-onderka/php-console-highlighter": "0.3.2",
"mediawiki/minus-x": "0.3.2", "mediawiki/minus-x": "0.3.2",
"mediawiki/mediawiki-phan-config": "0.8.0" "mediawiki/mediawiki-phan-config": "0.9.0"
}, },
"scripts": { "scripts": {
"fix": [ "fix": [

View file

@ -32,7 +32,7 @@ class ReplaceTextJob extends Job {
* @param Title $title * @param Title $title
* @param array|bool $params Cannot be === true * @param array|bool $params Cannot be === true
*/ */
function __construct( $title, $params = '' ) { function __construct( $title, $params = [] ) {
parent::__construct( 'replaceText', $title, $params ); parent::__construct( 'replaceText', $title, $params );
} }

View file

@ -26,8 +26,8 @@ class ReplaceTextSearch {
/** /**
* @param string $search * @param string $search
* @param array $namespaces * @param array $namespaces
* @param string $category * @param string|null $category
* @param string $prefix * @param string|null $prefix
* @param bool $use_regex * @param bool $use_regex
* @return IResultWrapper Resulting rows * @return IResultWrapper Resulting rows
*/ */
@ -65,7 +65,7 @@ class ReplaceTextSearch {
} }
/** /**
* @param string $category * @param string|null $category
* @param array &$tables * @param array &$tables
* @param array &$conds * @param array &$conds
*/ */
@ -79,7 +79,7 @@ class ReplaceTextSearch {
} }
/** /**
* @param string $prefix * @param string|null $prefix
* @param array &$conds * @param array &$conds
*/ */
public static function prefixCondition( $prefix, &$conds ) { public static function prefixCondition( $prefix, &$conds ) {
@ -93,6 +93,7 @@ class ReplaceTextSearch {
$prefix = $title->getDbKey(); $prefix = $title->getDbKey();
} }
$any = $dbr->anyString(); $any = $dbr->anyString();
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable strval makes this non-null
$conds[] = 'page_title ' . $dbr->buildLike( $prefix, $any ); $conds[] = 'page_title ' . $dbr->buildLike( $prefix, $any );
} }
@ -114,8 +115,8 @@ class ReplaceTextSearch {
/** /**
* @param string $str * @param string $str
* @param array $namespaces * @param array $namespaces
* @param string $category * @param string|null $category
* @param string $prefix * @param string|null $prefix
* @param bool $use_regex * @param bool $use_regex
* @return IResultWrapper Resulting rows * @return IResultWrapper Resulting rows
*/ */

View file

@ -272,10 +272,10 @@ class SpecialReplaceText extends SpecialPage {
foreach ( $request->getValues() as $key => $value ) { foreach ( $request->getValues() as $key => $value ) {
if ( $value == '1' && $key !== 'replace' && $key !== 'use_regex' ) { if ( $value == '1' && $key !== 'replace' && $key !== 'use_regex' ) {
if ( strpos( $key, 'move-' ) !== false ) { if ( strpos( $key, 'move-' ) !== false ) {
$title = Title::newFromID( substr( $key, 5 ) ); $title = Title::newFromID( (int)substr( $key, 5 ) );
$replacement_params['move_page'] = true; $replacement_params['move_page'] = true;
} else { } else {
$title = Title::newFromID( $key ); $title = Title::newFromID( (int)$key );
} }
if ( $title !== null ) { if ( $title !== null ) {
$jobs[] = new ReplaceTextJob( $title, $replacement_params ); $jobs[] = new ReplaceTextJob( $title, $replacement_params );