mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-11 16:38:20 +00:00
Improve function and property documentation
Change-Id: I16cc3831cd4c917aa679c7f7c535b97e498291a7
This commit is contained in:
parent
fbd373b5d7
commit
09b331ab83
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -29,7 +29,7 @@ class LanguagesHelperTest extends \MediaWikiUnitTestCase {
|
|||
|
||||
/**
|
||||
* Build test Title object
|
||||
* @param $hasVariants
|
||||
* @param bool $hasVariants
|
||||
* @param Invocation|null $matcher
|
||||
* @return \Title
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue