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()
* @return array
*/
protected function getExamplesMessages() {
return [

View file

@ -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 <references/> 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
*/

View file

@ -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[] = [

View file

@ -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' );

View file

@ -2,16 +2,10 @@
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<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.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
</rule>
<file>.</file>
<arg name="extensions" value="php,php5,inc" />
<arg name="encoding" value="utf8" />
<exclude-pattern>vendor</exclude-pattern>
<arg name="encoding" value="UTF-8" />
</ruleset>