Improve some parameter docs

Change-Id: I239d4aa0023978b27bc04a7ff7d55892f3bb7feb
This commit is contained in:
Umherirrender 2017-10-05 19:17:38 +02:00
parent 8db065c142
commit 8e8c9d0654
5 changed files with 15 additions and 15 deletions

View File

@ -45,8 +45,8 @@ class MinervaHooks {
* ResourceLoaderTestModules hook handler * ResourceLoaderTestModules hook handler
* @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules * @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderTestModules
* *
* @param array $testModules * @param array &$testModules
* @param ResourceLoader $resourceLoader * @param ResourceLoader &$resourceLoader
* @return bool * @return bool
*/ */
public static function onResourceLoaderTestModules( array &$testModules, public static function onResourceLoaderTestModules( array &$testModules,
@ -124,7 +124,7 @@ class MinervaHooks {
/** /**
* BeforePageDisplayMobile hook handler. * BeforePageDisplayMobile hook handler.
* *
* @param OutputPage $out * @param MobileContext $mobileContext
* @param Skin $skin * @param Skin $skin
*/ */
public static function onRequestContextCreateSkinMobile( public static function onRequestContextCreateSkinMobile(

View File

@ -39,7 +39,7 @@ class MenuBuilder {
* Insert an entry into the menu. * Insert an entry into the menu.
* *
* @param string $name A unique name identifying the menu entry * @param string $name A unique name identifying the menu entry
* @param bool [ $isJSOnly] Whether the menu entry works without JS * @param bool $isJSOnly Whether the menu entry works without JS
* @throws DomainException When the entry already exists * @throws DomainException When the entry already exists
* @return MenuEntry * @return MenuEntry
*/ */
@ -77,7 +77,7 @@ class MenuBuilder {
* @param string $targetName The name of the existing entry to insert * @param string $targetName The name of the existing entry to insert
* the new entry after * the new entry after
* @param string $name The name of the new entry * @param string $name The name of the new entry
* @param bool [ $isJSOnly] Whether the entry works without JS * @param bool $isJSOnly Whether the entry works without JS
* @throws DomainException When the existing entry doesn't exist * @throws DomainException When the existing entry doesn't exist
* @return MenuEntry * @return MenuEntry
*/ */
@ -148,9 +148,9 @@ class MenuEntry {
* *
* @param string $label * @param string $label
* @param string $url * @param string $url
* @param string [ $className] Any additional CSS classes that should added to the output, * @param string $className Any additional CSS classes that should added to the output,
* separated by spaces * separated by spaces
* @param array [ $attrs] Additional data that can be associated with the component * @param array $attrs Additional data that can be associated with the component
* *
* @return MenuEntry * @return MenuEntry
*/ */

View File

@ -126,12 +126,17 @@ class MinervaTemplate extends BaseTemplate {
} }
} }
/**
* @return bool
*/
protected function isFallbackEditor() { protected function isFallbackEditor() {
$action = $this->getSkin()->getRequest()->getVal( 'action' ); $action = $this->getSkin()->getRequest()->getVal( 'action' );
return $action === 'edit'; return $action === 'edit';
} }
/** /**
* Get page secondary actions * Get page secondary actions
* @return string[]
*/ */
protected function getSecondaryActions() { protected function getSecondaryActions() {
if ( $this->isFallbackEditor() ) { if ( $this->isFallbackEditor() ) {
@ -242,7 +247,7 @@ class MinervaTemplate extends BaseTemplate {
/** /**
* Gets the main menu only on Special:MobileMenu. * Gets the main menu only on Special:MobileMenu.
* On other pages the menu is rendered via JS. * On other pages the menu is rendered via JS.
* @param array [ $data] Data used to build the page * @param array $data Data used to build the page
* @return string * @return string
*/ */
protected function getMainMenuHtml( $data ) { protected function getMainMenuHtml( $data ) {

View File

@ -1270,7 +1270,7 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
$this->getUser()->isLoggedIn(); $this->getUser()->isLoggedIn();
} }
/* /**
* Returns true, if the talk page of this page is wikitext-based. * Returns true, if the talk page of this page is wikitext-based.
* @return bool * @return bool
*/ */
@ -1379,7 +1379,7 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
* property. * property.
* *
* @param OutputPage $out * @param OutputPage $out
* @param array $bodyAttrs * @param array &$bodyAttrs
*/ */
public function addToBodyAttributes( $out, &$bodyAttrs ) { public function addToBodyAttributes( $out, &$bodyAttrs ) {
$classes = $out->getProperty( 'bodyClassName' ); $classes = $out->getProperty( 'bodyClassName' );

View File

@ -3,14 +3,9 @@
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki"> <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName"/> <exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName"/>
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment"/> <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment"/>
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag"/>
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment"/> <exclude name="MediaWiki.Commenting.FunctionComment.MissingParamComment"/>
<exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" /> <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
<exclude name="MediaWiki.Files.OneClassPerFile.MultipleFound" /> <exclude name="MediaWiki.Files.OneClassPerFile.MultipleFound" />
<exclude name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch"/>
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected"/>
<exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn"/>
</rule> </rule>
<file>.</file> <file>.</file>
<arg name="extensions" value="php,php5,inc"/> <arg name="extensions" value="php,php5,inc"/>