[MediaWiki-commits] [Gerrit] mediawiki...PageImages[master]: Re-enable "MediaWiki.Commenting.FunctionComment.MissingDocum...
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/395875 ) Change subject: Re-enable "MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" sniff .. Re-enable "MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" sniff Bug: T170583 Change-Id: I33b56a824d26feb208492e8623c3c654a1372c47 --- M .phpcs.xml M includes/ApiQueryPageImages.php M includes/Job/InitImageDataJob.php M includes/PageImages.php M maintenance/initImageData.php 5 files changed, 35 insertions(+), 1 deletion(-) Approvals: jenkins-bot: Verified Jdlrobson: Looks good to me, approved diff --git a/.phpcs.xml b/.phpcs.xml index 18d84eb..86b3495 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -6,7 +6,6 @@ - diff --git a/includes/ApiQueryPageImages.php b/includes/ApiQueryPageImages.php index 6c3a94b..0a36408 100644 --- a/includes/ApiQueryPageImages.php +++ b/includes/ApiQueryPageImages.php @@ -70,6 +70,11 @@ return $titles; } + /** +* Evaluates the parameters, performs the requested retrieval of page images, +* and sets up the result +* @return null +*/ public function execute() { $params = $this->extractRequestParams(); $prop = array_flip( $params['prop'] ); @@ -170,6 +175,12 @@ return [ PageImages::getPropName( true ), PageImages::getPropName( false ) ]; } + /** +* Get the cache mode for the data generated by this module +* +* @param array $params Ignored parameters +* @return string Always returns "public" +*/ public function getCacheMode( $params ) { return 'public'; } @@ -228,6 +239,10 @@ return 'Returns information about images on the page such as thumbnail and presence of photos.'; } + /** +* Return an array describing all possible parameters to this module +* @return array +*/ public function getAllowedParams() { return [ 'prop' => [ @@ -290,6 +305,10 @@ ]; } + /** +* @see ApiBase::getHelpUrls() +* @return string +*/ public function getHelpUrls() { return "https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:PageImages#API";; } diff --git a/includes/Job/InitImageDataJob.php b/includes/Job/InitImageDataJob.php index 238732e..2d91d77 100644 --- a/includes/Job/InitImageDataJob.php +++ b/includes/Job/InitImageDataJob.php @@ -9,10 +9,18 @@ use Title; class InitImageDataJob extends Job { + /** +* @param Title $title Title object associated with this job +* @param array|bool $params Parameters to the job, containing an array of +* page ids representing which pages to process +*/ public function __construct( Title $title, array $params ) { parent::__construct( 'InitImageDataJob', $title, $params ); } + /** +* @inheritDoc +*/ public function run() { $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); diff --git a/includes/PageImages.php b/includes/PageImages.php index bb412ae..36d89bb 100644 --- a/includes/PageImages.php +++ b/includes/PageImages.php @@ -197,6 +197,10 @@ return $ret; } + /** +* Hook function called after the extension is loaded to define PAGE_IMAGES_INSTALLED +* @return null +*/ public static function onRegistration() { define( 'PAGE_IMAGES_INSTALLED', true ); } diff --git a/maintenance/initImageData.php b/maintenance/initImageData.php index 776d55a..329b525 100644 --- a/maintenance/initImageData.php +++ b/maintenance/initImageData.php @@ -27,6 +27,10 @@ $this->setBatchSize( 100 ); } + /** +* Do the actual work of filling out page images +* @return null +*/ public function execute() { global $wgPageImagesNamespaces; -- To view, visit https://gerrit.wikimedia.org/r/395875 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I33b56a824d26feb208492e8623c3c654a1372c47 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: Pppery Gerrit-Reviewer: Jdlrobson Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...PageImages[master]: Re-enable "MediaWiki.Commenting.FunctionComment.MissingDocum...
Pppery has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/395875 ) Change subject: Re-enable "MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" sniff .. Re-enable "MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" sniff Bug: T170583 Change-Id: I33b56a824d26feb208492e8623c3c654a1372c47 --- M .phpcs.xml M includes/ApiQueryPageImages.php M includes/Job/InitImageDataJob.php M includes/PageImages.php M maintenance/initImageData.php 5 files changed, 35 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageImages refs/changes/75/395875/1 diff --git a/.phpcs.xml b/.phpcs.xml index 18d84eb..86b3495 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -6,7 +6,6 @@ - diff --git a/includes/ApiQueryPageImages.php b/includes/ApiQueryPageImages.php index 6c3a94b..0a36408 100644 --- a/includes/ApiQueryPageImages.php +++ b/includes/ApiQueryPageImages.php @@ -70,6 +70,11 @@ return $titles; } + /** +* Evaluates the parameters, performs the requested retrieval of page images, +* and sets up the result +* @return null +*/ public function execute() { $params = $this->extractRequestParams(); $prop = array_flip( $params['prop'] ); @@ -170,6 +175,12 @@ return [ PageImages::getPropName( true ), PageImages::getPropName( false ) ]; } + /** +* Get the cache mode for the data generated by this module +* +* @param array $params Ignored parameters +* @return string Always returns "public" +*/ public function getCacheMode( $params ) { return 'public'; } @@ -228,6 +239,10 @@ return 'Returns information about images on the page such as thumbnail and presence of photos.'; } + /** +* Return an array describing all possible parameters to this module +* @return array +*/ public function getAllowedParams() { return [ 'prop' => [ @@ -290,6 +305,10 @@ ]; } + /** +* @see ApiBase::getHelpUrls() +* @return string +*/ public function getHelpUrls() { return "https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:PageImages#API";; } diff --git a/includes/Job/InitImageDataJob.php b/includes/Job/InitImageDataJob.php index 238732e..2d91d77 100644 --- a/includes/Job/InitImageDataJob.php +++ b/includes/Job/InitImageDataJob.php @@ -9,10 +9,18 @@ use Title; class InitImageDataJob extends Job { + /** +* @param Title $title Title object associated with this job +* @param array|bool $params Parameters to the job, containing an array of +* page ids representing which pages to process +*/ public function __construct( Title $title, array $params ) { parent::__construct( 'InitImageDataJob', $title, $params ); } + /** +* @inheritDoc +*/ public function run() { $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); diff --git a/includes/PageImages.php b/includes/PageImages.php index bb412ae..36d89bb 100644 --- a/includes/PageImages.php +++ b/includes/PageImages.php @@ -197,6 +197,10 @@ return $ret; } + /** +* Hook function called after the extension is loaded to define PAGE_IMAGES_INSTALLED +* @return null +*/ public static function onRegistration() { define( 'PAGE_IMAGES_INSTALLED', true ); } diff --git a/maintenance/initImageData.php b/maintenance/initImageData.php index 776d55a..329b525 100644 --- a/maintenance/initImageData.php +++ b/maintenance/initImageData.php @@ -27,6 +27,10 @@ $this->setBatchSize( 100 ); } + /** +* Do the actual work of filling out page images +* @return null +*/ public function execute() { global $wgPageImagesNamespaces; -- To view, visit https://gerrit.wikimedia.org/r/395875 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33b56a824d26feb208492e8623c3c654a1372c47 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/PageImages Gerrit-Branch: master Gerrit-Owner: Pppery ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits