Skip to content

Commit 76fa1f7

Browse files
author
Cari Spruiell
committed
MAGETWO-32953: Fix Bamboo builds
- fix code formatting issues - fix outdated references to Magento\Store\Model\StoreManagerInterface
1 parent 60ee7cc commit 76fa1f7

File tree

22 files changed

+85
-35
lines changed

22 files changed

+85
-35
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public function getScope()
3737
'store'
3838
) ? \Magento\Framework\Store\ScopeInterface::SCOPE_STORE : ($this->_request->getParam(
3939
'website'
40-
) ? \Magento\Framework\Store\ScopeInterface::SCOPE_WEBSITE : \Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT);
40+
) ?
41+
\Magento\Framework\Store\ScopeInterface::SCOPE_WEBSITE
42+
:
43+
\Magento\Framework\App\ScopeInterface::SCOPE_DEFAULT);
4144
}
4245
}

app/code/Magento/Backend/Model/Config/Structure/Element/AbstractComposite.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ abstract class AbstractComposite extends \Magento\Backend\Model\Config\Structure
1818
* @param \Magento\Framework\Store\StoreManagerInterface $storeManager
1919
* @param Iterator $childrenIterator
2020
*/
21-
public function __construct(\Magento\Framework\Store\StoreManagerInterface $storeManager, Iterator $childrenIterator)
21+
public function __construct(
22+
\Magento\Framework\Store\StoreManagerInterface $storeManager,
23+
Iterator $childrenIterator
24+
)
2225
{
2326
parent::__construct($storeManager);
2427
$this->_childrenIterator = $childrenIterator;

app/code/Magento/Catalog/Block/Category/Rss/Link.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ public function __construct(
4545
*/
4646
public function isRssAllowed()
4747
{
48-
return $this->_scopeConfig->getValue('rss/catalog/category', \Magento\Framework\Store\ScopeInterface::SCOPE_STORE);
48+
return $this->_scopeConfig->getValue(
49+
'rss/catalog/category',
50+
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
51+
);
4952
}
5053

5154
/**

app/code/Magento/Catalog/Block/Rss/Category.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,10 @@ public function getCacheLifetime()
215215
*/
216216
public function isAllowed()
217217
{
218-
return $this->_scopeConfig->isSetFlag('rss/catalog/category', \Magento\Framework\Store\ScopeInterface::SCOPE_STORE);
218+
return $this->_scopeConfig->isSetFlag(
219+
'rss/catalog/category',
220+
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
221+
);
219222
}
220223

221224
/**

app/code/Magento/Catalog/Block/Rss/Product/Special.php

+8-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ public function getRssData()
121121
{
122122
$newUrl = $this->rssUrlBuilder->getUrl(['type' => 'special_products', 'store_id' => $this->getStoreId()]);
123123
$title = __('%1 - Special Products', $this->storeManager->getStore()->getFrontendName());
124-
$lang = $this->_scopeConfig->getValue('general/locale/code', \Magento\Framework\Store\ScopeInterface::SCOPE_STORE);
124+
$lang = $this->_scopeConfig->getValue(
125+
'general/locale/code',
126+
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
127+
);
125128

126129
$data = [
127130
'title' => $title,
@@ -253,7 +256,10 @@ protected function getCustomerGroupId()
253256
*/
254257
public function isAllowed()
255258
{
256-
return $this->_scopeConfig->isSetFlag('rss/catalog/special', \Magento\Framework\Store\ScopeInterface::SCOPE_STORE);
259+
return $this->_scopeConfig->isSetFlag(
260+
'rss/catalog/special',
261+
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
262+
);
257263
}
258264

259265
/**

app/code/Magento/Catalog/Controller/Adminhtml/Category/Tree.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ public function execute()
4848

4949
if ($storeId) {
5050
if (!$categoryId) {
51-
$store = $this->_objectManager->get('Magento\Framework\Store\StoreManagerInterface')->getStore($storeId);
51+
$store = $this->_objectManager
52+
->get('Magento\Framework\Store\StoreManagerInterface')
53+
->getStore($storeId);
5254
$rootId = $store->getRootCategoryId();
5355
$this->getRequest()->setParam('id', $rootId);
5456
}

app/code/Magento/Catalog/Model/Product/GroupPriceManagement.php

+6-3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ public function add($productSku, $customerGroupId, $price)
8181
$product = $this->productRepository->get($productSku, true);
8282
$groupPrices = $product->getData('group_price');
8383
$websiteIdentifier = 0;
84-
if ($this->config->getValue('catalog/price/scope', \Magento\Framework\Store\ScopeInterface::SCOPE_WEBSITE) != 0) {
84+
$value = $this->config->getValue('catalog/price/scope', \Magento\Framework\Store\ScopeInterface::SCOPE_WEBSITE);
85+
if ($value != 0) {
8586
$websiteIdentifier = $this->storeManager->getWebsite()->getId();
8687
}
8788
$found = false;
@@ -125,7 +126,8 @@ public function remove($productSku, $customerGroupId)
125126
{
126127
$product = $this->productRepository->get($productSku, true);
127128
$websiteIdentifier = 0;
128-
if ($this->config->getValue('catalog/price/scope', \Magento\Framework\Store\ScopeInterface::SCOPE_WEBSITE) != 0) {
129+
$value = $this->config->getValue('catalog/price/scope',\Magento\Framework\Store\ScopeInterface::SCOPE_WEBSITE);
130+
if ($value != 0) {
129131
$websiteIdentifier = $this->storeManager->getWebsite()->getId();
130132
}
131133
$this->priceModifier->removeGroupPrice($product, $customerGroupId, $websiteIdentifier);
@@ -139,7 +141,8 @@ public function getList($productSku, $websiteId = null)
139141
{
140142
$product = $this->productRepository->get($productSku, true);
141143
$priceKey = 'website_price';
142-
if ($this->config->getValue('catalog/price/scope', \Magento\Framework\Store\ScopeInterface::SCOPE_WEBSITE) == 0) {
144+
$value = $this->config->getValue('catalog/price/scope',\Magento\Framework\Store\ScopeInterface::SCOPE_WEBSITE);
145+
if ($value == 0) {
143146
$priceKey = 'price';
144147
}
145148

app/code/Magento/Catalog/Model/Product/TierPriceManagement.php

+6-3
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ public function add($productSku, $customerGroupId, $price, $qty)
9393
$product = $this->productRepository->get($productSku, ['edit_mode' => true]);
9494
$tierPrices = $product->getData('tier_price');
9595
$websiteIdentifier = 0;
96-
if ($this->config->getValue('catalog/price/scope', \Magento\Framework\Store\ScopeInterface::SCOPE_WEBSITE) != 0) {
96+
$value = $this->config->getValue('catalog/price/scope', \Magento\Framework\Store\ScopeInterface::SCOPE_WEBSITE);
97+
if ($value != 0) {
9798
$websiteIdentifier = $this->storeManager->getWebsite()->getId();
9899
}
99100
$found = false;
@@ -148,7 +149,8 @@ public function remove($productSku, $customerGroupId, $qty)
148149
{
149150
$product = $this->productRepository->get($productSku, ['edit_mode' => true]);
150151
$websiteIdentifier = 0;
151-
if ($this->config->getValue('catalog/price/scope', \Magento\Framework\Store\ScopeInterface::SCOPE_WEBSITE) != 0) {
152+
$value = $this->config->getValue('catalog/price/scope', \Magento\Framework\Store\ScopeInterface::SCOPE_WEBSITE);
153+
if ($value != 0) {
152154
$websiteIdentifier = $this->storeManager->getWebsite()->getId();
153155
}
154156
$this->priceModifier->removeTierPrice($product, $customerGroupId, $qty, $websiteIdentifier);
@@ -163,7 +165,8 @@ public function getList($productSku, $customerGroupId)
163165
$product = $this->productRepository->get($productSku, ['edit_mode' => true]);
164166

165167
$priceKey = 'website_price';
166-
if ($this->config->getValue('catalog/price/scope', \Magento\Framework\Store\ScopeInterface::SCOPE_WEBSITE) == 0) {
168+
$value = $this->config->getValue('catalog/price/scope', \Magento\Framework\Store\ScopeInterface::SCOPE_WEBSITE);
169+
if ($value == 0) {
167170
$priceKey = 'price';
168171
}
169172

app/code/Magento/Checkout/Helper/Data.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,10 @@ public function sendPaymentFailedEmail($checkout, $message, $checkoutType = 'one
332332
*/
333333
protected function _getEmails($configPath, $storeId)
334334
{
335-
$data = $this->_scopeConfig->getValue($configPath, \Magento\Framework\Store\ScopeInterface::SCOPE_STORE, $storeId);
335+
$data = $this->_scopeConfig->getValue(
336+
$configPath,
337+
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE, $storeId
338+
);
336339
if (!empty($data)) {
337340
return explode(',', $data);
338341
}

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

+6-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,12 @@ public function __construct(
8383
*/
8484
public function dispatch(RequestInterface $request)
8585
{
86-
if (!$this->scopeConfig->isSetFlag(self::XML_PATH_ENABLED, \Magento\Framework\Store\ScopeInterface::SCOPE_STORE)) {
86+
if (
87+
!$this->scopeConfig->isSetFlag(
88+
self::XML_PATH_ENABLED,
89+
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
90+
)
91+
) {
8792
throw new NotFoundException();
8893
}
8994
return parent::dispatch($request);

app/code/Magento/Contact/Helper/Data.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ public function __construct(
6060
*/
6161
public function isEnabled()
6262
{
63-
return $this->_scopeConfig->getValue(self::XML_PATH_ENABLED, \Magento\Framework\Store\ScopeInterface::SCOPE_STORE);
63+
return $this->_scopeConfig->getValue(
64+
self::XML_PATH_ENABLED,
65+
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
66+
);
6467
}
6568

6669
/**

app/code/Magento/Core/App/Router/Base.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class Base implements \Magento\Framework\App\RouterInterface
115115
* @param \Magento\Framework\App\ResponseFactory $responseFactory
116116
* @param \Magento\Framework\App\Route\ConfigInterface $routeConfig
117117
* @param \Magento\Framework\UrlInterface $url
118-
* @param \Magento\Framework\Store\StoreManagerInterface|\Magento\Framework\Store\StoreManagerInterface $storeManager
118+
* @param \Magento\Framework\Store\StoreManagerInterface $storeManager
119119
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
120120
* @param \Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo
121121
* @param string $routerId
@@ -404,7 +404,10 @@ protected function _getCurrentSecureUrl($request)
404404
protected function _shouldBeSecure($path)
405405
{
406406
return parse_url(
407-
$this->_scopeConfig->getValue('web/unsecure/base_url', \Magento\Framework\Store\ScopeInterface::SCOPE_STORE),
407+
$this->_scopeConfig->getValue(
408+
'web/unsecure/base_url',
409+
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
410+
),
408411
PHP_URL_SCHEME
409412
) === 'https' || $this->_scopeConfig->isSetFlag(
410413
\Magento\Store\Model\Store::XML_PATH_SECURE_IN_FRONTEND,

app/code/Magento/GiftMessage/Model/CartRepository.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class CartRepository implements \Magento\GiftMessage\Api\CartRepositoryInterface
2626
/**
2727
* Store manager interface.
2828
*
29-
* @var \Magento\Store\Model\StoreManagerInterface
29+
* @var \Magento\Framework\Store\StoreManagerInterface
3030
*/
3131
protected $storeManager;
3232

@@ -53,14 +53,14 @@ class CartRepository implements \Magento\GiftMessage\Api\CartRepositoryInterface
5353

5454
/**
5555
* @param \Magento\Quote\Model\QuoteRepository $quoteRepository
56-
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
56+
* @param \Magento\Framework\Store\StoreManagerInterface $storeManager
5757
* @param GiftMessageManager $giftMessageManager
5858
* @param \Magento\GiftMessage\Helper\Message $helper
5959
* @param MessageFactory $messageFactory
6060
*/
6161
public function __construct(
6262
\Magento\Quote\Model\QuoteRepository $quoteRepository,
63-
\Magento\Store\Model\StoreManagerInterface $storeManager,
63+
\Magento\Framework\Store\StoreManagerInterface $storeManager,
6464
\Magento\GiftMessage\Model\GiftMessageManager $giftMessageManager,
6565
\Magento\GiftMessage\Helper\Message $helper,
6666
\Magento\GiftMessage\Model\MessageFactory $messageFactory

app/code/Magento/GiftMessage/Model/ItemRepository.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ItemRepository implements \Magento\GiftMessage\Api\ItemRepositoryInterface
2727
/**
2828
* Store manager interface.
2929
*
30-
* @var \Magento\Store\Model\StoreManagerInterface
30+
* @var \Magento\Framework\Store\StoreManagerInterface
3131
*/
3232
protected $storeManager;
3333

@@ -54,14 +54,14 @@ class ItemRepository implements \Magento\GiftMessage\Api\ItemRepositoryInterface
5454

5555
/**
5656
* @param \Magento\Quote\Model\QuoteRepository $quoteRepository
57-
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
57+
* @param \Magento\Framework\Store\StoreManagerInterface $storeManager
5858
* @param GiftMessageManager $giftMessageManager
5959
* @param \Magento\GiftMessage\Helper\Message $helper
6060
* @param MessageFactory $messageFactory
6161
*/
6262
public function __construct(
6363
\Magento\Quote\Model\QuoteRepository $quoteRepository,
64-
\Magento\Store\Model\StoreManagerInterface $storeManager,
64+
\Magento\Framework\Store\StoreManagerInterface $storeManager,
6565
\Magento\GiftMessage\Model\GiftMessageManager $giftMessageManager,
6666
\Magento\GiftMessage\Helper\Message $helper,
6767
\Magento\GiftMessage\Model\MessageFactory $messageFactory

app/code/Magento/Store/Model/Store.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,10 @@ public function getName()
11251125
*/
11261126
public function beforeDelete()
11271127
{
1128-
$this->_configDataResource->clearScopeData(\Magento\Framework\Store\ScopeInterface::SCOPE_STORES, $this->getId());
1128+
$this->_configDataResource->clearScopeData(
1129+
\Magento\Framework\Store\ScopeInterface::SCOPE_STORES,
1130+
$this->getId()
1131+
);
11291132

11301133
return parent::beforeDelete();
11311134
}

app/code/Magento/Wishlist/Helper/Rss.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ public function getCustomer()
120120
public function isRssAllow()
121121
{
122122
return $this->_moduleManager->isEnabled('Magento_Rss')
123-
&& $this->_scopeConfig->isSetFlag('rss/wishlist/active', \Magento\Framework\Store\ScopeInterface::SCOPE_STORE);
123+
&& $this->_scopeConfig->isSetFlag(
124+
'rss/wishlist/active',
125+
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
126+
);
124127
}
125128
}

dev/tests/api-functional/framework/Magento/TestFramework/TestCase/Webapi/Adapter/Soap.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ public function generateWsdlUrl($services, $storeCode = null)
130130
/** @var \Magento\Framework\Store\StoreManagerInterface $storeManager */
131131
$storeCode = !is_null($storeCode)
132132
? (string)$storeCode
133-
: Bootstrap::getObjectManager()->get('Magento\Framework\Store\StoreManagerInterface')->getStore()->getCode();
133+
: Bootstrap::getObjectManager()
134+
->get('Magento\Framework\Store\StoreManagerInterface')
135+
->getStore()
136+
->getCode();
134137

135138
/** TESTS_BASE_URL is initialized in PHPUnit configuration */
136139
$wsdlUrl = rtrim(TESTS_BASE_URL, '/') . self::WSDL_BASE_PATH . '/' . $storeCode . '?wsdl=1&services=';

dev/tests/integration/testsuite/Magento/Sales/Model/Resource/OrderTest.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,12 @@ public function testSaveOrder()
9191
->setCustomerEmail('customer@null.com')
9292
->setBillingAddress($billingAddress)
9393
->setShippingAddress($shippingAddress)
94-
->setStoreId($this->objectManager
95-
->get('Magento\Framework\Store\StoreManagerInterface')
96-
->getStore()
97-
->getId())
94+
->setStoreId(
95+
$this->objectManager
96+
->get('Magento\Framework\Store\StoreManagerInterface')
97+
->getStore()
98+
->getId()
99+
)
98100
->addItem($orderItem)
99101
->setPayment($payment);
100102

dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_namespaces.php

-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
['Magento\RecurringPayment'],
7171
['Magento\PayPalRecurringPayment'],
7272
['Magento\ConfigurableProduct\Service'],
73-
['Magento\Catalog\Service'],
7473
['Magento\Core\Model\TemplateEngine\Decorator', 'Magento\Developer\Model\TemplateEngine\Decorator'],
7574
['Magento\Catalog\Service'],
7675
['Magento\CheckoutAgreements\Service'],

dev/tests/unit/testsuite/Magento/CheckoutAgreements/Model/CheckoutAgreementsRepositoryTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protected function setUp()
4646
'',
4747
false
4848
);
49-
$this->storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface');
49+
$this->storeManagerMock = $this->getMock('Magento\Framework\Store\StoreManagerInterface');
5050
$this->scopeConfigMock = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface');
5151
$this->model = new CheckoutAgreementsRepository(
5252
$this->factoryMock,

dev/tests/unit/testsuite/Magento/GiftMessage/Model/CartRepositoryTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ protected function setUp()
101101
'',
102102
false
103103
);
104-
$this->storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface');
104+
$this->storeManagerMock = $this->getMock('Magento\Framework\Store\StoreManagerInterface');
105105
$this->giftMessageManagerMock =
106106
$this->getMock('Magento\GiftMessage\Model\GiftMessageManager', [], [], '', false);
107107
$this->helperMock = $this->getMock('Magento\GiftMessage\Helper\Message', [], [], '', false);

dev/tests/unit/testsuite/Magento/GiftMessage/Model/ItemRepositoryTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ protected function setUp()
100100
'',
101101
false
102102
);
103-
$this->storeManagerMock = $this->getMock('Magento\Store\Model\StoreManagerInterface');
103+
$this->storeManagerMock = $this->getMock('Magento\Framework\Store\StoreManagerInterface');
104104
$this->giftMessageManagerMock =
105105
$this->getMock('Magento\GiftMessage\Model\GiftMessageManager', [], [], '', false);
106106
$this->helperMock = $this->getMock('Magento\GiftMessage\Helper\Message', [], [], '', false);

0 commit comments

Comments
 (0)