Skip to content

Commit 21da28b

Browse files
MAGETWO-69953: Fixed coding standard violations in the Magento\Authorization Magento\Backup Magento\Captcha Magento\CurrencySymbol and Magento\Dhl namespace #9978
2 parents 3d7eb26 + 9acff14 commit 21da28b

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

app/code/Magento/Authorization/Model/ResourceModel/Rules.php

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

7-
// @codingStandardsIgnoreFile
8-
97
namespace Magento\Authorization\Model\ResourceModel;
108

119
use Magento\Framework\App\ObjectManager;
@@ -101,7 +99,10 @@ public function saveRel(\Magento\Authorization\Model\Rules $rule)
10199

102100
// If all was selected save it only and nothing else.
103101
if ($postedResources === [$this->_rootResource->getId()]) {
104-
$insertData = $this->_prepareDataForTable(new \Magento\Framework\DataObject($row), $this->getMainTable());
102+
$insertData = $this->_prepareDataForTable(
103+
new \Magento\Framework\DataObject($row),
104+
$this->getMainTable()
105+
);
105106

106107
$connection->insert($this->getMainTable(), $insertData);
107108
} else {
@@ -113,7 +114,10 @@ public function saveRel(\Magento\Authorization\Model\Rules $rule)
113114
$row['permission'] = in_array($resourceId, $postedResources) ? 'allow' : 'deny';
114115
$row['resource_id'] = $resourceId;
115116

116-
$insertData = $this->_prepareDataForTable(new \Magento\Framework\DataObject($row), $this->getMainTable());
117+
$insertData = $this->_prepareDataForTable(
118+
new \Magento\Framework\DataObject($row),
119+
$this->getMainTable()
120+
);
117121
$connection->insert($this->getMainTable(), $insertData);
118122
}
119123
}

app/code/Magento/Backup/Model/ResourceModel/Helper.php

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

7-
// @codingStandardsIgnoreFile
8-
97
namespace Magento\Backup\Model\ResourceModel;
108

119
class Helper extends \Magento\Framework\DB\Helper
@@ -176,7 +174,9 @@ public function getHeader()
176174
$dbConfig = $this->getConnection()->getConfig();
177175

178176
$versionRow = $this->getConnection()->fetchRow('SHOW VARIABLES LIKE \'version\'');
179-
$hostName = !empty($dbConfig['unix_socket']) ? $dbConfig['unix_socket'] : (!empty($dbConfig['host']) ? $dbConfig['host'] : 'localhost');
177+
$hostName = !empty($dbConfig['unix_socket'])
178+
? $dbConfig['unix_socket']
179+
: (!empty($dbConfig['host']) ? $dbConfig['host'] : 'localhost');
180180

181181
$header = "-- Magento DB backup\n" .
182182
"--\n" .

app/code/Magento/Captcha/Model/Config/Form/AbstractForm.php

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

7-
// @codingStandardsIgnoreFile
8-
97
/**
108
* Data source to fill "Forms" field
119
*
1210
* @author Magento Core Team <core@magentocommerce.com>
1311
*/
1412
namespace Magento\Captcha\Model\Config\Form;
1513

16-
abstract class AbstractForm extends \Magento\Framework\App\Config\Value implements \Magento\Framework\Option\ArrayInterface
14+
use Magento\Framework\App\Config\Value;
15+
16+
abstract class AbstractForm extends Value implements \Magento\Framework\Option\ArrayInterface
1717
{
1818
/**
1919
* @var string

app/code/Magento/CurrencySymbol/Controller/Adminhtml/System/Currency/SaveRates.php

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

8-
// @codingStandardsIgnoreFile
9-
108
namespace Magento\CurrencySymbol\Controller\Adminhtml\System\Currency;
119

1210
class SaveRates extends \Magento\CurrencySymbol\Controller\Adminhtml\System\Currency
@@ -24,7 +22,8 @@ public function execute()
2422
foreach ($data as $currencyCode => $rate) {
2523
foreach ($rate as $currencyTo => $value) {
2624
$value = abs($this->_objectManager->get(
27-
\Magento\Framework\Locale\FormatInterface::class)->getNumber($value));
25+
\Magento\Framework\Locale\FormatInterface::class
26+
)->getNumber($value));
2827
$data[$currencyCode][$currencyTo] = $value;
2928
if ($value == 0) {
3029
$this->messageManager->addWarning(

app/code/Magento/Dhl/Model/Carrier.php

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

7-
// @codingStandardsIgnoreFile
8-
97
namespace Magento\Dhl\Model;
108

119
use Magento\Catalog\Model\Product\Type;

0 commit comments

Comments
 (0)