[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Improve some parameter docs
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/402647 ) Change subject: Improve some parameter docs .. Improve some parameter docs Change-Id: Ic445760aa7afec15cf56222a7053c3f9de6f559d --- M .phpcs.xml M ApiQueryProofread.php M ApiQueryProofreadInfo.php M ProofreadPage.body.php M includes/Index/CustomIndexFieldsParser.php M includes/Index/DatabaseIndexContentLookup.php M includes/Index/EditIndexPage.php M includes/Index/IndexContent.php M includes/Index/IndexContentHandler.php M includes/Index/IndexContentLookup.php M includes/Index/IndexDifferenceEngine.php M includes/Index/IndexRedirectContent.php M includes/Page/DatabaseIndexForPageLookup.php M includes/Page/EditPagePage.php M includes/Page/IndexForPageLookup.php M includes/Page/PageContent.php M includes/Page/PageContentHandler.php M includes/Page/PageDifferenceEngine.php M includes/Page/PageDisplayHandler.php M includes/Pagination/FilePagination.php M includes/Pagination/PagePagination.php M includes/Pagination/Pagination.php M includes/Parser/PagelistTagParser.php M includes/Parser/PagequalityTagParser.php M includes/Parser/PagesTagParser.php M includes/Parser/TagParser.php M maintenance/fixProofreadIndexPagesContentModel.php M maintenance/fixProofreadPagePagesContentModel.php M tests/phpunit/FileProviderMock.php M tests/phpunit/Index/IndexContentLookupMock.php M tests/phpunit/Page/IndexForPageLookupMock.php 31 files changed, 110 insertions(+), 104 deletions(-) Approvals: jenkins-bot: Verified Tpt: Looks good to me, approved diff --git a/.phpcs.xml b/.phpcs.xml index 2855261..9b83b12 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -4,15 +4,10 @@ - - - - - */maintenance/* diff --git a/ApiQueryProofread.php b/ApiQueryProofread.php index a2b0583..36893eb 100644 --- a/ApiQueryProofread.php +++ b/ApiQueryProofread.php @@ -114,7 +114,7 @@ } /** -* @see ApiBase::getExamplesMessages() +* @inheritDoc */ protected function getExamplesMessages() { return [ diff --git a/ApiQueryProofreadInfo.php b/ApiQueryProofreadInfo.php index a5c1fb2..18689a4 100644 --- a/ApiQueryProofreadInfo.php +++ b/ApiQueryProofreadInfo.php @@ -88,7 +88,7 @@ } /** -* @see ApiBase::getExamplesMessages() +* @inheritDoc */ protected function getExamplesMessages() { return [ diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php index b50dea5..b467703 100644 --- a/ProofreadPage.body.php +++ b/ProofreadPage.body.php @@ -618,6 +618,8 @@ /** * Adds canonical namespaces. +* @param array &$list +* @return true */ public static function addCanonicalNamespaces( &$list ) { $list[self::getPageNamespaceId()] = 'Page'; @@ -661,6 +663,7 @@ * Add the links to previous, next, index page and scan image to Page: pages. * @param SkinTemplate &$skin * @param array &$links Structured navigation links +* @return true */ public static function onSkinTemplateNavigation( SkinTemplate &$skin, array &$links ) { $title = $skin->getTitle(); @@ -751,6 +754,7 @@ * Add proofreading status to action=info * @param IContextSource $context * @param array &$pageInfo The page information +* @return true */ public static function onInfoAction( IContextSource $context, array &$pageInfo ) { if ( !$context->canUseWikiPage() ) { diff --git a/includes/Index/CustomIndexFieldsParser.php b/includes/Index/CustomIndexFieldsParser.php index c7673b0..570e394 100644 --- a/includes/Index/CustomIndexFieldsParser.php +++ b/includes/Index/CustomIndexFieldsParser.php @@ -156,6 +156,7 @@ /** * Return metadata from the index page that have to be given to header template. +* @param IndexContent $content * @return CustomIndexField[] */ public function parseCustomIndexFieldsForHeader( IndexContent $content ) { @@ -172,6 +173,8 @@ /** * Return the index entry with the same name or null if it's not found * Note: the comparison is case insensitive +* @param IndexContent $content +* @param string $fieldName * @return CustomIndexField * @throws OutOfBoundsException */ diff --git a/includes/Index/DatabaseIndexContentLookup.php b/includes/Index/DatabaseIndexContentLookup.php index 36cd727..9827776 100644 --- a/includes/Index/DatabaseIndexContentLookup.php +++ b/includes/Index/DatabaseIndexContentLookup.php @@ -15,7 +15,7 @@ private $cache = []; /** -
[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Improve some parameter docs
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402647 ) Change subject: Improve some parameter docs .. Improve some parameter docs Change-Id: Ic445760aa7afec15cf56222a7053c3f9de6f559d --- M .phpcs.xml M ApiQueryProofread.php M ApiQueryProofreadInfo.php M ProofreadPage.body.php M includes/Index/CustomIndexFieldsParser.php M includes/Index/DatabaseIndexContentLookup.php M includes/Index/EditIndexPage.php M includes/Index/IndexContent.php M includes/Index/IndexContentHandler.php M includes/Index/IndexContentLookup.php M includes/Index/IndexDifferenceEngine.php M includes/Index/IndexRedirectContent.php M includes/Page/DatabaseIndexForPageLookup.php M includes/Page/EditPagePage.php M includes/Page/IndexForPageLookup.php M includes/Page/PageContent.php M includes/Page/PageContentHandler.php M includes/Page/PageDifferenceEngine.php M includes/Page/PageDisplayHandler.php M includes/Pagination/FilePagination.php M includes/Pagination/PagePagination.php M includes/Pagination/Pagination.php M includes/Parser/PagelistTagParser.php M includes/Parser/PagequalityTagParser.php M includes/Parser/PagesTagParser.php M includes/Parser/TagParser.php M maintenance/fixProofreadIndexPagesContentModel.php M maintenance/fixProofreadPagePagesContentModel.php M tests/phpunit/FileProviderMock.php M tests/phpunit/Index/IndexContentLookupMock.php M tests/phpunit/Page/IndexForPageLookupMock.php 31 files changed, 110 insertions(+), 104 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage refs/changes/47/402647/1 diff --git a/.phpcs.xml b/.phpcs.xml index 2855261..9b83b12 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -4,15 +4,10 @@ - - - - - */maintenance/* diff --git a/ApiQueryProofread.php b/ApiQueryProofread.php index a2b0583..36893eb 100644 --- a/ApiQueryProofread.php +++ b/ApiQueryProofread.php @@ -114,7 +114,7 @@ } /** -* @see ApiBase::getExamplesMessages() +* @inheritDoc */ protected function getExamplesMessages() { return [ diff --git a/ApiQueryProofreadInfo.php b/ApiQueryProofreadInfo.php index a5c1fb2..18689a4 100644 --- a/ApiQueryProofreadInfo.php +++ b/ApiQueryProofreadInfo.php @@ -88,7 +88,7 @@ } /** -* @see ApiBase::getExamplesMessages() +* @inheritDoc */ protected function getExamplesMessages() { return [ diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php index b50dea5..b467703 100644 --- a/ProofreadPage.body.php +++ b/ProofreadPage.body.php @@ -618,6 +618,8 @@ /** * Adds canonical namespaces. +* @param array &$list +* @return true */ public static function addCanonicalNamespaces( &$list ) { $list[self::getPageNamespaceId()] = 'Page'; @@ -661,6 +663,7 @@ * Add the links to previous, next, index page and scan image to Page: pages. * @param SkinTemplate &$skin * @param array &$links Structured navigation links +* @return true */ public static function onSkinTemplateNavigation( SkinTemplate &$skin, array &$links ) { $title = $skin->getTitle(); @@ -751,6 +754,7 @@ * Add proofreading status to action=info * @param IContextSource $context * @param array &$pageInfo The page information +* @return true */ public static function onInfoAction( IContextSource $context, array &$pageInfo ) { if ( !$context->canUseWikiPage() ) { diff --git a/includes/Index/CustomIndexFieldsParser.php b/includes/Index/CustomIndexFieldsParser.php index c7673b0..570e394 100644 --- a/includes/Index/CustomIndexFieldsParser.php +++ b/includes/Index/CustomIndexFieldsParser.php @@ -156,6 +156,7 @@ /** * Return metadata from the index page that have to be given to header template. +* @param IndexContent $content * @return CustomIndexField[] */ public function parseCustomIndexFieldsForHeader( IndexContent $content ) { @@ -172,6 +173,8 @@ /** * Return the index entry with the same name or null if it's not found * Note: the comparison is case insensitive +* @param IndexContent $content +* @param string $fieldName * @return CustomIndexField * @throws OutOfBoundsException */ diff --git a/includes/Index/DatabaseIndexContentLookup.php b/includes/Index/DatabaseIndexContentLookup.php index 36cd727..9827776 100644 --- a/includes/Index/DatabaseIndexContentLookup.php +++ b/includes/Index/DatabaseIndexContentLookup.php @@ -15,7 +15,7 @@ private
[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Improve some parameter docs
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382504 ) Change subject: Improve some parameter docs .. Improve some parameter docs Change-Id: Id75aa0f627eb470def4e333f67a0c4be73534e1b --- M ProofreadPage.body.php M includes/index/CustomIndexFieldsParser.php M includes/page/ProofreadPageDbConnector.php M phpcs.xml 4 files changed, 20 insertions(+), 24 deletions(-) Approvals: jenkins-bot: Verified Tpt: Looks good to me, approved diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php index 8377fd1..39e16da 100644 --- a/ProofreadPage.body.php +++ b/ProofreadPage.body.php @@ -72,7 +72,7 @@ } /** -* @param array $queryPages +* @param array &$queryPages * @return bool */ public static function onwgQueryPages( &$queryPages ) { @@ -85,7 +85,7 @@ * Set up content handlers * * @param Title $title the title page -* @param string $model the content model for the page +* @param string &$model the content model for the page * @return bool if we have to continue the research for a content handler */ public static function onContentHandlerDefaultModelFor( Title $title, &$model ) { @@ -183,7 +183,7 @@ /** * Hook function * @param array $page_ids Prefixed DB keys of the pages linked to, indexed by page_id -* @param array $colours CSS classes, indexed by prefixed DB keys +* @param array &$colours CSS classes, indexed by prefixed DB keys * @return bool */ public static function onGetLinkColours( $page_ids, &$colours ) { @@ -251,8 +251,8 @@ } /** -* @param ImagePage $imgpage -* @param OutputPage $out +* @param ImagePage &$imgpage +* @param OutputPage &$out * @return bool */ public static function onImageOpenShowImageInlineBefore( @@ -306,7 +306,7 @@ } /** -* @param WikiPage $article +* @param WikiPage &$article * @return bool */ public static function onPageContentSaveComplete( WikiPage &$article ) { @@ -395,9 +395,9 @@ } /** -* @param MovePageForm $form -* @param Title $ot -* @param Title $nt +* @param MovePageForm &$form +* @param Title &$ot +* @param Title &$nt * @return bool */ public static function onSpecialMovepageAfterMove( @@ -454,7 +454,7 @@ /** * Update the pr_index entry of an article * @param Page $index -* @param Title|null $deletedpage +* @param Title|null $deletedPage */ public static function updatePrIndex( Page $index, $deletedPage = null ) { $indexTitle = $index->getTitle(); @@ -662,7 +662,7 @@ /** * Provides text for preload API * -* @param string $text +* @param string &$text * @param Title $title * @return bool */ @@ -685,7 +685,7 @@ /** * Add ProofreadPage preferences to the preferences menu * @param User $user -* @param array $preferences +* @param array &$preferences * @return bool */ public static function onGetPreferences( $user, &$preferences ) { @@ -738,7 +738,7 @@ } /** -* @param array $tables +* @param array &$tables * @return bool */ public static function onParserTestTables( array &$tables ) { @@ -749,8 +749,8 @@ /** * Add the links to previous, next, index page and scan image to Page: pages. -* @param SkinTemplate $skin -* @param array $links Structured navigation links +* @param SkinTemplate &$skin +* @param array &$links Structured navigation links */ public static function onSkinTemplateNavigation( SkinTemplate &$skin, array &$links ) { $title = $skin->getTitle(); @@ -841,7 +841,7 @@ /** * Add proofreading status to action=info * @param IContextSource $context -* @param array &$pageinfo The page information +* @param array &$pageInfo The page information */ public static function onInfoAction( IContextSource $context, array &$pageInfo ) { if ( !$context->canUseWikiPage() ) { diff --git a/includes/index/CustomIndexFieldsParser.php b/includes/index/CustomIndexFieldsParser.php index 2a8653f..aabcab7 100644 --- a/includes/index/CustomIndexFieldsParser.php +++ b/includes/index/CustomIndexFieldsParser.php @@ -154,7 +154,7 @@ return $values; } - /* + /** * Return metadata from the index page that have to be given to header template. * @return CustomIndexField[]
[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Improve some parameter docs
Umherirrender has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382504 ) Change subject: Improve some parameter docs .. Improve some parameter docs Change-Id: Id75aa0f627eb470def4e333f67a0c4be73534e1b --- M ProofreadPage.body.php M includes/index/CustomIndexFieldsParser.php M includes/page/ProofreadPageDbConnector.php M phpcs.xml 4 files changed, 20 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage refs/changes/04/382504/1 diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php index 8377fd1..39e16da 100644 --- a/ProofreadPage.body.php +++ b/ProofreadPage.body.php @@ -72,7 +72,7 @@ } /** -* @param array $queryPages +* @param array &$queryPages * @return bool */ public static function onwgQueryPages( &$queryPages ) { @@ -85,7 +85,7 @@ * Set up content handlers * * @param Title $title the title page -* @param string $model the content model for the page +* @param string &$model the content model for the page * @return bool if we have to continue the research for a content handler */ public static function onContentHandlerDefaultModelFor( Title $title, &$model ) { @@ -183,7 +183,7 @@ /** * Hook function * @param array $page_ids Prefixed DB keys of the pages linked to, indexed by page_id -* @param array $colours CSS classes, indexed by prefixed DB keys +* @param array &$colours CSS classes, indexed by prefixed DB keys * @return bool */ public static function onGetLinkColours( $page_ids, &$colours ) { @@ -251,8 +251,8 @@ } /** -* @param ImagePage $imgpage -* @param OutputPage $out +* @param ImagePage &$imgpage +* @param OutputPage &$out * @return bool */ public static function onImageOpenShowImageInlineBefore( @@ -306,7 +306,7 @@ } /** -* @param WikiPage $article +* @param WikiPage &$article * @return bool */ public static function onPageContentSaveComplete( WikiPage &$article ) { @@ -395,9 +395,9 @@ } /** -* @param MovePageForm $form -* @param Title $ot -* @param Title $nt +* @param MovePageForm &$form +* @param Title &$ot +* @param Title &$nt * @return bool */ public static function onSpecialMovepageAfterMove( @@ -454,7 +454,7 @@ /** * Update the pr_index entry of an article * @param Page $index -* @param Title|null $deletedpage +* @param Title|null $deletedPage */ public static function updatePrIndex( Page $index, $deletedPage = null ) { $indexTitle = $index->getTitle(); @@ -662,7 +662,7 @@ /** * Provides text for preload API * -* @param string $text +* @param string &$text * @param Title $title * @return bool */ @@ -685,7 +685,7 @@ /** * Add ProofreadPage preferences to the preferences menu * @param User $user -* @param array $preferences +* @param array &$preferences * @return bool */ public static function onGetPreferences( $user, &$preferences ) { @@ -738,7 +738,7 @@ } /** -* @param array $tables +* @param array &$tables * @return bool */ public static function onParserTestTables( array &$tables ) { @@ -749,8 +749,8 @@ /** * Add the links to previous, next, index page and scan image to Page: pages. -* @param SkinTemplate $skin -* @param array $links Structured navigation links +* @param SkinTemplate &$skin +* @param array &$links Structured navigation links */ public static function onSkinTemplateNavigation( SkinTemplate &$skin, array &$links ) { $title = $skin->getTitle(); @@ -841,7 +841,7 @@ /** * Add proofreading status to action=info * @param IContextSource $context -* @param array &$pageinfo The page information +* @param array &$pageInfo The page information */ public static function onInfoAction( IContextSource $context, array &$pageInfo ) { if ( !$context->canUseWikiPage() ) { diff --git a/includes/index/CustomIndexFieldsParser.php b/includes/index/CustomIndexFieldsParser.php index 2a8653f..aabcab7 100644 --- a/includes/index/CustomIndexFieldsParser.php +++ b/includes/index/CustomIndexFieldsParser.php @@ -154,7 +154,7 @@ return $values; } - /* + /** * Return metadata from the index page that have to be given to header template. *