Skip to content

Commit d813974

Browse files
committed
[PSR-2 Compliance] The Great @codingStandardsIgnoreFile Massacre
- revert files with nontrivial issues to mainline state for further investigation - Step 0. Run command: git checkout bbe3ee0 -- lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/SevenInterface.php lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/Reader/_files/ConfigDomMock.php lib/internal/Magento/Framework/Interception lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/AbstractCollectionTest.php lib/internal/Magento/Framework/Code/ dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/EntityAbstractTest.php dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php dev/tests/integration/testsuite/Magento/Framework/Interception/ dev/tests/static/get_github_changes.php setup/src/Magento/Setup/Test/Unit/Module/I18n/Parser/ParserTest.php app/code/Magento/Vault/Api/Data/PaymentTokenInterfaceFactory.php app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressTest.php dev/tests/integration/testsuite/Magento/Setup/Console/Command/_files/phrases/TestPhrases.php
1 parent c619404 commit d813974

File tree

42 files changed

+110
-54
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+110
-54
lines changed

app/code/Magento/Customer/Test/Unit/Model/ResourceModel/AddressTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// @codingStandardsIgnoreFile
78
namespace Magento\Customer\Test\Unit\Model\ResourceModel;
89

910
use Magento\Framework\Model\ResourceModel\Db\VersionControl\RelationComposite;
@@ -188,11 +189,7 @@ protected function prepareEavConfig()
188189
->method('getBackend')
189190
->willReturn(
190191
$this->getMock(
191-
\Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend::class,
192-
[],
193-
[],
194-
'',
195-
false
192+
\Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend::class, [], [], '', false
196193
)
197194
);
198195

app/code/Magento/Vault/Api/Data/PaymentTokenInterfaceFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
// @codingStandardsIgnoreFile
67
namespace Magento\Vault\Api\Data;
78

89
/**

dev/tests/integration/testsuite/Magento/Cms/Controller/RouterTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// @codingStandardsIgnoreFile
8+
79
namespace Magento\Cms\Controller;
810

911
/**
@@ -21,8 +23,7 @@ protected function setUp()
2123
$this->markTestIncomplete('MAGETWO-3393');
2224
$this->_model = new \Magento\Cms\Controller\Router(
2325
\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
24-
\Magento\Framework\App\ActionFactory::class
25-
),
26+
\Magento\Framework\App\ActionFactory::class),
2627
new \Magento\Framework\Event\ManagerInterfaceStub(
2728
$this->getMockForAbstractClass(\Magento\Framework\Event\InvokerInterface::class),
2829
$this->getMock(\Magento\Framework\Event\Config::class, [], [], '', false),

dev/tests/integration/testsuite/Magento/Framework/Interception/AbstractPlugin.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@ public function setUpInterceptionConfig($pluginConfig)
9494
$config->extend(
9595
[
9696
'preferences' => [
97-
\Magento\Framework\Interception\PluginListInterface::class => \Magento\Framework\Interception\PluginList\PluginList::class,
98-
\Magento\Framework\Interception\ChainInterface::class => \Magento\Framework\Interception\Chain\Chain::class,
97+
\Magento\Framework\Interception\PluginListInterface::class =>
98+
\Magento\Framework\Interception\PluginList\PluginList::class,
99+
\Magento\Framework\Interception\ChainInterface::class =>
100+
\Magento\Framework\Interception\Chain\Chain::class,
99101
],
100102
]
101103
);

dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/Intercepted.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* See COPYING.txt for license details.
66
*/
77

8+
// @codingStandardsIgnoreFile
9+
810
namespace Magento\Framework\Interception\Fixture;
911

1012
class Intercepted extends InterceptedParent implements InterceptedInterface

dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* See COPYING.txt for license details.
66
*/
77

8+
// @codingStandardsIgnoreFile
9+
810
namespace Magento\Framework\Interception\Fixture;
911

1012
interface InterceptedInterface

dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParent.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* See COPYING.txt for license details.
66
*/
77

8+
// @codingStandardsIgnoreFile
9+
810
namespace Magento\Framework\Interception\Fixture;
911

