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

Lines changed: 4 additions & 1 deletion
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

Lines changed: 4 additions & 1 deletion
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

Lines changed: 4 additions & 1 deletion
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

Lines changed: 4 additions & 1 deletion
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

Lines changed: 8 additions & 2 deletions
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

Lines changed: 3 additions & 1 deletion
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

Lines changed: 6 additions & 3 deletions
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

Lines changed: 6 additions & 3 deletions
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

Lines changed: 4 additions & 1 deletion
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

Lines changed: 6 additions & 1 deletion
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);

0 commit comments

Comments
 (0)