mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-30 18:34:40 +00:00
Merge "build: Updating mediawiki/mediawiki-codesniffer to 0.9.0"
This commit is contained in:
commit
34dcf587ac
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"require-dev": {
|
||||
"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"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
15
phpcs.xml
15
phpcs.xml
|
@ -1,15 +1,22 @@
|
|||
<?xml version="1.0"?>
|
||||
<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>
|
||||
<arg name="extensions" value="php,php5,inc"/>
|
||||
<arg name="encoding" value="utf8"/>
|
||||
<arg name="extensions" value="php,php5,inc" />
|
||||
<arg name="encoding" value="utf8" />
|
||||
<exclude-pattern>vendor</exclude-pattern>
|
||||
|
||||
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
|
||||
<properties>
|
||||
<property name="equalsSpacing" value="1" />
|
||||
<property name="requiredSpacesAfterOpen" value="1"/>
|
||||
<property name="requiredSpacesAfterOpen" value="1" />
|
||||
<property name="requiredSpacesBeforeClose" value="1" />
|
||||
</properties>
|
||||
</rule>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* @file
|
||||
* @ingroup extensions
|
||||
*/
|
||||
require_once ( 'PopupsContextTestWrapper.php' );
|
||||
require_once 'PopupsContextTestWrapper.php';
|
||||
|
||||
use Popups\PopupsContext;
|
||||
|
||||
|
@ -66,7 +66,7 @@ class PopupsContextTest extends MediaWikiTestCase {
|
|||
->will( $this->returnValue( $configMock ) );
|
||||
|
||||
$mwServices = $this->overrideMwServices();
|
||||
$mwServices->redefineService( 'ConfigFactory', function() use ( $configFactoryMock ) {
|
||||
$mwServices->redefineService( 'ConfigFactory', function () use ( $configFactoryMock ) {
|
||||
return $configFactoryMock;
|
||||
} );
|
||||
|
||||
|
@ -207,7 +207,6 @@ class PopupsContextTest extends MediaWikiTestCase {
|
|||
*/
|
||||
public function testAreDependenciesMet( $betaOn, $textExtracts, $pageImages,
|
||||
$betaFeatures, $expected ) {
|
||||
|
||||
$this->setMwGlobals( [
|
||||
"wgPopupsBetaFeature" => $betaOn
|
||||
] );
|
||||
|
|
|
@ -43,7 +43,6 @@ class PopupsContextTestWrapper extends PopupsContext {
|
|||
*/
|
||||
public function __construct( Config $config, ExtensionRegistry $extensionRegistry,
|
||||
PopupsGadgetsIntegration $gadgetsIntegration = null ) {
|
||||
|
||||
$gadgetsIntegration = $gadgetsIntegration ? $gadgetsIntegration :
|
||||
new PopupsGadgetsIntegration( $config, $extensionRegistry );
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -27,8 +26,7 @@ use Popups\PopupsGadgetsIntegration;
|
|||
* @group Popups
|
||||
* @coversDefaultClass Popups\PopupsGadgetsIntegration
|
||||
*/
|
||||
class PopupsGadgetsIntegrationTest extends MediaWikiTestCase
|
||||
{
|
||||
class PopupsGadgetsIntegrationTest extends MediaWikiTestCase {
|
||||
/**
|
||||
* Gadget name for testing
|
||||
*/
|
||||
|
@ -233,7 +231,6 @@ class PopupsGadgetsIntegrationTest extends MediaWikiTestCase
|
|||
*/
|
||||
private function executeConflictsWithNavPopupsGadgetSafeCheck( $user, $config, $repoMock,
|
||||
$expected ) {
|
||||
|
||||
$origGadgetsRepo = GadgetRepo::singleton();
|
||||
GadgetRepo::setSingleton( $repoMock );
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* @file
|
||||
* @ingroup extensions
|
||||
*/
|
||||
require_once ( 'PopupsContextTestWrapper.php' );
|
||||
require_once 'PopupsContextTestWrapper.php';
|
||||
use Popups\PopupsContext;
|
||||
use Popups\PopupsHooks;
|
||||
|
||||
|
|
Loading…
Reference in a new issue