Improve function and property documentation

Change-Id: I16cc3831cd4c917aa679c7f7c535b97e498291a7
This commit is contained in:
Umherirrender 2021-01-15 21:57:04 +01:00
parent fbd373b5d7
commit 09b331ab83
6 changed files with 17 additions and 11 deletions

View file

@ -1,7 +1,6 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.Commenting.PropertyDocumentation.WrongStyle" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment"/>
</rule>
<file>.</file>

View file

@ -63,10 +63,10 @@ final class MinervaPagePermissions implements IMinervaPagePermissions {
*/
private $languagesHelper;
/**
* @var PermissionManager MediaWiki Core PermissionManager
*/
private $permissionManager;
/**
* @var PermissionManager MediaWiki Core PermissionManager
*/
private $permissionManager;
/**
* Initialize internal Minerva Permissions system

View file

@ -37,9 +37,11 @@ final class SkinOptions {
public const PERSONAL_MENU = 'personalMenu';
public const SIMPLIFIED_TALK = 'simplifiedTalk';
/** @var array skin specific options, initialized with default values */
// Note stable skin options default to true for desktop-Minerva and are expected to be
// overridden on mobile.
/**
* Note stable skin options default to true for desktop-Minerva and are expected to be
* overridden on mobile.
* @var array skin specific options, initialized with default values
*/
private $skinOptions = [
self::BETA_MODE => false,
self::SHOW_DONATE => true,

View file

@ -11,6 +11,7 @@ use MediaWiki\Minerva\Menu\Group;
* @coversDefaultClass \MediaWiki\Minerva\Menu\Group
*/
class GroupTest extends \MediaWikiTestCase {
/** @var string[] */
private $homeComponent = [
'text' => 'Home',
'href' => '/Main_page',
@ -18,6 +19,7 @@ class GroupTest extends \MediaWikiTestCase {
'data-event-name' => 'home',
];
/** @var string[] */
private $nearbyComponent = [
'text' => 'Nearby',
'href' => '/wiki/Special:Nearby',

View file

@ -17,6 +17,9 @@ use Wikimedia\TestingAccessWrapper;
class SkinMinervaTest extends MediaWikiTestCase {
private const OPTIONS_MODULE = 'skins.minerva.options';
/**
* @param array $options
*/
private function overrideSkinOptions( $options ) {
$mockOptions = new SkinOptions();
$mockOptions->setMultiple( $options );
@ -109,9 +112,9 @@ class SkinMinervaTest extends MediaWikiTestCase {
/**
* Test whether the font changer module is correctly added to the list context modules.
*
* @covers ::getContextSpecificModules
* @covers ::getContextSpecificModules
* @dataProvider provideGetContextSpecificModules
* @param mixed $categoryLinks whether category link feature is enabled
* @param mixed $categoryLinks whether category link feature is enabled
* @param string $moduleName Module name that is being tested
* @param bool $expected Whether the module is expected to be returned by the function being tested
*/

View file

@ -29,7 +29,7 @@ class LanguagesHelperTest extends \MediaWikiUnitTestCase {
/**
* Build test Title object
* @param $hasVariants
* @param bool $hasVariants
* @param Invocation|null $matcher
* @return \Title
*/