Skip to content

Commit 2927b64

Browse files
author
Bryant Luk
committed
MAGETWO-32953: Fix Coding Style
- Fix coding style for a few files
1 parent f9bb264 commit 2927b64

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

dev/tests/integration/testsuite/Magento/CurrencySymbol/Controller/Adminhtml/System/Currency/FetchRatesTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ protected function runActionWithMockedImportService(array $messages = [])
101101
->disableOriginalConstructor()
102102
->getMock();
103103

104-
$objectManagerMap = array(
105-
array('Magento\Directory\Model\Currency\Import\Factory', $importServiceFactoryMock),
106-
array('Magento\Backend\Model\Session', $backendSessionMock)
107-
);
104+
$objectManagerMap = [
105+
['Magento\Directory\Model\Currency\Import\Factory', $importServiceFactoryMock],
106+
['Magento\Backend\Model\Session', $backendSessionMock]
107+
];
108108

109109
$objectManagerMock->method('get')
110110
->will($this->returnValueMap($objectManagerMap));

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,15 @@ protected function _isSimpleSequentialArray(array $data)
8484
* @param bool $removeItemNode Remove Item node from arrays if true
8585
* @return array
8686
* @throws \InvalidArgumentException
87+
* @SuppressWarnings(PHPMD.NPathComplexity)
88+
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
8789
*/
8890
public function convertStdObjectToArray($input, $removeItemNode = false)
8991
{
9092
if (!is_object($input) && !is_array($input)) {
9193
throw new \InvalidArgumentException("Input argument must be an array or object");
9294
}
95+
// @codingStandardsIgnoreStart
9396
if ($removeItemNode && (isset($input->item) || isset($input->Map))) {
9497
$node = isset($input->item) ? $input->item : $input->Map;
9598
/**
@@ -99,6 +102,7 @@ public function convertStdObjectToArray($input, $removeItemNode = false)
99102
*/
100103
$input = is_object($node) ? [$node] : $node;
101104
}
105+
// @codingStandardsIgnoreEnd
102106
$result = [];
103107
foreach ((array)$input as $key => $value) {
104108
if (is_object($value) || is_array($value)) {

0 commit comments

Comments
 (0)