1012
class InterceptedParent implements InterceptedParentInterface

dev/tests/integration/testsuite/Magento/Framework/Interception/Fixture/InterceptedParentInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* See COPYING.txt for license details.
66
*/
77

8+
// @codingStandardsIgnoreFile
9+
810
namespace Magento\Framework\Interception\Fixture;
911

1012
interface InterceptedParentInterface

dev/tests/integration/testsuite/Magento/Framework/Interception/GeneralTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ class GeneralTest extends AbstractPlugin
1414
public function setUp()
1515
{
1616
$this->setUpInterceptionConfig(
17-
[\Magento\Framework\Interception\Fixture\InterceptedInterface::class => [
17+
[\Magento\Framework\Interception\Fixture\InterceptedInterface::class =>
18+
[
1819
'plugins' => [
1920
'first' => [
20-
'instance' => \Magento\Framework\Interception\Fixture\Intercepted\InterfacePlugin::class,
21+
'instance' =>
22+
\Magento\Framework\Interception\Fixture\Intercepted\InterfacePlugin::class,
2123
'sortOrder' => 10,
2224
],
2325
],
24-
], \Magento\Framework\Interception\Fixture\Intercepted::class => [
26+
], \Magento\Framework\Interception\Fixture\Intercepted::class =>
27+
[
2528
'plugins' => [
2629
'second' => [
2730
'instance' => \Magento\Framework\Interception\Fixture\Intercepted\Plugin::class,

dev/tests/integration/testsuite/Magento/ImportExport/Model/Export/EntityAbstractTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// @codingStandardsIgnoreFile
8+
79
/**
810
* Test for abstract export model
911
*/
@@ -102,7 +104,8 @@ public function testFilterAttributeCollection()
102104
/**
103105
* Stub abstract class which provide to change protected property "$_disabledAttrs" and test methods depended on it
104106
*/
105-
abstract class Stub_Magento_ImportExport_Model_Export_AbstractEntity extends \Magento\ImportExport\Model\Export\AbstractEntity
107+
abstract class Stub_Magento_ImportExport_Model_Export_AbstractEntity
108+
extends \Magento\ImportExport\Model\Export\AbstractEntity
106109
{
107110
public function __construct(
108111
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,

dev/tests/integration/testsuite/Magento/Setup/Console/Command/_files/phrases/TestPhrases.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// @codingStandardsIgnoreFile
8+
79
use Magento\Framework\Phrase;
810

911
/**

dev/tests/static/get_github_changes.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* See COPYING.txt for license details.
1010
*/
1111

12+
// @codingStandardsIgnoreFile
13+
1214
define(
1315
'USAGE',
1416
<<<USAGE
@@ -283,8 +285,7 @@ public function compareChanges($remoteAlias, $remoteBranch)
283285
$result = $this->call(sprintf('log %s/%s..HEAD --name-status --oneline', $remoteAlias, $remoteBranch));
284286

285287
return is_array($result)
286-
? $this->filterChangedFiles(
287-
$result,
288+
? $this->filterChangedFiles($result,
288289
$remoteAlias,
289290
$remoteBranch
290291
)
@@ -313,11 +314,8 @@ protected function filterChangedFiles(array $changes, $remoteAlias, $remoteBranc
313314
$fileName = trim($fileName);
314315
if (!in_array($fileName, $filteredChanges) && is_file($this->workTree . '/' . $fileName)) {
315316
$result = $this->call(sprintf(
316-
'diff HEAD %s/%s -- %s',
317-
$remoteAlias,
318-
$remoteBranch,
319-
$this->workTree . '/' . $fileName
320-
));
317+
'diff HEAD %s/%s -- %s', $remoteAlias, $remoteBranch, $this->workTree . '/' . $fileName)
318+
);
321319
if ($result) {
322320
if (!(isset($this->changedContentFiles[$fileName]))) {
323321
$this->setChangedContentFile($result, $fileName);

lib/internal/Magento/Framework/Code/Minifier/Adapter/Css/CSSmin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66
namespace Magento\Framework\Code\Minifier\Adapter\Css;
77

8-
use Magento\Framework\Code\Minifier\AdapterInterface;
98
use tubalmartin\CssMin\Minifier as CssMinLibrary;
9+
use Magento\Framework\Code\Minifier\AdapterInterface;
1010

1111
/**
1212
* Adapter for CSSmin library

lib/internal/Magento/Framework/Code/Test/Unit/GeneratedFilesTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ protected function setUp()
5050
*/
5151
public function testCleanGeneratedFiles($getPathMap, $isDirectoryMap, $deleteMap)
5252
{
53+
5354
$this->writeInterface
5455
->expects($this->any())
5556
->method('isExist')

lib/internal/Magento/Framework/Code/Test/Unit/Generator/InterfaceGeneratorTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,14 @@ public function generateDataProvider()
129129
'Non public interface method exception' => [
130130
'additionalMethodsData' => ['testMethod2' => ['visibility' => 'protected']],
131131
'expectedException' => '\LogicException',
132-
'expectedExceptionMessage' => "Interface method visibility can only be 'public'. Method name: 'testMethod2'"
132+
'expectedExceptionMessage' =>
133+
"Interface method visibility can only be 'public'. Method name: 'testMethod2'"
133134
],
134135
'"abstract" usage exception' => [
135136
'additionalMethodsData' => ['testMethod1' => ['abstract' => true]],
136137
'expectedException' => '\LogicException',
137-
'expectedExceptionMessage' => "'abstract' modifier cannot be used for interface method. Method name: 'testMethod1'"
138+
'expectedExceptionMessage' =>
139+
"'abstract' modifier cannot be used for interface method. Method name: 'testMethod1'"
138140
],
139141
];
140142
}

lib/internal/Magento/Framework/Code/Test/Unit/GeneratorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// @codingStandardsIgnoreFile
8+
79
namespace Magento\Framework\Code\Test\Unit;
810

911
use Magento\Framework\Code\Generator;

lib/internal/Magento/Framework/Code/Test/Unit/Reader/_files/ClassesForArgumentsReader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* See COPYING.txt for license details.
66
*/
77

8+
// @codingStandardsIgnoreFile
9+
810
class ClassWithAllArgumentTypes
911
{
1012
const DEFAULT_VALUE = 'Const Value';

lib/internal/Magento/Framework/Code/Test/Unit/Validator/ConstructorArgumentTypesTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// @codingStandardsIgnoreFile
8+
79
namespace Magento\Framework\Code\Test\Unit\Validator;
810

911
class ConstructorArgumentTypesTest extends \PHPUnit_Framework_TestCase

lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForArgumentSequence.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* See COPYING.txt for license details.
66
*/
77

8+
// @codingStandardsIgnoreFile
9+
810
namespace ArgumentSequence;
911

1012
class ContextObject implements \Magento\Framework\ObjectManager\ContextInterface

lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForConstructorIntegrity.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* See COPYING.txt for license details.
66
*/
77

8+
// @codingStandardsIgnoreFile
9+
810
class ClassA
911
{
1012
}

lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForContextAggregation.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* See COPYING.txt for license details.
66
*/
77

8+
// @codingStandardsIgnoreFile
9+
810
class ClassFirst
911
{
1012
}

lib/internal/Magento/Framework/Code/Test/Unit/Validator/_files/ClassesForTypeDuplication.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* See COPYING.txt for license details.
66
*/
77

8+
// @codingStandardsIgnoreFile
9+
810
namespace TypeDuplication;
911

1012
interface ArgumentInterface

lib/internal/Magento/Framework/Code/Test/Unit/ValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
namespace Magento\Framework\Code\Test\Unit;
77

8-
use Magento\Framework\Code\Validator;
8+
use \Magento\Framework\Code\Validator;
99

1010
class ValidatorTest extends \PHPUnit_Framework_TestCase
1111
{

lib/internal/Magento/Framework/Code/Test/Unit/_files/app/code/Magento/SomeModule/Model/SevenInterface.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// @codingStandardsIgnoreFile
8+
79
namespace Magento\SomeModule\Model;
810

11+
use Magento\SomeModule\Model\Two\Test as TestTwo;
912
use Magento\SomeModule\Model\Three\Test as TestThree;
1013

1114
/**
@@ -19,13 +22,14 @@
1922
*/
2023
interface SevenInterface extends \Magento\Framework\Code\Generator\CodeGeneratorInterface
2124
{
25+
2226
/**
2327
* Method short description
2428
*
2529
* @param array $data
2630
* @return TestThree
2731
*/
28-
public static function testMethod1(array &$data = []);
32+
public static function testMethod1(array &$data = array());
2933

3034
/**
3135
* Method short description
@@ -39,4 +43,6 @@ public static function testMethod1(array &$data = []);
3943
public function testMethod2($data = 'test_default', $flag = true);
4044

4145
public function testMethod3();
46+
47+
4248
}

lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// @codingStandardsIgnoreFile
8+
79
namespace Magento\Framework\Interception\Code\Generator;
810

911
class Interceptor extends \Magento\Framework\Code\Generator\EntityAbstract

lib/internal/Magento/Framework/Interception/Config/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
*/
88
namespace Magento\Framework\Interception\Config;
99

10-
use Magento\Framework\Serialize\Serializer\Serialize;
1110
use Magento\Framework\Serialize\SerializerInterface;
11+
use Magento\Framework\Serialize\Serializer\Serialize;
1212

1313
class Config implements \Magento\Framework\Interception\ConfigInterface
1414
{

lib/internal/Magento/Framework/Interception/ObjectManager/Config/Developer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
use Magento\Framework\Interception\ObjectManager\ConfigInterface;
1111
use Magento\Framework\ObjectManager\DefinitionInterface;
12-
use Magento\Framework\ObjectManager\InterceptableValidator;
1312
use Magento\Framework\ObjectManager\RelationsInterface;
13+
use Magento\Framework\ObjectManager\InterceptableValidator;
1414

1515
class Developer extends \Magento\Framework\ObjectManager\Config\Config implements ConfigInterface
1616
{

lib/internal/Magento/Framework/Interception/PluginList/PluginList.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
use Magento\Framework\Config\ReaderInterface;
1111
use Magento\Framework\Config\ScopeInterface;
1212
use Magento\Framework\Interception\DefinitionInterface;
13-
use Magento\Framework\Interception\ObjectManager\ConfigInterface;
1413
use Magento\Framework\Interception\PluginListInterface as InterceptionPluginList;
15-
use Magento\Framework\ObjectManager\DefinitionInterface as ClassDefinitions;
14+
use Magento\Framework\Interception\ObjectManager\ConfigInterface;
1615
use Magento\Framework\ObjectManager\RelationsInterface;
16+
use Magento\Framework\ObjectManager\DefinitionInterface as ClassDefinitions;
1717
use Magento\Framework\ObjectManagerInterface;
18-
use Magento\Framework\Serialize\Serializer\Serialize;
1918
use Magento\Framework\Serialize\SerializerInterface;
19+
use Magento\Framework\Serialize\Serializer\Serialize;
2020

2121
/**
2222
* Plugin config, provides list of plugins for a type

lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/InterceptorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// @codingStandardsIgnoreFile
8+
79
namespace Magento\Framework\Interception\Test\Unit\Code\Generator;
810

911
class InterceptorTest extends \PHPUnit_Framework_TestCase

lib/internal/Magento/Framework/Interception/Test/Unit/Code/InterfaceValidatorTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// @codingStandardsIgnoreFile
8+
79
namespace Magento\Framework\Interception\Test\Unit\Code;
810

9-
use Magento\Framework\Interception\Code\InterfaceValidator;
11+
use \Magento\Framework\Interception\Code\InterfaceValidator;
1012

1113
class InterfaceValidatorTest extends \PHPUnit_Framework_TestCase
1214
{

lib/internal/Magento/Framework/Interception/Test/Unit/Config/ConfigTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
// @codingStandardsIgnoreFile
67
namespace Magento\Framework\Interception\Test\Unit\Config;
78

89
use Magento\Framework\Serialize\SerializerInterface;

0 commit comments

Comments
 (0)