diff --git a/.gitignore b/.gitignore index 560f9c46..7abb38df 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ node_modules/ vendor/ composer.lock +tests/phan/issues diff --git a/composer.json b/composer.json index e17a4053..17019b96 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,8 @@ "jakub-onderka/php-parallel-lint": "1.0.0", "mediawiki/mediawiki-codesniffer": "18.0.0", "jakub-onderka/php-console-highlighter": "0.3.2", - "mediawiki/minus-x": "0.3.1" + "mediawiki/minus-x": "0.3.1", + "mediawiki/mediawiki-phan-config": "0.2.0" }, "scripts": { "fix": [ diff --git a/src/ReplaceTextHooks.php b/src/ReplaceTextHooks.php index 9a516c63..dc5604e4 100644 --- a/src/ReplaceTextHooks.php +++ b/src/ReplaceTextHooks.php @@ -31,7 +31,7 @@ class ReplaceTextHooks { * Adds a link to the Special:ReplaceText page at the end of a successful * regular page move message. * - * @param FormLayout &$form MovePageForm + * @param MovePageForm &$form * @param Title &$ot Title object of the old article (moved from) * @param Title &$nt Title object of the new article (moved to) */ diff --git a/src/ReplaceTextJob.php b/src/ReplaceTextJob.php index 5404690b..2aca8c7f 100644 --- a/src/ReplaceTextJob.php +++ b/src/ReplaceTextJob.php @@ -55,12 +55,7 @@ class ReplaceTextJob extends Job { $create_redirect = $this->params['create_redirect']; $this->title->moveTo( $new_title, true, $reason, $create_redirect ); if ( $this->params['watch_page'] ) { - if ( class_exists( 'WatchAction' ) ) { - // Class was added in MW 1.19 - WatchAction::doWatch( $new_title, $wgUser ); - } else { - Action::factory( 'watch', new WikiPage( $new_title ) )->execute(); - } + WatchAction::doWatch( $new_title, $wgUser ); } $wgUser = $actual_user; } else { diff --git a/src/ReplaceTextSearch.php b/src/ReplaceTextSearch.php index 31a6557a..c59bdd54 100644 --- a/src/ReplaceTextSearch.php +++ b/src/ReplaceTextSearch.php @@ -1,5 +1,9 @@