Skip to content

Commit c619404

Browse files
committed
[PSR-2 Compliance] The Great @codingStandardsIgnoreFile Massacre
- apply automatic PHPCBF fixes to make PHPCS happy - Step 0. Install phpcs globally: composer global require squizlabs/php_codesniffer:2.8.0 - Step 1. Execute tool to fix PSR-2 violations in PHP files: ~/.composer/vendor/squizlabs/php_codesniffer/scripts/phpcbf --standard=PSR2 --extensions=php --ignore=generated/*,vendor/*,var/* .
1 parent 4dc56e0 commit c619404

File tree

247 files changed

+1808
-1114
lines changed

Some content is hidden

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

247 files changed

+1808
-1114
lines changed

app/code/Magento/AdminNotification/Test/Unit/Block/ToolbarEntryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ public function testGetLatestUnreadNotifications()
5151

5252
// 1. Create mocks
5353
$notificationList = $this->getMockBuilder(
54-
\Magento\AdminNotification\Model\ResourceModel\Inbox\Collection\Unread::class)
54+
\Magento\AdminNotification\Model\ResourceModel\Inbox\Collection\Unread::class
55+
)
5556
->disableOriginalConstructor()
5657
->getMock();
5758

app/code/Magento/Backend/Block/Menu.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ protected function _renderItemCssClass($menuItem, $level)
147147
$isLast = 0 == $level && (bool)$this->getMenuModel()->isLast($menuItem) ? 'last' : '';
148148
$output = ($this->menuItemChecker->isItemActive(
149149
$this->getActiveItemModel(),
150-
$menuItem,
151-
$level
152-
) ? '_current _active' : '') .
150+
$menuItem,
151+
$level
152+
) ? '_current _active' : '') .
153153
' ' .
154154
($menuItem->hasChildren() ? 'parent' : '') .
155155
' ' .

app/code/Magento/Backend/Block/Page/System/Config/Robots/Reset.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ protected function _construct()
5151
public function getRobotsDefaultCustomInstructions()
5252
{
5353
return trim((string)$this->_scopeConfig->getValue(
54-
self::XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS, ScopeConfigInterface::SCOPE_TYPE_DEFAULT
54+
self::XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS,
55+
ScopeConfigInterface::SCOPE_TYPE_DEFAULT
5556
));
5657
}
5758

app/code/Magento/Backend/Block/System/Design/Edit/Tab/General.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected function _prepareForm()
6464
]
6565
);
6666
$renderer = $this->getLayout()->createBlock(
67-
\Magento\Backend\Block\Store\Switcher\Form\Renderer\Fieldset\Element::class
67+
\Magento\Backend\Block\Store\Switcher\Form\Renderer\Fieldset\Element::class
6868
);
6969
$field->setRenderer($renderer);
7070
} else {

app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnSetTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ public function testGetTotals()
322322
);
323323

324324
$this->assertEquals(
325-
new \Magento\Framework\DataObject(['test1' => '3', 'test2' => '2']), $this->_block->getTotals()
325+
new \Magento\Framework\DataObject(['test1' => '3', 'test2' => '2']),
326+
$this->_block->getTotals()
326327
);
327328
}
328329

app/code/Magento/Backend/Test/Unit/Controller/Adminhtml/Cache/CleanMediaTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ public function testExecute()
7676

7777
$messageManager->expects($this->once())
7878
->method('addSuccess')
79-
->with('The JavaScript/CSS cache has been cleaned.'
80-
);
79+
->with('The JavaScript/CSS cache has been cleaned.');
8180

8281
$valueMap = [
8382
[\Magento\Framework\View\Asset\MergeService::class, $mergeService],

app/code/Magento/Backend/Test/Unit/Controller/Adminhtml/Dashboard/AbstractTestCase.php

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,31 @@ protected function assertExecute($controllerName, $blockName)
2323
$outPut = "data";
2424
$resultRawMock = $this->getMock(
2525
\Magento\Framework\Controller\Result\Raw::class,
26-
['setContents'], [], '', false);
26+
['setContents'],
27+
[],
28+
'',
29+
false
30+
);
2731
$resultRawFactoryMock = $this->getMock(
2832
\Magento\Framework\Controller\Result\RawFactory::class,
29-
['create'], [], '', false
33+
['create'],
34+
[],
35+
'',
36+
false
3037
);
3138
$layoutFactoryMock = $this->getMock(
3239
\Magento\Framework\View\LayoutFactory::class,
33-
['create'], [], '', false
40+
['create'],
41+
[],
42+
'',
43+
false
3444
);
3545
$layoutMock = $this->getMock(
3646
\Magento\Framework\View\Layout::class,
37-
['createBlock', 'toHtml'], [], '', false
47+
['createBlock', 'toHtml'],
48+
[],
49+
'',
50+
false
3851
);
3952
$layoutFactoryMock->expects($this->once())->method('create')->will($this->returnValue($layoutMock));
4053
$layoutMock->expects($this->once())->method('createBlock')->with($blockName)->will($this->returnSelf());

app/code/Magento/Backend/Test/Unit/Model/UrlTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ protected function setUp()
8989
\Magento\Framework\Data\Form\FormKey::class,
9090
['getFormKey'],
9191
[],
92-
'', false
92+
'',
93+
false
9394
);
9495
$this->_formKey->expects($this->any())->method('getFormKey')->will($this->returnValue('salt'));
9596

app/code/Magento/Bundle/Model/Product/Type.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,8 +840,7 @@ public function getOptionsByIds($optionIds, $product)
840840
$usedOptions = $product->getData($this->_keyUsedOptions);
841841
$usedOptionsIds = $product->getData($this->_keyUsedOptionsIds);
842842

843-
if (
844-
!$usedOptions
843+
if (!$usedOptions
845844
|| $this->serializer->serialize($usedOptionsIds) != $this->serializer->serialize($optionIds)
846845
) {
847846
$usedOptions = $this->_bundleOption

app/code/Magento/Bundle/Test/Unit/Block/Catalog/Product/View/Type/Bundle/OptionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ public function testSetOption()
6363
$this->product->expects($this->atLeastOnce())
6464
->method('getPreconfiguredValues')
6565
->will($this->returnValue(
66-
new \Magento\Framework\DataObject(['bundle_option' => [15 => 315, 16 => 316]]))
67-
);
66+
new \Magento\Framework\DataObject(['bundle_option' => [15 => 315, 16 => 316]])
67+
));
6868

6969
$option = $this->getMock(\Magento\Bundle\Model\Option::class, [], [], '', false);
7070
$option->expects($this->any())->method('getId')->will($this->returnValue(15));

0 commit comments

Comments
 (0)