Merge "build: Updating mediawiki/mediawiki-codesniffer to 0.9.0"

This commit is contained in:
jenkins-bot 2017-06-20 11:05:13 +00:00 committed by Gerrit Code Review
commit 34dcf587ac
7 changed files with 18 additions and 17 deletions

View file

@ -1,7 +1,7 @@
{ {
"require-dev": { "require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2", "jakub-onderka/php-parallel-lint": "0.9.2",
"mediawiki/mediawiki-codesniffer": "0.7.2", "mediawiki/mediawiki-codesniffer": "0.9.0",
"jakub-onderka/php-console-highlighter": "0.3.2" "jakub-onderka/php-console-highlighter": "0.3.2"
}, },
"scripts": { "scripts": {

View file

@ -1,6 +1,5 @@
<?php <?php
/* /** This file is part of the MediaWiki extension Popups.
* This file is part of the MediaWiki extension Popups.
* *
* Popups is free software: you can redistribute it and/or modify * Popups is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View file

@ -1,15 +1,22 @@
<?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.FunctionComment.MissingParamComment" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
<exclude name="MediaWiki.Commenting.FunctionComment.ParamNameNoMatch" />
<exclude name="MediaWiki.FunctionComment.Missing.Public" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
</rule>
<file>.</file> <file>.</file>
<arg name="extensions" value="php,php5,inc"/> <arg name="extensions" value="php,php5,inc" />
<arg name="encoding" value="utf8"/> <arg name="encoding" value="utf8" />
<exclude-pattern>vendor</exclude-pattern> <exclude-pattern>vendor</exclude-pattern>
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing"> <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
<properties> <properties>
<property name="equalsSpacing" value="1" /> <property name="equalsSpacing" value="1" />
<property name="requiredSpacesAfterOpen" value="1"/> <property name="requiredSpacesAfterOpen" value="1" />
<property name="requiredSpacesBeforeClose" value="1" /> <property name="requiredSpacesBeforeClose" value="1" />
</properties> </properties>
</rule> </rule>

View file

@ -18,7 +18,7 @@
* @file * @file
* @ingroup extensions * @ingroup extensions
*/ */
require_once ( 'PopupsContextTestWrapper.php' ); require_once 'PopupsContextTestWrapper.php';
use Popups\PopupsContext; use Popups\PopupsContext;
@ -66,7 +66,7 @@ class PopupsContextTest extends MediaWikiTestCase {
->will( $this->returnValue( $configMock ) ); ->will( $this->returnValue( $configMock ) );
$mwServices = $this->overrideMwServices(); $mwServices = $this->overrideMwServices();
$mwServices->redefineService( 'ConfigFactory', function() use ( $configFactoryMock ) { $mwServices->redefineService( 'ConfigFactory', function () use ( $configFactoryMock ) {
return $configFactoryMock; return $configFactoryMock;
} ); } );
@ -207,7 +207,6 @@ class PopupsContextTest extends MediaWikiTestCase {
*/ */
public function testAreDependenciesMet( $betaOn, $textExtracts, $pageImages, public function testAreDependenciesMet( $betaOn, $textExtracts, $pageImages,
$betaFeatures, $expected ) { $betaFeatures, $expected ) {
$this->setMwGlobals( [ $this->setMwGlobals( [
"wgPopupsBetaFeature" => $betaOn "wgPopupsBetaFeature" => $betaOn
] ); ] );

View file

@ -43,7 +43,6 @@ class PopupsContextTestWrapper extends PopupsContext {
*/ */
public function __construct( Config $config, ExtensionRegistry $extensionRegistry, public function __construct( Config $config, ExtensionRegistry $extensionRegistry,
PopupsGadgetsIntegration $gadgetsIntegration = null ) { PopupsGadgetsIntegration $gadgetsIntegration = null ) {
$gadgetsIntegration = $gadgetsIntegration ? $gadgetsIntegration : $gadgetsIntegration = $gadgetsIntegration ? $gadgetsIntegration :
new PopupsGadgetsIntegration( $config, $extensionRegistry ); new PopupsGadgetsIntegration( $config, $extensionRegistry );

View file

@ -1,6 +1,5 @@
<?php <?php
/* /** This file is part of the MediaWiki extension Popups.
* This file is part of the MediaWiki extension Popups.
* *
* Popups is free software: you can redistribute it and/or modify * Popups is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -27,8 +26,7 @@ use Popups\PopupsGadgetsIntegration;
* @group Popups * @group Popups
* @coversDefaultClass Popups\PopupsGadgetsIntegration * @coversDefaultClass Popups\PopupsGadgetsIntegration
*/ */
class PopupsGadgetsIntegrationTest extends MediaWikiTestCase class PopupsGadgetsIntegrationTest extends MediaWikiTestCase {
{
/** /**
* Gadget name for testing * Gadget name for testing
*/ */
@ -233,7 +231,6 @@ class PopupsGadgetsIntegrationTest extends MediaWikiTestCase
*/ */
private function executeConflictsWithNavPopupsGadgetSafeCheck( $user, $config, $repoMock, private function executeConflictsWithNavPopupsGadgetSafeCheck( $user, $config, $repoMock,
$expected ) { $expected ) {
$origGadgetsRepo = GadgetRepo::singleton(); $origGadgetsRepo = GadgetRepo::singleton();
GadgetRepo::setSingleton( $repoMock ); GadgetRepo::setSingleton( $repoMock );

View file

@ -18,7 +18,7 @@
* @file * @file
* @ingroup extensions * @ingroup extensions
*/ */
require_once ( 'PopupsContextTestWrapper.php' ); require_once 'PopupsContextTestWrapper.php';
use Popups\PopupsContext; use Popups\PopupsContext;
use Popups\PopupsHooks; use Popups\PopupsHooks;