Skip to content

Commit 914f576

Browse files
author
Dale Sikkema
committed
Merge branch 'MAGETWO-32624' into develop
Conflicts: app/code/Magento/Tax/Controller/Adminhtml/Tax/IgnoreTaxNotification.php app/code/Magento/Tax/Test/Unit/Controller/Adminhtml/Tax/IgnoreTaxNotificationTest.php
2 parents 9bbf352 + d1db7e3 commit 914f576

File tree

82 files changed

+337
-194
lines changed

Some content is hidden

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

82 files changed

+337
-194
lines changed

app/code/Magento/Backend/App/Config.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
namespace Magento\Backend\App;
1212

13+
use Magento\Framework\App\Config\ScopeConfigInterface;
14+
1315
/**
1416
* Backend config accessor
1517
*/
@@ -36,7 +38,7 @@ public function __construct(\Magento\Framework\App\Config\ScopePool $scopePool)
3638
*/
3739
public function getValue($path)
3840
{
39-
return $this->_scopePool->getScope(\Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT, null)->getValue($path);
41+
return $this->_scopePool->getScope(ScopeConfigInterface::SCOPE_TYPE_DEFAULT, null)->getValue($path);
4042
}
4143

4244
/**
@@ -48,7 +50,7 @@ public function getValue($path)
4850
*/
4951
public function setValue($path, $value)
5052
{
51-
$this->_scopePool->getScope(\Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT, null)->setValue($path, $value);
53+
$this->_scopePool->getScope(ScopeConfigInterface::SCOPE_TYPE_DEFAULT, null)->setValue($path, $value);
5254
}
5355

5456
/**
@@ -59,6 +61,6 @@ public function setValue($path, $value)
5961
*/
6062
public function isSetFlag($path)
6163
{
62-
return !!$this->_scopePool->getScope(\Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT, null)->getValue($path);
64+
return !!$this->_scopePool->getScope(ScopeConfigInterface::SCOPE_TYPE_DEFAULT, null)->getValue($path);
6365
}
6466
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
namespace Magento\Backend\Block\Page\System\Config\Robots;
1010

