mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 06:13:54 +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"?>
|
<?xml version="1.0"?>
|
||||||
<ruleset>
|
<ruleset>
|
||||||
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
||||||
<exclude name="MediaWiki.Commenting.PropertyDocumentation.WrongStyle" />
|
|
||||||
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment"/>
|
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment"/>
|
||||||
</rule>
|
</rule>
|
||||||
<file>.</file>
|
<file>.</file>
|
||||||
|
|
|
@ -63,10 +63,10 @@ final class MinervaPagePermissions implements IMinervaPagePermissions {
|
||||||
*/
|
*/
|
||||||
private $languagesHelper;
|
private $languagesHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var PermissionManager MediaWiki Core PermissionManager
|
* @var PermissionManager MediaWiki Core PermissionManager
|
||||||
*/
|
*/
|
||||||
private $permissionManager;
|
private $permissionManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize internal Minerva Permissions system
|
* Initialize internal Minerva Permissions system
|
||||||
|
|
|
@ -37,9 +37,11 @@ final class SkinOptions {
|
||||||
public const PERSONAL_MENU = 'personalMenu';
|
public const PERSONAL_MENU = 'personalMenu';
|
||||||
public const SIMPLIFIED_TALK = 'simplifiedTalk';
|
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
|
* Note stable skin options default to true for desktop-Minerva and are expected to be
|
||||||
// overridden on mobile.
|
* overridden on mobile.
|
||||||
|
* @var array skin specific options, initialized with default values
|
||||||
|
*/
|
||||||
private $skinOptions = [
|
private $skinOptions = [
|
||||||
self::BETA_MODE => false,
|
self::BETA_MODE => false,
|
||||||
self::SHOW_DONATE => true,
|
self::SHOW_DONATE => true,
|
||||||
|
|
|
@ -11,6 +11,7 @@ use MediaWiki\Minerva\Menu\Group;
|
||||||
* @coversDefaultClass \MediaWiki\Minerva\Menu\Group
|
* @coversDefaultClass \MediaWiki\Minerva\Menu\Group
|
||||||
*/
|
*/
|
||||||
class GroupTest extends \MediaWikiTestCase {
|
class GroupTest extends \MediaWikiTestCase {
|
||||||
|
/** @var string[] */
|
||||||
private $homeComponent = [
|
private $homeComponent = [
|
||||||
'text' => 'Home',
|
'text' => 'Home',
|
||||||
'href' => '/Main_page',
|
'href' => '/Main_page',
|
||||||
|
@ -18,6 +19,7 @@ class GroupTest extends \MediaWikiTestCase {
|
||||||
'data-event-name' => 'home',
|
'data-event-name' => 'home',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/** @var string[] */
|
||||||
private $nearbyComponent = [
|
private $nearbyComponent = [
|
||||||
'text' => 'Nearby',
|
'text' => 'Nearby',
|
||||||
'href' => '/wiki/Special:Nearby',
|
'href' => '/wiki/Special:Nearby',
|
||||||
|
|
|
@ -17,6 +17,9 @@ use Wikimedia\TestingAccessWrapper;
|
||||||
class SkinMinervaTest extends MediaWikiTestCase {
|
class SkinMinervaTest extends MediaWikiTestCase {
|
||||||
private const OPTIONS_MODULE = 'skins.minerva.options';
|
private const OPTIONS_MODULE = 'skins.minerva.options';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $options
|
||||||
|
*/
|
||||||
private function overrideSkinOptions( $options ) {
|
private function overrideSkinOptions( $options ) {
|
||||||
$mockOptions = new SkinOptions();
|
$mockOptions = new SkinOptions();
|
||||||
$mockOptions->setMultiple( $options );
|
$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.
|
* Test whether the font changer module is correctly added to the list context modules.
|
||||||
*
|
*
|
||||||
* @covers ::getContextSpecificModules
|
* @covers ::getContextSpecificModules
|
||||||
* @dataProvider provideGetContextSpecificModules
|
* @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 string $moduleName Module name that is being tested
|
||||||
* @param bool $expected Whether the module is expected to be returned by the function 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
|
* Build test Title object
|
||||||
* @param $hasVariants
|
* @param bool $hasVariants
|
||||||
* @param Invocation|null $matcher
|
* @param Invocation|null $matcher
|
||||||
* @return \Title
|
* @return \Title
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue