From 0802a73cae9f9e71094ccf0a6c4feee691b6aaf3 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Fri, 6 Oct 2017 21:22:30 +0200 Subject: [PATCH] Improve some parameter docs Change-Id: I7d50eaabfba309a62d1dbd16ded0cbcab3beb82f --- includes/ApiQueryReferences.php | 1 + includes/Cite.php | 10 +++++----- includes/CiteDataModule.php | 3 +++ includes/CiteHooks.php | 14 ++++++++------ phpcs.xml | 8 +------- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/includes/ApiQueryReferences.php b/includes/ApiQueryReferences.php index 209015976..75b314c70 100644 --- a/includes/ApiQueryReferences.php +++ b/includes/ApiQueryReferences.php @@ -101,6 +101,7 @@ class ApiQueryReferences extends ApiQueryBase { /** * @see ApiBase::getExamplesMessages() + * @return array */ protected function getExamplesMessages() { return [ diff --git a/includes/Cite.php b/includes/Cite.php index 1568f7865..7fe0d256b 100644 --- a/includes/Cite.php +++ b/includes/Cite.php @@ -1120,7 +1120,7 @@ class Cite { * Gets run when Parser::clearState() gets run, since we don't * want the counts to transcend pages and other instances * - * @param Parser $parser + * @param Parser &$parser * * @return bool */ @@ -1178,8 +1178,8 @@ class Cite { * references tags and does not add the errors. * * @param bool $afterParse True if called from the ParserAfterParse hook - * @param Parser $parser - * @param string $text + * @param Parser &$parser + * @param string &$text * * @return bool */ @@ -1244,7 +1244,7 @@ class Cite { * This is called by each tag, and by checkRefsNoReferences * Assumes $this->mRefs[$group] is set * - * @param $group + * @param string $group */ private function saveReferencesData( $group = self::DEFAULT_GROUP ) { global $wgCiteStoreReferencesData; @@ -1278,7 +1278,7 @@ class Cite { * If any ref or reference reference tag is in the text, * the entire page should be reparsed, so we return false in that case. * - * @param $output + * @param string &$output * * @return bool */ diff --git a/includes/CiteDataModule.php b/includes/CiteDataModule.php index 1952ebf8e..b3d36ef40 100644 --- a/includes/CiteDataModule.php +++ b/includes/CiteDataModule.php @@ -19,6 +19,7 @@ class CiteDataModule extends ResourceLoaderModule { /* Methods */ + /** @inheritDoc */ public function getScript( ResourceLoaderContext $context ) { $citationDefinition = json_decode( $context->msg( 'cite-tool-definition.json' ) @@ -54,6 +55,7 @@ class CiteDataModule extends ResourceLoaderModule { ) . ');'; } + /** @inheritDoc */ public function getDependencies( ResourceLoaderContext $context = null ) { return [ 'ext.visualEditor.base', @@ -61,6 +63,7 @@ class CiteDataModule extends ResourceLoaderModule { ]; } + /** @inheritDoc */ public function getDefinitionSummary( ResourceLoaderContext $context ) { $summary = parent::getDefinitionSummary( $context ); $summary[] = [ diff --git a/includes/CiteHooks.php b/includes/CiteHooks.php index f0bcc2620..bcf65fd27 100644 --- a/includes/CiteHooks.php +++ b/includes/CiteHooks.php @@ -15,7 +15,7 @@ class CiteHooks { * content. * * @param Title $title - * @param string $model + * @param string &$model * @return bool */ public static function onContentHandlerDefaultModelFor( Title $title, &$model ) { @@ -36,8 +36,8 @@ class CiteHooks { * Conditionally register the unit testing module for the ext.cite.visualEditor module * only if that module is loaded * - * @param array $testModules The array of registered test modules - * @param ResourceLoader $resourceLoader The reference to the resource loader + * @param array &$testModules The array of registered test modules + * @param ResourceLoader &$resourceLoader The reference to the resource loader * @return true */ public static function onResourceLoaderTestModules( @@ -74,7 +74,7 @@ class CiteHooks { * Conditionally register resource loader modules that depends on the * VisualEditor MediaWiki extension. * - * @param $resourceLoader + * @param ResourceLoader &$resourceLoader * @return true */ public static function onResourceLoaderRegisterModules( &$resourceLoader ) { @@ -199,7 +199,7 @@ class CiteHooks { * Post-output processing of references property, for proper db storage * Deferred to avoid performance overhead when outputting the page * - * @param LinksUpdate $linksUpdate + * @param LinksUpdate &$linksUpdate */ public static function onLinksUpdate( LinksUpdate &$linksUpdate ) { global $wgCiteStoreReferencesData, $wgCiteCacheRawReferencesOnParse; @@ -235,7 +235,7 @@ class CiteHooks { * If $wgCiteCacheRawReferencesOnParse is set to false, purges the cache * when references are modified * - * @param LinksUpdate $linksUpdate + * @param LinksUpdate &$linksUpdate */ public static function onLinksUpdateComplete( LinksUpdate &$linksUpdate ) { global $wgCiteStoreReferencesData, $wgCiteCacheRawReferencesOnParse; @@ -263,6 +263,8 @@ class CiteHooks { /** * Adds extra variables to the global config + * @param array &$vars + * @return true */ public static function onResourceLoaderGetConfigVars( array &$vars ) { $config = ConfigFactory::getDefaultInstance()->makeConfig( 'cite' ); diff --git a/phpcs.xml b/phpcs.xml index ae5c05d9f..b15894e84 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -2,16 +2,10 @@ - - - - - . - - vendor +