diff --git a/MonoBookTemplate.php b/MonoBookTemplate.php index 51670f7..6625e52 100644 --- a/MonoBookTemplate.php +++ b/MonoBookTemplate.php @@ -60,7 +60,9 @@ class MonoBookTemplate extends BaseTemplate { $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode(); $this->text( 'pageLanguage' ); ?>">html( 'title' ) ?> - +
msg( 'tagline' ) ?>
@@ -126,27 +128,27 @@ class MonoBookTemplate extends BaseTemplate { if ( !$this->getSkin()->getUser()->isLoggedIn() && User::groupHasPermission( '*', 'edit' ) ) { - echo Html::rawElement( 'li', array( + echo Html::rawElement( 'li', [ 'id' => 'pt-anonuserpage' - ), $this->getMsg( 'notloggedin' )->escaped() ); + ], $this->getMsg( 'notloggedin' )->escaped() ); } foreach ( $personalTools as $key => $item ) { ?> makeListItem( $key, $item ); ?>
@@ -250,19 +252,19 @@ class MonoBookTemplate extends BaseTemplate {
- makeSearchInput( array( 'id' => 'searchInput' ) ); ?> + makeSearchInput( [ 'id' => 'searchInput' ] ); ?> makeSearchButton( 'go', - array( 'id' => 'searchGoButton', 'class' => 'searchButton' ) + [ 'id' => 'searchGoButton', 'class' => 'searchButton' ] ); if ( $this->config->get( 'UseTwoButtonsSearchForm' ) ) { ?>  makeSearchButton( 'fulltext', - array( 'id' => 'mw-searchButton', 'class' => 'searchButton' ) + [ 'id' => 'mw-searchButton', 'class' => 'searchButton' ] ); } else { ?> @@ -318,8 +320,8 @@ class MonoBookTemplate extends BaseTemplate { renderAfterPortlet( 'tb' ); ?> @@ -359,11 +361,11 @@ class MonoBookTemplate extends BaseTemplate { * @param array|string $cont */ function customBox( $bar, $cont ) { - $portletAttribs = array( + $portletAttribs = [ 'class' => 'generated-sidebar portlet', 'id' => Sanitizer::escapeId( "p-$bar" ), 'role' => 'navigation' - ); + ]; $tooltip = Linker::titleAttrib( "p-$bar" ); if ( $tooltip !== false ) { diff --git a/SkinMonoBook.php b/SkinMonoBook.php index 0546e75..3c3437b 100644 --- a/SkinMonoBook.php +++ b/SkinMonoBook.php @@ -40,11 +40,11 @@ class SkinMonoBook extends SkinTemplate { function setupSkinUserCss( OutputPage $out ) { parent::setupSkinUserCss( $out ); - $out->addModuleStyles( array( + $out->addModuleStyles( [ 'mediawiki.skinning.interface', 'mediawiki.skinning.content.externallinks', 'skins.monobook.styles' - ) ); + ] ); // TODO: Migrate all of these $out->addStyle( $this->stylename . '/IE60Fixes.css', 'screen', 'IE 6' ); diff --git a/composer.json b/composer.json index 8965257..1ef4ea4 100644 --- a/composer.json +++ b/composer.json @@ -1,11 +1,14 @@ { "require-dev": { "jakub-onderka/php-parallel-lint": "0.9", - "jakub-onderka/php-console-highlighter": "0.3.2" + "jakub-onderka/php-console-highlighter": "0.3.2", + "mediawiki/mediawiki-codesniffer": "0.7.2" }, "scripts": { + "fix": "phpcbf", "test": [ - "parallel-lint . --exclude node_modules --exclude vendor" + "parallel-lint . --exclude node_modules --exclude vendor", + "phpcs -p -s" ] } } diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..ede6c5d --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,9 @@ + + + + . + + + vendor + node_modules +