Skip to content

Commit cc4b174

Browse files
🔃 [EngCom] Public Pull Requests - 2.2-develop
Accepted Public Pull Requests: - #16831: [Backport] Magento_Sales integration tests: fix invoice_list fixture var tags (by @ronak2ram) - #16821: Code improvement (by @mage2pratik)
2 parents ada5457 + 225f555 commit cc4b174

File tree

26 files changed

+44
-46
lines changed

26 files changed

+44
-46
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ public function isSetFlag($path)
6868
if ($path) {
6969
$configPath .= '/' . $path;
7070
}
71-
return (bool) $this->appConfig->get(System::CONFIG_TYPE, $configPath);
71+
return (bool)$this->appConfig->get(System::CONFIG_TYPE, $configPath);
7272
}
7373
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function getTableForeignKeysSql($tableName = null)
115115
}
116116

117117
/**
118-
* Return triggers fro table(s)
118+
* Return triggers for table(s)
119119
*
120120
* @param string|null $tableName
121121
* @param bool $addDropIfExists

app/code/Magento/Braintree/Gateway/Config/Config.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function getCountryAvailableCardTypes($country, $storeId = null)
131131
*/
132132
public function isCvvEnabled($storeId = null)
133133
{
134-
return (bool) $this->getValue(self::KEY_USE_CVV, $storeId);
134+
return (bool)$this->getValue(self::KEY_USE_CVV, $storeId);
135135
}
136136

137137
/**
@@ -142,7 +142,7 @@ public function isCvvEnabled($storeId = null)
142142
*/
143143
public function isVerify3DSecure($storeId = null)
144144
{
145-
return (bool) $this->getValue(self::KEY_VERIFY_3DSECURE, $storeId);
145+
return (bool)$this->getValue(self::KEY_VERIFY_3DSECURE, $storeId);
146146
}
147147

148148
/**
@@ -233,7 +233,7 @@ public function getSdkUrl()
233233
*/
234234
public function hasFraudProtection($storeId = null)
235235
{
236-
return (bool) $this->getValue(Config::FRAUD_PROTECTION, $storeId);
236+
return (bool)$this->getValue(Config::FRAUD_PROTECTION, $storeId);
237237
}
238238

239239
/**
@@ -244,7 +244,7 @@ public function hasFraudProtection($storeId = null)
244244
*/
245245
public function isActive($storeId = null)
246246
{
247-
return (bool) $this->getValue(self::KEY_ACTIVE, $storeId);
247+
return (bool)$this->getValue(self::KEY_ACTIVE, $storeId);
248248
}
249249

250250
/**

app/code/Magento/Braintree/Gateway/Config/PayPal/Config.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ public function __construct(
6060
*/
6161
public function isActive()
6262
{
63-
return (bool) $this->getValue(self::KEY_ACTIVE);
63+
return (bool)$this->getValue(self::KEY_ACTIVE);
6464
}
6565

6666
/**
6767
* @return bool
6868
*/
6969
public function isDisplayShoppingCart()
7070
{
71-
return (bool) $this->getValue(self::KEY_DISPLAY_ON_SHOPPING_CART);
71+
return (bool)$this->getValue(self::KEY_DISPLAY_ON_SHOPPING_CART);
7272
}
7373

7474
/**
@@ -78,7 +78,7 @@ public function isDisplayShoppingCart()
7878
*/
7979
public function isAllowToEditShippingAddress()
8080
{
81-
return (bool) $this->getValue(self::KEY_ALLOW_TO_EDIT_SHIPPING_ADDRESS);
81+
return (bool)$this->getValue(self::KEY_ALLOW_TO_EDIT_SHIPPING_ADDRESS);
8282
}
8383

8484
/**
@@ -117,7 +117,7 @@ public function getTitle()
117117
*/
118118
public function isSkipOrderReview()
119119
{
120-
return (bool) $this->getValue('skip_order_review');
120+
return (bool)$this->getValue('skip_order_review');
121121
}
122122

