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"?> <?xml version="1.0"?>
<ruleset> <ruleset>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki"> <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment"/>
</rule>
<file>.</file> <file>.</file>
<arg name="extensions" value="php"/> <arg name="extensions" value="php"/>
<arg name="encoding" value="UTF-8"/> <arg name="encoding" value="UTF-8"/>

View file

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

View file

@ -538,7 +538,8 @@ class SkinMinerva extends SkinMustache {
case NS_FILE_TALK: case NS_FILE_TALK:
$msg = 'mobile-frontend-talk-back-to-filepage'; $msg = 'mobile-frontend-talk-back-to-filepage';
break; break;
default: // generic (all other NS) default:
// generic (all other NS)
$msg = 'mobile-frontend-talk-back-to-page'; $msg = 'mobile-frontend-talk-back-to-page';
} }
$subjectPage = $services->getNamespaceInfo()->getSubjectPage( $title ); $subjectPage = $services->getNamespaceInfo()->getSubjectPage( $title );