11+
use Magento\Framework\App\Config\ScopeConfigInterface;
12+
1113
/**
1214
* "Reset to Defaults" button renderer
1315
*
@@ -50,7 +52,7 @@ protected function _construct()
5052
public function getRobotsDefaultCustomInstructions()
5153
{
5254
return trim((string)$this->_scopeConfig->getValue(
53-
self::XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS, \Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT
55+
self::XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS, ScopeConfigInterface::SCOPE_TYPE_DEFAULT
5456
));
5557
}
5658

app/code/Magento/Backend/Model/Locale/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function switchBackendInterfaceLocale($localeCode)
6868
*/
6969
public function getUserInterfaceLocale()
7070
{
71-
$interfaceLocale = \Magento\Framework\Locale\ResolverInterface::DEFAULT_LOCALE;
71+
$interfaceLocale = \Magento\Framework\Locale\Resolver::DEFAULT_LOCALE;
7272

7373
$userData = $this->_authSession->getUser();
7474
if ($userData && $userData->getInterfaceLocale()) {

app/code/Magento/Backend/Test/Unit/Model/Locale/ManagerTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Backend\Test\Unit\Model\Locale;
77

8+
use Magento\Framework\Locale\Resolver;
9+
810
class ManagerTest extends \PHPUnit_Framework_TestCase
911
{
1012
/**
@@ -87,7 +89,7 @@ public function testGetUserInterfaceLocaleDefault()
8789
{
8890
$locale = $this->_model->getUserInterfaceLocale();
8991

90-
$this->assertEquals($locale, \Magento\Framework\Locale\ResolverInterface::DEFAULT_LOCALE);
92+
$this->assertEquals($locale, Resolver::DEFAULT_LOCALE);
9193
}
9294

9395
/**

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\Config\Model\Config\Backend;
77

8+
use Magento\Framework\App\Config\ScopeConfigInterface;
89
use Magento\Framework\App\Filesystem\DirectoryList;
910
use Magento\Framework\Filesystem;
1011

@@ -196,7 +197,7 @@ protected function _getUploadDir()
196197
protected function _prependScopeInfo($path)
197198
{
198199
$scopeInfo = $this->getScope();
199-
if (\Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT != $this->getScope()) {
200+
if (ScopeConfigInterface::SCOPE_TYPE_DEFAULT != $this->getScope()) {
200201
$scopeInfo .= '/' . $this->getScopeId();
201202
}
202203
return $scopeInfo . '/' . $path;
@@ -213,7 +214,7 @@ protected function _prependScopeInfo($path)
213214
protected function _appendScopeInfo($path)
214215
{
215216
$path .= '/' . $this->getScope();
216-
if (\Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT != $this->getScope()) {
217+
if (ScopeConfigInterface::SCOPE_TYPE_DEFAULT != $this->getScope()) {
217218
$path .= '/' . $this->getScopeId();
218219
}
219220
return $path;

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
*/
1010
namespace Magento\Config\Model\Config\Backend;
1111

12+
use Magento\Framework\App\Config\ScopeConfigInterface;
13+
1214
class Locale extends \Magento\Framework\App\Config\Value
1315
{
1416
/**
@@ -91,7 +93,7 @@ public function afterSave()
9193
}
9294

9395
switch ($data->getScope()) {
94-
case \Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT:
96+
case ScopeConfigInterface::SCOPE_TYPE_DEFAULT:
9597
$scopeName = __('Default scope');
9698
break;
9799

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

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

8+
use Magento\Framework\App\Config\ScopeConfigInterface;
89
use Magento\Store\Model\ScopeInterface as StoreScopeInterface;
910

1011
/**
@@ -38,6 +39,6 @@ public function getScope()
3839
'store'
3940
) ? StoreScopeInterface::SCOPE_STORE : ($this->_request->getParam(
4041
'website'
41-
) ? StoreScopeInterface::SCOPE_WEBSITE : \Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT);
42+
) ? StoreScopeInterface::SCOPE_WEBSITE : StoreScopeInterface::SCOPE_DEFAULT);
4243
}
4344
}

app/code/Magento/Config/Model/Config/Structure/AbstractElement.php

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

8+
use Magento\Framework\App\Config\ScopeConfigInterface;
89
use Magento\Store\Model\StoreManagerInterface;
910

1011
abstract class AbstractElement implements ElementInterface
@@ -136,7 +137,7 @@ public function isVisible()
136137
$showInScope = [
137138
\Magento\Store\Model\ScopeInterface::SCOPE_STORE => $this->_hasVisibilityValue('showInStore'),
138139
\Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE => $this->_hasVisibilityValue('showInWebsite'),
139-
\Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT => $this->_hasVisibilityValue('showInDefault'),
140+
ScopeConfigInterface::SCOPE_TYPE_DEFAULT => $this->_hasVisibilityValue('showInDefault'),
140141
];
141142

142143
if ($this->_storeManager->isSingleStoreMode()) {

app/code/Magento/Config/Test/Unit/Model/Config/ScopeDefinerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\Config\Test\Unit\Model\Config;
77

8+
use Magento\Framework\App\Config\ScopeConfigInterface;
89
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
910

1011
class ScopeDefinerTest extends \PHPUnit_Framework_TestCase
@@ -31,7 +32,7 @@ protected function setUp()
3132

3233
public function testGetScopeReturnsDefaultScopeIfNoScopeDataIsSpecified()
3334
{
34-
$this->assertEquals(\Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT, $this->_model->getScope());
35+
$this->assertEquals(ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $this->_model->getScope());
3536
}
3637

3738
public function testGetScopeReturnsStoreScopeIfStoreIsSpecified()

app/code/Magento/Config/Test/Unit/Model/Config/Structure/AbstractElementTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Config\Test\Unit\Model\Config\Structure;
77

8+
use Magento\Framework\App\Config\ScopeConfigInterface;
9+
810
class AbstractElementTest extends \PHPUnit_Framework_TestCase
911
{
1012
/**
@@ -77,7 +79,7 @@ public function testIsVisibleReturnsTrueInSingleStoreModeForNonHiddenElements()
7779
$this->_storeManager->expects($this->once())->method('isSingleStoreMode')->will($this->returnValue(true));
7880
$this->_model->setData(
7981
['showInDefault' => 1, 'showInStore' => 0, 'showInWebsite' => 0],
80-
\Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT
82+
ScopeConfigInterface::SCOPE_TYPE_DEFAULT
8183
);
8284
$this->assertTrue($this->_model->isVisible());
8385
}
@@ -87,7 +89,7 @@ public function testIsVisibleReturnsFalseInSingleStoreModeForHiddenElements()
8789
$this->_storeManager->expects($this->once())->method('isSingleStoreMode')->will($this->returnValue(true));
8890
$this->_model->setData(
8991
['hide_in_single_store_mode' => 1, 'showInDefault' => 1, 'showInStore' => 0, 'showInWebsite' => 0],
90-
\Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT
92+
ScopeConfigInterface::SCOPE_TYPE_DEFAULT
9193
);
9294
$this->assertFalse($this->_model->isVisible());
9395
}
@@ -100,7 +102,7 @@ public function testIsVisibleReturnsFalseInSingleStoreModeForInvisibleElements()
100102
$this->_storeManager->expects($this->once())->method('isSingleStoreMode')->will($this->returnValue(true));
101103
$this->_model->setData(
102104
['showInDefault' => 0, 'showInStore' => 0, 'showInWebsite' => 0],
103-
\Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT
105+
ScopeConfigInterface::SCOPE_TYPE_DEFAULT
104106
);
105107
$this->assertFalse($this->_model->isVisible());
106108
}
@@ -121,7 +123,7 @@ public function isVisibleReturnsTrueForProperScopesDataProvider()
121123
return [
122124
[
123125
['showInDefault' => 1, 'showInStore' => 0, 'showInWebsite' => 0],
124-
\Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT,
126+
ScopeConfigInterface::SCOPE_TYPE_DEFAULT,
125127
],
126128
[
127129
['showInDefault' => 0, 'showInStore' => 1, 'showInWebsite' => 0],
@@ -150,7 +152,7 @@ public function isVisibleReturnsFalseForNonProperScopesDataProvider()
150152
return [
151153
[
152154
['showInDefault' => 0, 'showInStore' => 1, 'showInWebsite' => 1],
153-
\Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT,
155+
ScopeConfigInterface::SCOPE_TYPE_DEFAULT,
154156
],
155157
[
156158
['showInDefault' => 1, 'showInStore' => 0, 'showInWebsite' => 1],

0 commit comments

Comments
 (0)