123123
/**

app/code/Magento/Catalog/Model/Indexer/Product/Price/Action/Full.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ private function switchTables()
413413
private function moveDataFromReplicaTableToReplicaTables(array $dimensions)
414414
{
415415
if (!$dimensions) {
416-
return ;
416+
return;
417417
}
418418
//TODO: need to update logic for run this move only when replica table is not empty
419419
$select = $this->dimensionTableMaintainer->getConnection()->select()->from(

app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/CustomOptionPriceModifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function modifyPrice(IndexTableStructure $priceTable, array $entityIds =
9393
{
9494
// no need to run all queries if current products have no custom options
9595
if (!$this->checkIfCustomOptionsExist($priceTable)) {
96-
return ;
96+
return;
9797
}
9898

9999
$connection = $this->getConnection();

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ private function getPreviousSetAttributes()
589589
*/
590590
private function isProductExists()
591591
{
592-
return (bool) $this->locator->getProduct()->getId();
592+
return (bool)$this->locator->getProduct()->getId();
593593
}
594594

595595
/**

app/code/Magento/CatalogInventory/Model/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public function getNotifyStockQty($store = null)
264264
*/
265265
public function getEnableQtyIncrements($store = null)
266266
{
267-
return (bool) $this->scopeConfig->getValue(
267+
return (bool)$this->scopeConfig->getValue(
268268
self::XML_PATH_ENABLE_QTY_INCREMENTS,
269269
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
270270
$store

app/code/Magento/CatalogInventory/Model/Stock/Item.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public function getProductId()
198198
*/
199199
public function getStockStatusChangedAuto()
200200
{
201-
return (bool) $this->_getData(static::STOCK_STATUS_CHANGED_AUTO);
201+
return (bool)$this->_getData(static::STOCK_STATUS_CHANGED_AUTO);
202202
}
203203

204204
/**
@@ -219,7 +219,7 @@ public function getIsInStock()
219219
if (!$this->getManageStock()) {
220220
return true;
221221
}
222-
return (bool) $this->_getData(static::IS_IN_STOCK);
222+
return (bool)$this->_getData(static::IS_IN_STOCK);
223223
}
224224

225225
/**
@@ -228,7 +228,7 @@ public function getIsInStock()
228228
*/
229229
public function getIsQtyDecimal()
230230
{
231-
return (bool) $this->_getData(static::IS_QTY_DECIMAL);
231+
return (bool)$this->_getData(static::IS_QTY_DECIMAL);
232232
}
233233

234234
/**
@@ -237,7 +237,7 @@ public function getIsQtyDecimal()
237237
*/
238238
public function getIsDecimalDivided()
239239
{
240-
return (bool) $this->_getData(static::IS_DECIMAL_DIVIDED);
240+
return (bool)$this->_getData(static::IS_DECIMAL_DIVIDED);
241241
}
242242

243243
/**
@@ -265,7 +265,7 @@ public function getShowDefaultNotificationMessage()
265265
*/
266266
public function getUseConfigMinQty()
267267
{
268-
return (bool) $this->_getData(static::USE_CONFIG_MIN_QTY);
268+
return (bool)$this->_getData(static::USE_CONFIG_MIN_QTY);
269269
}
270270

271271
/**
@@ -289,7 +289,7 @@ public function getMinQty()
289289
*/
290290
public function getUseConfigMinSaleQty()
291291
{
292-
return (bool) $this->_getData(static::USE_CONFIG_MIN_SALE_QTY);
292+
return (bool)$this->_getData(static::USE_CONFIG_MIN_SALE_QTY);
293293
}
294294

295295
/**
@@ -314,7 +314,7 @@ public function getMinSaleQty()
314314
*/
315315
public function getUseConfigMaxSaleQty()
316316
{
317-
return (bool) $this->_getData(static::USE_CONFIG_MAX_SALE_QTY);
317+
return (bool)$this->_getData(static::USE_CONFIG_MAX_SALE_QTY);
318318
}
319319

320320
/**
@@ -339,7 +339,7 @@ public function getMaxSaleQty()
339339
*/
340340
public function getUseConfigNotifyStockQty()
341341
{
342-
return (bool) $this->_getData(static::USE_CONFIG_NOTIFY_STOCK_QTY);
342+
return (bool)$this->_getData(static::USE_CONFIG_NOTIFY_STOCK_QTY);
343343
}
344344

345345
/**
@@ -361,7 +361,7 @@ public function getNotifyStockQty()
361361
*/
362362
public function getUseConfigEnableQtyInc()
363363
{
364-
return (bool) $this->_getData(static::USE_CONFIG_ENABLE_QTY_INC);
364+
return (bool)$this->_getData(static::USE_CONFIG_ENABLE_QTY_INC);
365365
}
366366

367367
/**
@@ -375,7 +375,7 @@ public function getEnableQtyIncrements()
375375
if ($this->getUseConfigEnableQtyInc()) {
376376
return $this->stockConfiguration->getEnableQtyIncrements($this->getStoreId());
377377
}
378-
return (bool) $this->getData(static::ENABLE_QTY_INCREMENTS);
378+
return (bool)$this->getData(static::ENABLE_QTY_INCREMENTS);
379379
}
380380

381381
/**
@@ -386,7 +386,7 @@ public function getEnableQtyIncrements()
386386
*/
387387
public function getUseConfigQtyIncrements()
388388
{
389-
return (bool) $this->_getData(static::USE_CONFIG_QTY_INCREMENTS);
389+
return (bool)$this->_getData(static::USE_CONFIG_QTY_INCREMENTS);
390390
}
391391

392392
/**
@@ -418,7 +418,7 @@ public function getQtyIncrements()
418418
*/
419419
public function getUseConfigBackorders()
420420
{
421-
return (bool) $this->_getData(static::USE_CONFIG_BACKORDERS);
421+
return (bool)$this->_getData(static::USE_CONFIG_BACKORDERS);
422422
}
423423

424424
/**
@@ -440,7 +440,7 @@ public function getBackorders()
440440
*/
441441
public function getUseConfigManageStock()
442442
{
443-
return (bool) $this->_getData(static::USE_CONFIG_MANAGE_STOCK);
443+
return (bool)$this->_getData(static::USE_CONFIG_MANAGE_STOCK);
444444
}
445445

446446
/**

app/code/Magento/Downloadable/Block/Adminhtml/Catalog/Product/Edit/Tab/Downloadable/Links.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public function getPurchasedSeparatelyAttribute()
163163
*/
164164
public function isProductLinksCanBePurchasedSeparately()
165165
{
166-
return (bool) $this->getProduct()->getData('links_purchased_separately');
166+
return (bool)$this->getProduct()->getData('links_purchased_separately');
167167
}
168168

169169
/**

app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Data/Links.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function getLinksTitle()
9797
*/
9898
public function isProductLinksCanBePurchasedSeparately()
9999
{
100-
return (bool) $this->locator->getProduct()->getData('links_purchased_separately');
100+
return (bool)$this->locator->getProduct()->getData('links_purchased_separately');
101101
}
102102

103103
/**

app/code/Magento/Payment/Gateway/Command/Result/BoolResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ public function __construct($result = true)
3737
*/
3838
public function get()
3939
{
40-
return (bool) $this->result;
40+
return (bool)$this->result;
4141
}
4242
}

app/code/Magento/Paypal/Block/Express/InContext/Component.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,6 @@ public function getMerchantId()
102102
*/
103103
public function isButtonContext()
104104
{
105-
return (bool) $this->getData(self::IS_BUTTON_CONTEXT_INDEX);
105+
return (bool)$this->getData(self::IS_BUTTON_CONTEXT_INDEX);
106106
}
107107
}

app/code/Magento/Paypal/etc/adminhtml/system/express_checkout.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@
198198
<attribute type="shared">1</attribute>
199199
</field>
200200
<field id="bml_wizard" translate="button_label" sortOrder="15" showInDefault="1" showInWebsite="1">
201-
<label></label>
202201
<button_label>Get Publisher ID from PayPal</button_label>
203202
<button_url><![CDATA[https:/financing.paypal.com/ppfinportal/cart/index?dcp=4eff8563b9cc505e0b9afaff3256705081553c79]]></button_url>
204203
<frontend_model>Magento\Paypal\Block\Adminhtml\System\Config\BmlApiWizard</frontend_model>

app/code/Magento/Security/Model/Plugin/AuthSession.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,6 @@ private function addUserLogoutNotification()
9595
*/
9696
private function isAjaxRequest()
9797
{
98-
return (bool) $this->request->getParam('isAjax');
98+
return (bool)$this->request->getParam('isAjax');
9999
}
100100
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function execute($uri, $request)
4747
*/
4848
public function isEnabled()
4949
{
50-
return (bool) $this->scopeConfig->getValue(
50+
return (bool)$this->scopeConfig->getValue(
5151
'web/url/redirect_to_base',
5252
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
5353
);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ public function getDefaultProductTaxClass()
690690
*/
691691
public function isCrossBorderTradeEnabled($store = null)
692692
{
693-
return (bool) $this->_config->crossBorderTradeEnabled($store);
693+
return (bool)$this->_config->crossBorderTradeEnabled($store);
694694
}
695695

696696
/**

app/code/Magento/Tax/Model/Calculation/Rule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public function getPosition()
214214
*/
215215
public function getCalculateSubtotal()
216216
{
217-
return (bool) $this->getData(self::KEY_CALCULATE_SUBTOTAL);
217+
return (bool)$this->getData(self::KEY_CALCULATE_SUBTOTAL);
218218
}
219219

220220
/**

app/code/Magento/Ui/Component/Form/Element/AbstractElement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function getFormInputName()
4444
*/
4545
public function isReadonly()
4646
{
47-
return (bool) $this->getData('readonly');
47+
return (bool)$this->getData('readonly');
4848
}
4949

5050
/**

dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Indexer/IndexSwitcherMock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ public function switchIndex(array $dimensions)
4646
*/
4747
public function isSwitched()
4848
{
49-
return (bool) $this->isSwitched;
49+
return (bool)$this->isSwitched;
5050
}
5151
}

dev/tests/integration/testsuite/Magento/Paypal/Model/Config/Structure/Reader/_files/expected/config.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,6 @@
767767
<attribute type="shared">1</attribute>
768768
</field>
769769
<field id="bml_wizard" translate="button_label" sortOrder="15" showInDefault="1" showInWebsite="1">
770-
<label></label>
771770
<button_label>Get Publisher ID from PayPal</button_label>
772771
<button_url><![CDATA[https:/financing.paypal.com/ppfinportal/cart/index?dcp=4eff8563b9cc505e0b9afaff3256705081553c79]]></button_url>
773772
<frontend_model>Magento\Paypal\Block\Adminhtml\System\Config\BmlApiWizard</frontend_model>

dev/tests/integration/testsuite/Magento/Sales/_files/invoice_list.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
],
5454
];
5555

