Skip to content

Commit 24e6743

Browse files
committed
- Ran phpcbf over all files in order to automatically fix coding standards
1 parent 7d7c327 commit 24e6743

File tree

126 files changed

+411
-242
lines changed

Some content is hidden

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

126 files changed

+411
-242
lines changed

lib/internal/Magento/Framework/Api/DataObjectHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ protected function setComplexValue(
176176
if (is_subclass_of($returnType, \Magento\Framework\Api\ExtensibleDataInterface::class)) {
177177
$object = $this->objectFactory->create($returnType, []);
178178
$this->populateWithArray($object, $value, $returnType);
179-
} else if (is_subclass_of($returnType, \Magento\Framework\Api\ExtensionAttributesInterface::class)) {
179+
} elseif (is_subclass_of($returnType, \Magento\Framework\Api\ExtensionAttributesInterface::class)) {
180180
foreach ($value as $extensionAttributeKey => $extensionAttributeValue) {
181181
$extensionAttributeGetterMethodName
182182
= 'get' . \Magento\Framework\Api\SimpleDataObjectConverter::snakeCaseToUpperCamelCase(

lib/internal/Magento/Framework/Api/ExtensibleDataObjectConverter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function toNestedArray(
4848
if (!empty($dataObjectArray[AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY])) {
4949
/** @var AttributeValue[] $customAttributes */
5050
$customAttributes = $dataObjectArray[AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY];
51-
unset ($dataObjectArray[AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY]);
51+
unset($dataObjectArray[AbstractExtensibleObject::CUSTOM_ATTRIBUTES_KEY]);
5252
foreach ($customAttributes as $attributeValue) {
5353
if (!in_array($attributeValue[AttributeValue::ATTRIBUTE_CODE], $skipAttributes)) {
5454
$dataObjectArray[$attributeValue[AttributeValue::ATTRIBUTE_CODE]]
@@ -59,7 +59,7 @@ public function toNestedArray(
5959
if (!empty($dataObjectArray[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY])) {
6060
/** @var array $extensionAttributes */
6161
$extensionAttributes = $dataObjectArray[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY];
62-
unset ($dataObjectArray[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]);
62+
unset($dataObjectArray[ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY]);
6363
foreach ($extensionAttributes as $attributeKey => $attributeValue) {
6464
if (!in_array($attributeKey, $skipAttributes)) {
6565
$dataObjectArray[$attributeKey] = $attributeValue;

lib/internal/Magento/Framework/Api/SearchCriteria/CollectionProcessor/JoinProcessor.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
namespace Magento\Framework\Api\SearchCriteria\CollectionProcessor;
77

8-
98
use Magento\Framework\Api\SearchCriteria\CollectionProcessor\JoinProcessor\CustomJoinInterface;
109
use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface;
1110
use Magento\Framework\Api\SearchCriteriaInterface;

lib/internal/Magento/Framework/Api/SortOrder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function setDirection($direction)
7878

7979
/**
8080
* Validate direction argument ASC or DESC
81-
*
81+
*
8282
* @param mixed $direction
8383
* @return null
8484
* @throws InputException

lib/internal/Magento/Framework/Api/SortOrderBuilder.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
namespace Magento\Framework\Api;
88

9-
109
/**
1110
* Builder for sort order data object.
1211
* @method SortOrder create()

lib/internal/Magento/Framework/Api/Test/Unit/Api/ImageProcessorTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ protected function setUp()
6565
->method('getDirectoryWrite')
6666
->willReturn($this->directoryWriteMock);
6767
$this->contentValidatorMock = $this->getMockBuilder(
68-
\Magento\Framework\Api\ImageContentValidatorInterface::class)
68+
\Magento\Framework\Api\ImageContentValidatorInterface::class
69+
)
6970
->disableOriginalConstructor()
7071
->getMock();
7172
$this->dataObjectHelperMock = $this->getMockBuilder(\Magento\Framework\Api\DataObjectHelper::class)

lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/GenerateSearchResultsTest.php

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

8-
98
/**
109
* Class SearchResultTest
1110
*/

lib/internal/Magento/Framework/Api/Test/Unit/DataObjectHelperTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ public function testPopulateWithArrayWithSimpleAttributes()
142142

143143
$this->dataObjectHelper->populateWithArray(
144144
$addressDataObject,
145-
$data, \Magento\Customer\Api\Data\AddressInterface::class
145+
$data,
146+
\Magento\Customer\Api\Data\AddressInterface::class
146147
);
147148

148149
$this->assertEquals($id, $addressDataObject->getId());
@@ -196,7 +197,8 @@ public function testPopulateWithArrayWithCustomAttribute()
196197
->willReturn($customAttribute);
197198
$this->dataObjectHelper->populateWithArray(
198199
$addressDataObject,
199-
$data, \Magento\Customer\Api\Data\AddressInterface::class
200+
$data,
201+
\Magento\Customer\Api\Data\AddressInterface::class
200202
);
201203

202204
$this->assertEquals($id, $addressDataObject->getId());
@@ -258,7 +260,8 @@ public function testPopulateWithArrayWithCustomAttributes()
258260
->willReturn($customAttribute);
259261
$this->dataObjectHelper->populateWithArray(
260262
$addressDataObject,
261-
$data, \Magento\Customer\Api\Data\AddressInterface::class
263+
$data,
264+
\Magento\Customer\Api\Data\AddressInterface::class
262265
);
263266

264267
$this->assertEquals($id, $addressDataObject->getId());

lib/internal/Magento/Framework/Api/Uploader.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class Uploader extends \Magento\Framework\File\Uploader
1717
*/
1818
public function __construct()
1919
{
20-
2120
}
2221

2322
/**

lib/internal/Magento/Framework/App/DeploymentConfig/Writer.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ public function saveConfig(array $data, $override = false)
101101

102102
foreach ($data as $fileKey => $config) {
103103
if (isset($paths[$fileKey])) {
104-
105104
if ($this->filesystem->getDirectoryWrite(DirectoryList::CONFIG)->isExist($paths[$fileKey])) {
106105
$currentData = $this->reader->load($fileKey);
107106
if ($override) {

lib/internal/Magento/Framework/App/Response/HttpInterface.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function setHeader($name, $value, $replace = false);
3838

3939
/**
4040
* Get header value by name
41-
*
41+
*
4242
* Returns first found header by passed name.
4343
* If header with specified name was not found returns false.
4444
*
@@ -57,14 +57,14 @@ public function clearHeader($name);
5757

5858
/**
5959
* Allow granular setting of HTTP response status code, version and phrase
60-
*
60+
*
6161
* For example, a HTTP response as the following:
6262
* HTTP 200 1.1 Your response has been served
6363
* Can be set with the arguments
6464
* $httpCode = 200
6565
* $version = 1.1
6666
* $phrase = 'Your response has been served'
67-
*
67+
*
6868
* @param int|string $httpCode
6969
* @param null|int|string $version
7070
* @param null|string $phrase
@@ -74,17 +74,17 @@ public function setStatusHeader($httpCode, $version = null, $phrase = null);
7474

7575
/**
7676
* Append the given string to the response body
77-
*
77+
*
7878
* @param string $value
7979
* @return self
8080
*/
8181
public function appendBody($value);
8282

8383
/**
8484
* Set the response body to the given value
85-
*
85+
*
8686
* Any previously set contents will be replaced by the new content.
87-
*
87+
*
8888
* @param string $value
8989
* @return self
9090
*/

lib/internal/Magento/Framework/App/SetupInfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function getProjectUrl()
111111
$isProjectInDocRoot = false !== strpos($this->projectRoot . '/', $this->docRoot . '/');
112112
if (empty($this->server['HTTP_HOST'])) {
113113
return '';
114-
} else if (!$isProjectInDocRoot) {
114+
} elseif (!$isProjectInDocRoot) {
115115
return 'http://' . $this->server['HTTP_HOST'] . '/';
116116
}
117117
return 'http://' . $this->server['HTTP_HOST'] . substr($this->projectRoot . '/', strlen($this->docRoot));

lib/internal/Magento/Framework/App/Test/Unit/Action/ActionTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ public function execute()
195195
ActionTest::ACTION_NAME,
196196
ActionTest::CONTROLLER_NAME,
197197
ActionTest::MODULE_NAME,
198-
ActionTest::$actionParams);
198+
ActionTest::$actionParams
199+
);
199200
$this->_redirect(ActionTest::FULL_ACTION_NAME, ActionTest::$actionParams);
200201
return;
201202
}

lib/internal/Magento/Framework/App/Test/Unit/AreaListTest.php

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ public function testGetCodeByFrontNameWhenAreaDoesNotContainFrontName()
4646
$this->_resolverFactory->expects(
4747
$this->any()
4848
)->method(
49-
'create'
50-
)->with(
51-
'testValue'
52-
)->will(
53-
$this->returnValue($resolverMock)
54-
);
49+
'create'
50+
)->with(
51+
'testValue'
52+
)->will(
53+
$this->returnValue($resolverMock)
54+
);
5555

5656
$actual = $this->_model->getCodeByFrontName('testFrontName');
5757
$this->assertEquals($expected, $actual);
@@ -104,7 +104,10 @@ public function testGetCodes()
104104
{
105105
$areas = ['area1' => 'value1', 'area2' => 'value2'];
106106
$this->_model = new \Magento\Framework\App\AreaList(
107-
$this->objectManagerMock, $this->_resolverFactory, $areas, ''
107+
$this->objectManagerMock,
108+
$this->_resolverFactory,
109+
$areas,
110+
''
108111
);
109112

110113
$expected = array_keys($areas);
@@ -116,7 +119,10 @@ public function testGetDefaultRouter()
116119
{
117120
$areas = ['area1' => ['router' => 'value1'], 'area2' => 'value2'];
118121
$this->_model = new \Magento\Framework\App\AreaList(
119-
$this->objectManagerMock, $this->_resolverFactory, $areas, ''
122+
$this->objectManagerMock,
123+
$this->_resolverFactory,
124+
$areas,
125+
''
120126
);
121127

122128
$this->assertEquals($this->_model->getDefaultRouter('area1'), $areas['area1']['router']);
@@ -129,7 +135,10 @@ public function testGetArea()
129135
$objectManagerMock = $this->getObjectManagerMockGetArea();
130136
$areas = ['area1' => ['router' => 'value1'], 'area2' => 'value2'];
131137
$this->_model = new AreaList(
132-
$objectManagerMock, $this->_resolverFactory, $areas, ''
138+
$objectManagerMock,
139+
$this->_resolverFactory,
140+
$areas,
141+
''
133142
);
134143

135144
$this->assertEquals($this->_model->getArea('testArea'), 'ok');

lib/internal/Magento/Framework/App/Test/Unit/Cache/FlushCacheByTagsTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ protected function setUp()
4040
['test'],
4141
$this->tagResolver
4242
);
43-
4443
}
4544

4645
public function testAroundSave()

lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/FactoryTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
namespace Magento\Framework\App\Test\Unit\Cache\Frontend;
77

8-
98
class FactoryTest extends \PHPUnit_Framework_TestCase
109
{
1110
public static function setUpBeforeClass()

lib/internal/Magento/Framework/App/Test/Unit/ObjectManager/ConfigLoaderTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ protected function setUp()
5656

5757
$this->_cacheMock = $this->getMock(\Magento\Framework\App\Cache\Type\Config::class, [], [], '', false);
5858
$this->_model = new \Magento\Framework\App\ObjectManager\ConfigLoader(
59-
$this->_cacheMock, $this->_readerFactoryMock
59+
$this->_cacheMock,
60+
$this->_readerFactoryMock
6061
);
6162
}
6263

lib/internal/Magento/Framework/App/Test/Unit/ObjectManager/FactoryStub.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,5 @@ public function create($requestedType, array $arguments = [])
4747
*/
4848
public function setObjectManager(ObjectManagerInterface $objectManager)
4949
{
50-
5150
}
5251
}

lib/internal/Magento/Framework/App/Test/Unit/Request/HttpTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private function getModel($uri = null, $appConfigMock = true)
9797
);
9898

9999
if ($appConfigMock) {
100-
$configMock = $this->getMock(\Magento\Framework\App\Config::class, [], [], '' , false);
100+
$configMock = $this->getMock(\Magento\Framework\App\Config::class, [], [], '', false);
101101
$this->objectManager->setBackwardCompatibleProperty($model, 'appConfig', $configMock);
102102
}
103103

lib/internal/Magento/Framework/App/Test/Unit/Response/HttpTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ protected function setUp()
5151
)->disableOriginalConstructor()->getMock();
5252
$this->cookieManagerMock = $this->getMock(\Magento\Framework\Stdlib\CookieManagerInterface::class);
5353
$this->contextMock = $this->getMockBuilder(
54-
\Magento\Framework\App\Http\Context::class)->disableOriginalConstructor()
54+
\Magento\Framework\App\Http\Context::class
55+
)->disableOriginalConstructor()
5556
->getMock();
5657

5758
$this->dateTimeMock = $this->getMockBuilder(\Magento\Framework\Stdlib\DateTime::class)
@@ -86,7 +87,8 @@ public function testSendVary()
8687
$expectedCookieName = Http::COOKIE_VARY_STRING;
8788
$expectedCookieValue = sha1(serialize($data));
8889
$sensitiveCookieMetadataMock = $this->getMockBuilder(
89-
\Magento\Framework\Stdlib\Cookie\SensitiveCookieMetadata::class)
90+
\Magento\Framework\Stdlib\Cookie\SensitiveCookieMetadata::class
91+
)
9092
->disableOriginalConstructor()
9193
->getMock();
9294
$sensitiveCookieMetadataMock->expects($this->once())

lib/internal/Magento/Framework/App/Test/Unit/StaticResourceTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ protected function setUp()
7575
$this->objectManager = $this->getMockForAbstractClass(\Magento\Framework\ObjectManagerInterface::class);
7676
$this->logger = $this->getMockForAbstractClass(\Psr\Log\LoggerInterface::class);
7777
$this->configLoader = $this->getMock(
78-
\Magento\Framework\App\ObjectManager\ConfigLoader::class, [], [], '', false
78+
\Magento\Framework\App\ObjectManager\ConfigLoader::class,
79+
[],
80+
[],
81+
'',
82+
false
7983
);
8084
$this->object = new \Magento\Framework\App\StaticResource(
8185
$this->state,

lib/internal/Magento/Framework/App/Utility/Classes.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,10 @@ public static function resolveVirtualType($className)
271271
*/
272272
public static function isAutogenerated($className)
273273
{
274-
if (
275-
preg_match(
276-
'/.*\\\\[a-zA-Z0-9]{1,}(Factory|SearchResults|DataBuilder|Extension|ExtensionInterface)$/',
277-
$className
278-
)
274+
if (preg_match(
275+
'/.*\\\\[a-zA-Z0-9]{1,}(Factory|SearchResults|DataBuilder|Extension|ExtensionInterface)$/',
276+
$className
277+
)
279278
|| preg_match('/Magento\\\\[\w]+\\\\(Test\\\\(Page|Fixture))\\\\/', $className)
280279
|| preg_match('/.*\\\\[a-zA-Z0-9]{1,}\\\\Proxy$/', $className)
281280
) {

lib/internal/Magento/Framework/Archive/Helper/File.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66

77
/**
8-
* Helper class that simplifies files stream reading and writing
9-
*/
8+
* Helper class that simplifies files stream reading and writing
9+
*/
1010
namespace Magento\Framework\Archive\Helper;
1111

1212
use Magento\Framework\Exception\LocalizedException;

lib/internal/Magento/Framework/Archive/Helper/File/Gz.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66

77
/**
8-
* Helper class that simplifies gz files stream reading and writing
9-
*/
8+
* Helper class that simplifies gz files stream reading and writing
9+
*/
1010
namespace Magento\Framework\Archive\Helper\File;
1111

1212
class Gz extends \Magento\Framework\Archive\Helper\File

lib/internal/Magento/Framework/Autoload/Test/Unit/ClassLoaderWrapperTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ class ClassLoaderWrapperTest extends \PHPUnit_Framework_TestCase
3030
protected function setUp()
3131
{
3232
$this->autoloaderMock = $this->getMock(\Composer\Autoload\ClassLoader::class);
33-
$this->model = (new ObjectManager($this))->getObject(\Magento\Framework\Autoload\ClassLoaderWrapper::class,
33+
$this->model = (new ObjectManager($this))->getObject(
34+
\Magento\Framework\Autoload\ClassLoaderWrapper::class,
3435
[
3536
'autoloader' => $this->autoloaderMock
3637
]

lib/internal/Magento/Framework/Backup/Filesystem.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ public function validateAvailableDiscSpace($backupDir, $size)
160160
if ($requiredSpace > $freeSpace) {
161161
throw new \Magento\Framework\Backup\Exception\NotEnoughFreeSpace(
162162
new \Magento\Framework\Phrase(
163-
'Warning: necessary space for backup is ' . (ceil($requiredSpace) / 1024)
164-
. 'MB, but your free disc space is ' . (ceil($freeSpace) / 1024) . 'MB.'
163+
'Warning: necessary space for backup is ' . (ceil($requiredSpace) / 1024)
164+
. 'MB, but your free disc space is ' . (ceil($freeSpace) / 1024) . 'MB.'
165165
)
166166
);
167167
}

lib/internal/Magento/Framework/Backup/Media.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
namespace Magento\Framework\Backup;
77

8-
98
/**
109
* Class to work media folder and database backups
1110
*

lib/internal/Magento/Framework/Cache/Backend/Database.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
KEY `IDX_CACHE_ID` (`cache_id`),
2525
CONSTRAINT `FK_CORE_CACHE_TAG` FOREIGN KEY (`cache_id`) REFERENCES `cache` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
2626
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
27-
*/
27+
*/
2828

2929
/**
3030
* Database cache backend

lib/internal/Magento/Framework/Code/GeneratedFiles.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ public function regenerate()
6464
public function cleanGeneratedFiles()
6565
{
6666
if ($this->write->isExist(self::REGENERATE_FLAG)) {
67-
6867
$enabledCacheTypes = [];
6968

7069
//TODO: to be removed in scope of MAGETWO-53476

0 commit comments

Comments
 (0)