jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395838 )
Change subject: Re-enable "MediaWiki.Commenting.FunctionComment.MissingParamComment" sniff ...................................................................... Re-enable "MediaWiki.Commenting.FunctionComment.MissingParamComment" sniff Bug: T170583 Change-Id: I3a5a849c168aed7ab6ea479bab5ec7d9b809dd6f --- M .phpcs.xml M includes/ApiQueryPageImages.php M includes/LinksUpdateHookHandler.php M includes/PageImages.php M includes/ParserFileProcessingHookHandlers.php 5 files changed, 33 insertions(+), 31 deletions(-) Approvals: jenkins-bot: Verified Jdlrobson: Looks good to me, approved diff --git a/.phpcs.xml b/.phpcs.xml index c868821..b5fc9ef 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -1,7 +1,6 @@ <?xml version="1.0"?> <ruleset> <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki"> - <exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment" /> <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" /> <exclude name="MediaWiki.Files.ClassMatchesFilename.WrongCase" /> <exclude name="MediaWiki.Files.OneClassPerFile.MultipleFound" /> diff --git a/includes/ApiQueryPageImages.php b/includes/ApiQueryPageImages.php index 75bc9a3..8cf9996 100644 --- a/includes/ApiQueryPageImages.php +++ b/includes/ApiQueryPageImages.php @@ -24,8 +24,8 @@ const PARAM_LICENSE_ANY = 'any'; /** - * @param ApiQuery $query - * @param string $moduleName + * @param ApiQuery $query API query module + * @param string $moduleName Name of this query module */ public function __construct( ApiQuery $query, $moduleName ) { parent::__construct( $query, $moduleName, 'pi' ); @@ -165,7 +165,8 @@ * otherwise both free and non-free property names will be returned. That's * because we save the image name only once if it's free and the best image. * - * @param string $license + * @param string $license either PARAM_LICENSE_FREE or PARAM_LICENSE_ANY, + * specifying whether to return the non-free property name or not * @return string|array */ protected static function getPropNames( $license ) { diff --git a/includes/LinksUpdateHookHandler.php b/includes/LinksUpdateHookHandler.php index ec776db..f4730e3 100644 --- a/includes/LinksUpdateHookHandler.php +++ b/includes/LinksUpdateHookHandler.php @@ -25,7 +25,7 @@ * * @see https://www.mediawiki.org/wiki/Manual:Hooks/LinksUpdate * - * @param LinksUpdate $linksUpdate + * @param LinksUpdate $linksUpdate the LinksUpdate object that this hook is parsing */ public static function onLinksUpdate( LinksUpdate $linksUpdate ) { $handler = new self(); @@ -35,7 +35,8 @@ /** * Returns a list of page image candidates for consideration * for scoring algorithm. - * @param LinksUpdate $linksUpdate + * @param LinksUpdate $linksUpdate LinksUpdate object used to determine what page + * to get page images for * @return array $image Associative array describing an image */ public function getPageImageCandidates( LinksUpdate $linksUpdate ) { @@ -63,7 +64,7 @@ } /** - * @param LinksUpdate $linksUpdate + * @param LinksUpdate $linksUpdate the LinksUpdate object that was passed to the handler */ public function doLinksUpdate( LinksUpdate $linksUpdate ) { $images = $this->getPageImageCandidates( $linksUpdate ); @@ -147,8 +148,9 @@ /** * Returns score based on table of ranges * - * @param int $value - * @param int[] $scores + * @param int $value The number that the various bounds are compared against + * to calculate the score + * @param int[] $scores Table of scores for different ranges of $value * * @return int */ @@ -185,7 +187,7 @@ /** * Fetch file metadata * - * @param File $file + * @param File $file File to fetch metadata from * @return array */ protected function fetchFileMetadata( $file ) { @@ -202,7 +204,7 @@ /** * Returns width/height ratio of an image as displayed or 0 is not available * - * @param array $image + * @param array $image Array representing the image to get the aspect ratio from * * @return float|int */ diff --git a/includes/PageImages.php b/includes/PageImages.php index ee5b97a..a73fec0 100644 --- a/includes/PageImages.php +++ b/includes/PageImages.php @@ -71,8 +71,8 @@ * * @see https://www.mediawiki.org/wiki/Manual:Hooks/InfoAction * - * @param IContextSource $context - * @param array[] &$pageInfo + * @param IContextSource $context Context, used to extract the title of the page + * @param array[] &$pageInfo Auxillary information about the page. */ public static function onInfoAction( IContextSource $context, &$pageInfo ) { global $wgThumbLimits; @@ -106,7 +106,7 @@ /** * ApiOpenSearchSuggest hook handler, enhances ApiOpenSearch results with this extension's data * - * @param array[] &$results + * @param array[] &$results Array of results to add page images too */ public static function onApiOpenSearchSuggest( array &$results ) { global $wgPageImagesExpandOpenSearchXml; @@ -129,9 +129,9 @@ /** * SpecialMobileEditWatchlist::images hook handler, adds images to mobile watchlist A-Z view * - * @param IContextSource $context - * @param array[] $watchlist - * @param array[] &$images + * @param IContextSource $context Context object. Ignored + * @param array[] $watchlist Array of relevant pages on the watchlist, sorted by namespace + * @param array[] &$images Array of images to populate */ public static function onSpecialMobileEditWatchlistImages( IContextSource $context, array $watchlist, array &$images @@ -206,8 +206,8 @@ } /** - * @param OutputPage &$out - * @param Skin &$skin + * @param OutputPage &$out The page being output. + * @param Skin &$skin Skin object used to generate the page. Ignored */ public static function onBeforePageDisplay( OutputPage &$out, Skin &$skin ) { $imageFile = self::getPageImage( $out->getContext()->getTitle() ); diff --git a/includes/ParserFileProcessingHookHandlers.php b/includes/ParserFileProcessingHookHandlers.php index 8ce9021..e810398 100644 --- a/includes/ParserFileProcessingHookHandlers.php +++ b/includes/ParserFileProcessingHookHandlers.php @@ -21,10 +21,10 @@ * * @see https://www.mediawiki.org/wiki/Manual:Hooks/ParserMakeImageParams * - * @param Title $title - * @param File|bool $file - * @param array[] &$params - * @param Parser $parser + * @param Title $title The title of the image + * @param File|bool $file The file name of the image + * @param array[] &$params The parameters used to generate the image + * @param Parser $parser Parser that is parsing this image */ public static function onParserMakeImageParams( Title $title, @@ -39,8 +39,8 @@ /** * AfterParserFetchFileAndTitle hook handler, saves information about gallery images * - * @param Parser $parser - * @param ImageGalleryBase $gallery + * @param Parser $parser Parser that is parsing the gallery + * @param ImageGalleryBase $gallery Object representing the gallery being created */ public static function onAfterParserFetchFileAndTitle( Parser $parser, ImageGalleryBase $gallery @@ -50,10 +50,10 @@ } /** - * @param Title $title - * @param File|bool $file - * @param array[] &$params - * @param Parser $parser + * @param Title $title The title of the image + * @param File|bool $file The file name of the image + * @param array[] &$params The parameters used to generate the image + * @param Parser $parser Parser that called the hook */ public function doParserMakeImageParams( Title $title, @@ -65,8 +65,8 @@ } /** - * @param Parser $parser - * @param ImageGalleryBase $gallery + * @param Parser $parser Parser that is parsing the gallery + * @param ImageGalleryBase $gallery Object representing the gallery being created */ public function doAfterParserFetchFileAndTitle( Parser $parser, ImageGalleryBase $gallery ) { foreach ( $gallery->getImages() as $image ) { -- To view, visit https://gerrit.wikimedia.org/r/395838 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3a5a849c168aed7ab6ea479bab5ec7d9b809dd6f Gerrit-PatchSet: 5 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: Pppery <maprea...@olum.org> Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: Pppery <maprea...@olum.org> Gerrit-Reviewer: Umherirrender <umherirrender_de...@web.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits