Improve some parameter docs

Change-Id: I7d50eaabfba309a62d1dbd16ded0cbcab3beb82f
This commit is contained in:
Umherirrender 2017-10-06 21:22:30 +02:00
parent ed3fed14ab
commit 0802a73cae
5 changed files with 18 additions and 18 deletions

View file

@ -101,6 +101,7 @@ class ApiQueryReferences extends ApiQueryBase {
/** /**
* @see ApiBase::getExamplesMessages() * @see ApiBase::getExamplesMessages()
* @return array
*/ */
protected function getExamplesMessages() { protected function getExamplesMessages() {
return [ return [

View file

@ -1120,7 +1120,7 @@ class Cite {
* Gets run when Parser::clearState() gets run, since we don't * Gets run when Parser::clearState() gets run, since we don't
* want the counts to transcend pages and other instances * want the counts to transcend pages and other instances
* *
* @param Parser $parser * @param Parser &$parser
* *
* @return bool * @return bool
*/ */
@ -1178,8 +1178,8 @@ class Cite {
* references tags and does not add the errors. * references tags and does not add the errors.
* *
* @param bool $afterParse True if called from the ParserAfterParse hook * @param bool $afterParse True if called from the ParserAfterParse hook
* @param Parser $parser * @param Parser &$parser
* @param string $text * @param string &$text
* *
* @return bool * @return bool
*/ */
@ -1244,7 +1244,7 @@ class Cite {
* This is called by each <references/> tag, and by checkRefsNoReferences * This is called by each <references/> tag, and by checkRefsNoReferences
* Assumes $this->mRefs[$group] is set * Assumes $this->mRefs[$group] is set
* *
* @param $group * @param string $group
*/ */
private function saveReferencesData( $group = self::DEFAULT_GROUP ) { private function saveReferencesData( $group = self::DEFAULT_GROUP ) {
global $wgCiteStoreReferencesData; global $wgCiteStoreReferencesData;
@ -1278,7 +1278,7 @@ class Cite {
* If any ref or reference reference tag is in the text, * If any ref or reference reference tag is in the text,
* the entire page should be reparsed, so we return false in that case. * the entire page should be reparsed, so we return false in that case.
* *
* @param $output * @param string &$output
* *
* @return bool * @return bool
*/ */

View file

@ -19,6 +19,7 @@ class CiteDataModule extends ResourceLoaderModule {
/* Methods */ /* Methods */
/** @inheritDoc */
public function getScript( ResourceLoaderContext $context ) { public function getScript( ResourceLoaderContext $context ) {
$citationDefinition = json_decode( $citationDefinition = json_decode(
$context->msg( 'cite-tool-definition.json' ) $context->msg( 'cite-tool-definition.json' )
@ -54,6 +55,7 @@ class CiteDataModule extends ResourceLoaderModule {
) . ');'; ) . ');';
} }
/** @inheritDoc */
public function getDependencies( ResourceLoaderContext $context = null ) { public function getDependencies( ResourceLoaderContext $context = null ) {
return [ return [
'ext.visualEditor.base', 'ext.visualEditor.base',
@ -61,6 +63,7 @@ class CiteDataModule extends ResourceLoaderModule {
]; ];
} }
/** @inheritDoc */
public function getDefinitionSummary( ResourceLoaderContext $context ) { public function getDefinitionSummary( ResourceLoaderContext $context ) {
$summary = parent::getDefinitionSummary( $context ); $summary = parent::getDefinitionSummary( $context );
$summary[] = [ $summary[] = [

View file

@ -15,7 +15,7 @@ class CiteHooks {
* content. * content.
* *
* @param Title $title * @param Title $title
* @param string $model * @param string &$model
* @return bool * @return bool
*/ */
public static function onContentHandlerDefaultModelFor( Title $title, &$model ) { 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 * Conditionally register the unit testing module for the ext.cite.visualEditor module
* only if that module is loaded * only if that module is loaded
* *
* @param array $testModules The array of registered test modules * @param array &$testModules The array of registered test modules
* @param ResourceLoader $resourceLoader The reference to the resource loader * @param ResourceLoader &$resourceLoader The reference to the resource loader
* @return true * @return true
*/ */
public static function onResourceLoaderTestModules( public static function onResourceLoaderTestModules(
@ -74,7 +74,7 @@ class CiteHooks {
* Conditionally register resource loader modules that depends on the * Conditionally register resource loader modules that depends on the
* VisualEditor MediaWiki extension. * VisualEditor MediaWiki extension.
* *
* @param $resourceLoader * @param ResourceLoader &$resourceLoader
* @return true * @return true
*/ */
public static function onResourceLoaderRegisterModules( &$resourceLoader ) { public static function onResourceLoaderRegisterModules( &$resourceLoader ) {
@ -199,7 +199,7 @@ class CiteHooks {
* Post-output processing of references property, for proper db storage * Post-output processing of references property, for proper db storage
* Deferred to avoid performance overhead when outputting the page * Deferred to avoid performance overhead when outputting the page
* *
* @param LinksUpdate $linksUpdate * @param LinksUpdate &$linksUpdate
*/ */
public static function onLinksUpdate( LinksUpdate &$linksUpdate ) { public static function onLinksUpdate( LinksUpdate &$linksUpdate ) {
global $wgCiteStoreReferencesData, $wgCiteCacheRawReferencesOnParse; global $wgCiteStoreReferencesData, $wgCiteCacheRawReferencesOnParse;
@ -235,7 +235,7 @@ class CiteHooks {
* If $wgCiteCacheRawReferencesOnParse is set to false, purges the cache * If $wgCiteCacheRawReferencesOnParse is set to false, purges the cache
* when references are modified * when references are modified
* *
* @param LinksUpdate $linksUpdate * @param LinksUpdate &$linksUpdate
*/ */
public static function onLinksUpdateComplete( LinksUpdate &$linksUpdate ) { public static function onLinksUpdateComplete( LinksUpdate &$linksUpdate ) {
global $wgCiteStoreReferencesData, $wgCiteCacheRawReferencesOnParse; global $wgCiteStoreReferencesData, $wgCiteCacheRawReferencesOnParse;
@ -263,6 +263,8 @@ class CiteHooks {
/** /**
* Adds extra variables to the global config * Adds extra variables to the global config
* @param array &$vars
* @return true
*/ */
public static function onResourceLoaderGetConfigVars( array &$vars ) { public static function onResourceLoaderGetConfigVars( array &$vars ) {
$config = ConfigFactory::getDefaultInstance()->makeConfig( 'cite' ); $config = ConfigFactory::getDefaultInstance()->makeConfig( 'cite' );

View file

@ -2,16 +2,10 @@
<ruleset> <ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki"> <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment" /> <exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamName" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
<exclude name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
<exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" /> <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" /> <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
</rule> </rule>
<file>.</file> <file>.</file>
<arg name="extensions" value="php,php5,inc" /> <arg name="extensions" value="php,php5,inc" />
<arg name="encoding" value="utf8" /> <arg name="encoding" value="UTF-8" />
<exclude-pattern>vendor</exclude-pattern>
</ruleset> </ruleset>