56-
/** @var array $creditMemoData */
56+
/** @var array $invoiceData */
5757
foreach ($invoices as $invoiceData) {
58-
/** @var \Magento\Sales\Model\Order\Creditmemo $creditMemo */
58+
/** @var \Magento\Sales\Model\Order\Invoice $invoice */
5959
$invoice = $objectManager->create(\Magento\Sales\Model\Order\Invoice::class);
6060
$invoice
6161
->setData($invoiceData)

lib/internal/Magento/Framework/Config/FileIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function next()
9898
*/
9999
public function valid()
100100
{
101-
return (bool) $this->key();
101+
return (bool)$this->key();
102102
}
103103

104104
/**

lib/internal/Magento/Framework/Model/AbstractModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ protected function _hasModelChanged()
620620
*/
621621
public function isSaveAllowed()
622622
{
623-
return (bool) $this->_dataSaveAllowed;
623+
return (bool)$this->_dataSaveAllowed;
624624
}
625625

626626
/**

lib/internal/Magento/Framework/Url.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,13 +390,13 @@ protected function _isSecure()
390390
{
391391
if ($this->_request->isSecure()) {
392392
if ($this->getRouteParamsResolver()->hasData('secure')) {
393-
return (bool) $this->getRouteParamsResolver()->getData('secure');
393+
return (bool)$this->getRouteParamsResolver()->getData('secure');
394394
}
395395
return true;
396396
}
397397

398398
if ($this->getRouteParamsResolver()->hasData('secure_is_forced')) {
399-
return (bool) $this->getRouteParamsResolver()->getData('secure');
399+
return (bool)$this->getRouteParamsResolver()->getData('secure');
400400
}
401401

402402
if (!$this->_getScope()->isUrlSecure()) {

lib/web/mage/utils/wrapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ define([
4545
return {
4646

4747
/**
48-
* Wraps target function with a specified wrapper, which will recieve
48+
* Wraps target function with a specified wrapper, which will receive
4949
* reference to the original function as a first argument.
5050
*
5151
* @param {Function} target - Function to be wrapped.

0 commit comments

Comments
 (0)