Skip to content

Commit 5ec7385

Browse files
committed
MAGETWO-32953: Fix Bamboo builds
- CR changes - Fix PHPMD violation
1 parent 4af91c0 commit 5ec7385

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

app/code/Magento/Backend/Model/Config/ScopeDefiner.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
* Copyright © 2015 Magento. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
namespace Magento\Backend\Model\Config;
7+
8+
use Magento\Framework\Store\ScopeInterface as StoreScopeInterface;
69

710
/**
811
* System configuration scope
912
*/
10-
namespace Magento\Backend\Model\Config;
11-
1213
class ScopeDefiner
1314
{
1415
/**
@@ -35,11 +36,8 @@ public function getScope()
3536
{
3637
return $this->_request->getParam(
3738
'store'
38-
) ? \Magento\Framework\Store\ScopeInterface::SCOPE_STORE : ($this->_request->getParam(
39+
) ? StoreScopeInterface::SCOPE_STORE : ($this->_request->getParam(
3940
'website'
40-
) ?
41-
\Magento\Framework\Store\ScopeInterface::SCOPE_WEBSITE
42-
:
43-
\Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT);
41+
) ? StoreScopeInterface::SCOPE_WEBSITE : \Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT);
4442
}
4543
}

app/code/Magento/Contact/Controller/Index.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
use Magento\Framework\App\Action\NotFoundException;
99
use Magento\Framework\App\RequestInterface;
10+
use Magento\Framework\Store\ScopeInterface;
1011

1112
/**
1213
* Contact index controller
@@ -83,12 +84,7 @@ public function __construct(
8384
*/
8485
public function dispatch(RequestInterface $request)
8586
{
86-
if (
87-
!$this->scopeConfig->isSetFlag(
88-
self::XML_PATH_ENABLED,
89-
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
90-
)
91-
) {
87+
if (!$this->scopeConfig->isSetFlag(self::XML_PATH_ENABLED, ScopeInterface::SCOPE_STORE)) {
9288
throw new NotFoundException();
9389
}
9490
return parent::dispatch($request);

dev/tests/integration/testsuite/Magento/Catalog/Helper/DataTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
use Magento\Tax\Model\Config;
1111
use Magento\Tax\Model\TaxRuleFixtureFactory;
1212

13+
/**
14+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
15+
*/
1316
class DataTest extends \PHPUnit_Framework_TestCase
1417
{
1518
/**

0 commit comments

Comments
 (0)