Improve PHP code style

* Remove phpcs rule exception
  MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment.
* Update or remove the comments not matching the rule.
* Fix double tab indention.

Change-Id: I68c43fe0db9384edfaaf64a155e904d629c7ade1
This commit is contained in:
Fomafix 2024-02-28 07:02:37 +00:00
parent 56bef8120f
commit e812a6b727
3 changed files with 10 additions and 10 deletions

View file

@ -1,8 +1,6 @@
<?xml version="1.0"?>
<ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment"/>
</rule>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
<file>.</file>
<arg name="extensions" value="php"/>
<arg name="encoding" value="UTF-8"/>

View file

@ -62,7 +62,7 @@ final class UserMenuDirector {
: $templateParser->processTemplate( 'ToggleList', [
'class' => 'minerva-user-menu',
'checkboxID' => $checkboxID,
'toggleID' => $toggleID, // See skin.mustache too.
'toggleID' => $toggleID,
'data-btn' => [
'tag-name' => 'label',
'data-icon' => [
@ -90,7 +90,8 @@ final class UserMenuDirector {
'label' => $this->localizer->msg( 'minerva-user-menu-button' )->escaped(),
],
'listID' => $group->getId(),
'listClass' => 'minerva-user-menu-list toggle-list__list--drop-down', // See ToggleList/*.less.
// See ToggleList/*.less.
'listClass' => 'minerva-user-menu-list toggle-list__list--drop-down',
'items' => $entries
] );
}

View file

@ -136,10 +136,10 @@ class SkinMinerva extends SkinMustache {
*/
private function getNotificationFallbackButton() {
return [
'icon' => 'bellOutline-base20',
'href' => SpecialPage::getTitleFor( 'Mytalk' )->getLocalURL(
[ 'returnto' => $this->getTitle()->getPrefixedText() ]
),
'icon' => 'bellOutline-base20',
'href' => SpecialPage::getTitleFor( 'Mytalk' )->getLocalURL(
[ 'returnto' => $this->getTitle()->getPrefixedText() ]
),
];
}
@ -538,7 +538,8 @@ class SkinMinerva extends SkinMustache {
case NS_FILE_TALK:
$msg = 'mobile-frontend-talk-back-to-filepage';
break;
default: // generic (all other NS)
default:
// generic (all other NS)
$msg = 'mobile-frontend-talk-back-to-page';
}
$subjectPage = $services->getNamespaceInfo()->getSubjectPage( $title );