Skip to content

Commit 61fb87f

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #17960: [Forwardport] Move functions.php into Framework (by @fooman) - #17765: [Forwardport] Clean code (by @nmalevanec) - #17768: [Forwardport] Fix proxy generation return type (by @nmalevanec) - #17941: [Forwardport] Sales: Add unit test for validator model class (by @dmytro-ch) - #17946: [2.3] changed intval($val) to (int) $val, since `(int) $val ` is faster. (by @TBlindaruk) - #17938: Replace sort callbacks to spaceship operator (by @mage2pratik) - #17922: [Forwardport] API-functional test for Search (by @mage2pratik) - #17921: [Forwardport] Remove leading Countrycode from EU-VAT-Numbers (by @mage2pratik) - #17874: [Forwardport] Fix - Next Page button triggered when filtering Customer grid (by @ronak2ram) - #17911: [Forwardport] Resolved : Wishlist icon cut on Shopping cart page in mobile view #17851 #27 (by @hitesh-wagento) - #17848: Fix for invalid JSON if image label contains HTML markup, example " (by @jeroenschipper) - #17832: [Forwardport] Fix translation issue (by @nmalevanec) - #17837: [Forwardport] [Search] Unit test for SynonymAnalyzer model (by @furseyev) - #17829: [Forwardport] CSS load order incorrect using default_head_blocks.xml #1821 (by @nmalevanec) - #17750: [Forwardport] Unable to change attribute type from swatch (by @nmalevanec) - #17650: Use route ID when creating secret keys in backend menus instead of route name (by @lfolco) Fixed GitHub Issues: - #17789: Next Page button triggered when filtering Customer grid (reported by @lucasjor-summa) has been fixed in #17874 by @ronak2ram in 2.3-develop branch Related commits: 1. 92c1aa4 2. a2993a5 3. c580a46 - #17851: Wishlist icon cut on Shopping cart page in mobile view (reported by @hitesh-wagento) has been fixed in #17911 by @hitesh-wagento in 2.3-develop branch Related commits: 1. f0b5ecc - #1821: CSS load order incorrect using default_head_blocks.xml (reported by @chicgeek) has been fixed in #17829 by @nmalevanec in 2.3-develop branch Related commits: 1. d3e24ed 2. fe6c96f - #9307: Color attribute taking swatch instead of Drop down option for configurable options, (reported by @vishveskrish) has been fixed in #17750 by @nmalevanec in 2.3-develop branch Related commits: 1. 0f28b61 2. d159921 - #9923: Upgrading to 2.1.7 changed dropdown attributes to swatches (reported by @roseofgold) has been fixed in #17750 by @nmalevanec in 2.3-develop branch Related commits: 1. 0f28b61 2. d159921 - #11403: Product Attributes Not Updating on Frontend (reported by @rbur0425) has been fixed in #17750 by @nmalevanec in 2.3-develop branch Related commits: 1. 0f28b61 2. d159921 - #11703: Changing Swatches to Drop-down does not remove swatches from existing products (reported by @expgabe) has been fixed in #17750 by @nmalevanec in 2.3-develop branch Related commits: 1. 0f28b61 2. d159921 - #12695: Unable to change attribute type from swatch to dropdown (reported by @alena-marchenko) has been fixed in #17750 by @nmalevanec in 2.3-develop branch Related commits: 1. 0f28b61 2. d159921 - #7557: Backend Security key broken for controllers with frontname not equal to route ID (reported by @AlexandreKhayrullin) has been fixed in #17650 by @lfolco in 2.3-develop branch Related commits: 1. 2662dfa 2. a0dfb6d 3. 35eba04 4. 600a185 5. 062286e 6. c3d700a 7. be7c961 8. fa8a222 9. b738ce6 10. af3507a
2 parents cfaa388 + f767f7b commit 61fb87f

File tree

73 files changed

+677
-180
lines changed

Some content is hidden

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

73 files changed

+677
-180
lines changed

app/bootstrap.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
// Sets default autoload mappings, may be overridden in Bootstrap::create
3232
\Magento\Framework\App\Bootstrap::populateAutoloader(BP, []);
3333

34-
require_once BP . '/app/functions.php';
35-
3634
/* Custom umask value may be provided in optional mage_umask file in root */
3735
$umaskFile = BP . '/magento_umask';
3836
$mask = file_exists($umaskFile) ? octdec(file_get_contents($umaskFile)) : 002;

app/code/Magento/Analytics/ReportXml/ReportProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function __construct(
5555
private function getIteratorName(Query $query)
5656
{
5757
$config = $query->getConfig();
58-
return isset($config['iterator']) ? $config['iterator'] : null;
58+
return $config['iterator'] ?? null;
5959
}
6060

6161
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ public function __construct(\Magento\Backend\App\ConfigInterface $config)
4242
*/
4343
public function getPart($code)
4444
{
45-
return isset($this->_parts[$code]) ? $this->_parts[$code] : null;
45+
return $this->_parts[$code] ?? null;
4646
}
4747
}

app/code/Magento/Backend/Block/Menu.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,23 @@ class Menu extends \Magento\Backend\Block\Template
7474
*/
7575
private $anchorRenderer;
7676

77+
/**
78+
* @var ConfigInterface
79+
*/
80+
private $routeConfig;
81+
7782
/**
7883
* @param Template\Context $context
7984
* @param \Magento\Backend\Model\UrlInterface $url
8085
* @param \Magento\Backend\Model\Menu\Filter\IteratorFactory $iteratorFactory
8186
* @param \Magento\Backend\Model\Auth\Session $authSession
8287
* @param \Magento\Backend\Model\Menu\Config $menuConfig
8388
* @param \Magento\Framework\Locale\ResolverInterface $localeResolver
89+
* @param \Magento\Framework\App\Route\ConfigInterface $routeConfig
8490
* @param array $data
8591
* @param MenuItemChecker|null $menuItemChecker
8692
* @param AnchorRenderer|null $anchorRenderer
93+
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
8794
*/
8895
public function __construct(
8996
\Magento\Backend\Block\Template\Context $context,
@@ -94,7 +101,8 @@ public function __construct(
94101
\Magento\Framework\Locale\ResolverInterface $localeResolver,
95102
array $data = [],
96103
MenuItemChecker $menuItemChecker = null,
97-
AnchorRenderer $anchorRenderer = null
104+
AnchorRenderer $anchorRenderer = null,
105+
\Magento\Framework\App\Route\ConfigInterface $routeConfig = null
98106
) {
99107
$this->_url = $url;
100108
$this->_iteratorFactory = $iteratorFactory;
@@ -103,6 +111,9 @@ public function __construct(
103111
$this->_localeResolver = $localeResolver;
104112
$this->menuItemChecker = $menuItemChecker;
105113
$this->anchorRenderer = $anchorRenderer;
114+
$this->routeConfig = $routeConfig ?:
115+
\Magento\Framework\App\ObjectManager::getInstance()
116+
->get(\Magento\Framework\App\Route\ConfigInterface::class);
106117
parent::__construct($context, $data);
107118
}
108119

@@ -203,8 +214,9 @@ protected function _afterToHtml($html)
203214
*/
204215
protected function _callbackSecretKey($match)
205216
{
217+
$routeId = $this->routeConfig->getRouteByFrontName($match[1]);
206218
return \Magento\Backend\Model\UrlInterface::SECRET_KEY_PARAM_NAME . '/' . $this->_url->getSecretKey(
207-
$match[1],
219+
$routeId,
208220
$match[2],
209221
$match[3]
210222
);

app/code/Magento/Backend/Block/Widget/Button/ButtonList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ public function getItems()
127127
*/
128128
public function sortButtons(Item $itemA, Item $itemB)
129129
{
130-
$sortOrderA = intval($itemA->getSortOrder());
131-
$sortOrderB = intval($itemB->getSortOrder());
130+
$sortOrderA = (int) $itemA->getSortOrder();
131+
$sortOrderB = (int) $itemB->getSortOrder();
132132

133133
if ($sortOrderA == $sortOrderB) {
134134
return 0;

app/code/Magento/Backend/Model/Menu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function add(Item $item, $parentId = null, $index = null)
8383
}
8484
$parentItem->getChildren()->add($item, null, $index);
8585
} else {
86-
$index = intval($index);
86+
$index = (int) $index;
8787
if (!isset($this[$index])) {
8888
$this->offsetSet($index, $item);
8989
$this->_logger->info(

app/code/Magento/Backend/Model/Menu/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,6 @@ public function getResult(\Magento\Backend\Model\Menu $menu)
102102
*/
103103
protected function _getParam($params, $paramName, $defaultValue = null)
104104
{
105-
return isset($params[$paramName]) ? $params[$paramName] : $defaultValue;
105+
return $params[$paramName] ?? $defaultValue;
106106
}
107107
}

app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ $numColumns = !is_null($block->getColumns()) ? sizeof($block->getColumns()) : 0;
107107
<?= /* @escapeNotVerified */ __('of %1', '<span>' . $block->getCollection()->getLastPageNumber() . '</span>') ?>
108108
</label>
109109
<?php if ($_curPage < $_lastPage): ?>
110-
<button title="<?= /* @escapeNotVerified */ __('Next page') ?>"
110+
<button type="button" title="<?= /* @escapeNotVerified */ __('Next page') ?>"
111111
class="action-next"
112112
onclick="<?= /* @escapeNotVerified */ $block->getJsObjectName() ?>.setPage('<?= /* @escapeNotVerified */ ($_curPage + 1) ?>');return false;">
113113
<span><?= /* @escapeNotVerified */ __('Next page') ?></span>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function getBackupsDir()
110110
public function getExtensionByType($type)
111111
{
112112
$extensions = $this->getExtensions();
113-
return isset($extensions[$type]) ? $extensions[$type] : '';
113+
return $extensions[$type] ?? '';
114114
}
115115

116116
/**

app/code/Magento/Backup/Model/Config/Backend/Cron.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ public function afterSave()
7676

7777
if ($enabled) {
7878
$cronExprArray = [
79-
intval($time[1]), # Minute
80-
intval($time[0]), # Hour
79+
(int) $time[1], # Minute
80+
(int) $time[0], # Hour
8181
$frequency == $frequencyMonthly ? '1' : '*', # Day of the Month
8282
'*', # Month of the Year
8383
$frequency == $frequencyWeekly ? '1' : '*', # Day of the Week

app/code/Magento/Bundle/Model/Product/Type.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ public function updateQtyOption($options, \Magento\Framework\DataObject $option,
559559
*/
560560
public function prepareQuoteItemQty($qty, $product)
561561
{
562-
return intval($qty);
562+
return (int) $qty;
563563
}
564564

565565
/**

app/code/Magento/BundleImportExport/Model/Export/RowCustomizer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ function ($title, $storeName) {
322322
*/
323323
protected function getTypeValue($type)
324324
{
325-
return isset($this->typeMapping[$type]) ? $this->typeMapping[$type] : self::VALUE_DYNAMIC;
325+
return $this->typeMapping[$type] ?? self::VALUE_DYNAMIC;
326326
}
327327

328328
/**
@@ -333,7 +333,7 @@ protected function getTypeValue($type)
333333
*/
334334
protected function getPriceViewValue($type)
335335
{
336-
return isset($this->priceViewMapping[$type]) ? $this->priceViewMapping[$type] : self::VALUE_PRICE_RANGE;
336+
return $this->priceViewMapping[$type] ?? self::VALUE_PRICE_RANGE;
337337
}
338338

339339
/**
@@ -344,7 +344,7 @@ protected function getPriceViewValue($type)
344344
*/
345345
protected function getPriceTypeValue($type)
346346
{
347-
return isset($this->priceTypeMapping[$type]) ? $this->priceTypeMapping[$type] : null;
347+
return $this->priceTypeMapping[$type] ?? null;
348348
}
349349

350350
/**
@@ -355,7 +355,7 @@ protected function getPriceTypeValue($type)
355355
*/
356356
private function getShipmentTypeValue($type)
357357
{
358-
return isset($this->shipmentTypeMapping[$type]) ? $this->shipmentTypeMapping[$type] : null;
358+
return $this->shipmentTypeMapping[$type] ?? null;
359359
}
360360

361361
/**

app/code/Magento/Captcha/Observer/CaptchaStringResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ public function resolve(\Magento\Framework\App\RequestInterface $request, $formI
1818
{
1919
$captchaParams = $request->getPost(\Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE);
2020

21-
return isset($captchaParams[$formId]) ? $captchaParams[$formId] : '';
21+
return $captchaParams[$formId] ?? '';
2222
}
2323
}

app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Inventory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function getFieldSuffix()
7474
public function getStoreId()
7575
{
7676
$storeId = $this->getRequest()->getParam('store');
77-
return intval($storeId);
77+
return (int) $storeId;
7878
}
7979

8080
/**

app/code/Magento/Catalog/Block/Product/ProductList/Upsell.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
namespace Magento\Catalog\Block\Product\ProductList;
88

99
use Magento\Catalog\Model\ResourceModel\Product\Collection;
10-
use Magento\Framework\View\Element\AbstractBlock;
1110

1211
/**
1312
* Catalog product upsell items block
@@ -170,8 +169,8 @@ public function getRowCount()
170169
*/
171170
public function setColumnCount($columns)
172171
{
173-
if (intval($columns) > 0) {
174-
$this->_columnCount = intval($columns);
172+
if ((int) $columns > 0) {
173+
$this->_columnCount = (int) $columns;
175174
}
176175
return $this;
177176
}
@@ -213,8 +212,8 @@ public function getIterableItem()
213212
*/
214213
public function setItemLimit($type, $limit)
215214
{
216-
if (intval($limit) > 0) {
217-
$this->_itemLimits[$type] = intval($limit);
215+
if ((int) $limit > 0) {
216+
$this->_itemLimits[$type] = (int) $limit;
218217
}
219218
return $this;
220219
}

app/code/Magento/Catalog/Block/Product/View/Gallery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public function getImageAttribute($imageId, $attributeName, $default = null)
205205
{
206206
$attributes =
207207
$this->getConfigView()->getMediaAttributes('Magento_Catalog', Image::MEDIA_TYPE_CONFIG_NODE, $imageId);
208-
return isset($attributes[$attributeName]) ? $attributes[$attributeName] : $default;
208+
return $attributes[$attributeName] ?? $default;
209209
}
210210

211211
/**

app/code/Magento/Catalog/Cron/FrontendActionsFlush.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ private function getLifeTimeByNamespace($namespace)
5757
];
5858
}
5959

60-
return isset($configuration['lifetime']) ?
61-
(int) $configuration['lifetime'] : FrontendStorageConfigurationInterface::DEFAULT_LIFETIME;
60+
return (int)$configuration['lifetime'] ?? FrontendStorageConfigurationInterface::DEFAULT_LIFETIME;
6261
}
6362

6463
/**

app/code/Magento/Catalog/Helper/Image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ public function getFrame()
859859
*/
860860
protected function getAttribute($name)
861861
{
862-
return isset($this->attributes[$name]) ? $this->attributes[$name] : null;
862+
return $this->attributes[$name] ?? null;
863863
}
864864

865865
/**

app/code/Magento/Catalog/Helper/Output.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function addHandler($method, $handler)
116116
public function getHandlers($method)
117117
{
118118
$method = strtolower($method);
119-
return isset($this->_handlers[$method]) ? $this->_handlers[$method] : [];
119+
return $this->_handlers[$method] ?? [];
120120
}
121121

122122
/**

app/code/Magento/Catalog/Model/Api/SearchCriteria/CollectionProcessor/ConditionProcessor/ConditionBuilder/NativeAttributeCondition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private function mapConditionType(string $conditionType, string $field): string
7777
];
7878
}
7979

80-
return isset($conditionsMap[$conditionType]) ? $conditionsMap[$conditionType] : $conditionType;
80+
return $conditionsMap[$conditionType] ?? $conditionType;
8181
}
8282

8383
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ public function getProductTypeName($id)
381381

382382
$this->loadProductTypes();
383383

384-
return isset($this->_productTypesById[$id]) ? $this->_productTypesById[$id] : false;
384+
return $this->_productTypesById[$id] ?? false;
385385
}
386386

387387
/**

app/code/Magento/Catalog/Model/Indexer/Category/Flat/AbstractAction.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
namespace Magento\Catalog\Model\Indexer\Category\Flat;
88

99
use Magento\Framework\App\ResourceConnection;
10-
use Magento\Framework\EntityManager\MetadataPool;
1110

1211
class AbstractAction
1312
{
@@ -111,7 +110,7 @@ public function getColumns()
111110
public function getMainStoreTable($storeId = \Magento\Store\Model\Store::DEFAULT_STORE_ID)
112111
{
113112
if (is_string($storeId)) {
114-
$storeId = intval($storeId);
113+
$storeId = (int) $storeId;
115114
}
116115

117116
$suffix = sprintf('store_%d', $storeId);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ public function resize()
484484
*/
485485
public function rotate($angle)
486486
{
487-
$angle = intval($angle);
487+
$angle = (int) $angle;
488488
$this->getImageProcessor()->rotate($angle);
489489
return $this;
490490
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ public function getGroupByType($type = null)
323323
self::OPTION_TYPE_TIME => self::OPTION_GROUP_DATE,
324324
];
325325

326-
return isset($optionGroupsToTypes[$type]) ? $optionGroupsToTypes[$type] : '';
326+
return $optionGroupsToTypes[$type] ?? '';
327327
}
328328

329329
/**

app/code/Magento/Catalog/Model/Product/Option/Type/DefaultType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public function getFormattedOptionValue($optionValue)
279279
*/
280280
public function getCustomizedView($optionInfo)
281281
{
282-
return isset($optionInfo['value']) ? $optionInfo['value'] : $optionInfo;
282+
return $optionInfo['value'] ?? $optionInfo;
283283
}
284284

285285
/**

app/code/Magento/Catalog/Model/Product/Option/Validator/Pool.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ public function __construct(array $validators)
2929
*/
3030
public function get($type)
3131
{
32-
return isset($this->validators[$type]) ? $this->validators[$type] : $this->validators['default'];
32+
return $this->validators[$type] ?? $this->validators['default'];
3333
}
3434
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public function getOptions()
232232
public function getOptionText($optionId)
233233
{
234234
$options = $this->getOptionArray();
235-
return isset($options[$optionId]) ? $options[$optionId] : null;
235+
return $options[$optionId] ?? null;
236236
}
237237

238238
/**

app/code/Magento/Catalog/Ui/Component/FilterFactory.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ public function create($attribute, $context, $config = [])
7171
*/
7272
protected function getFilterType($attribute)
7373
{
74-
return isset($this->filterMap[$attribute->getFrontendInput()])
75-
? $this->filterMap[$attribute->getFrontendInput()]
76-
: $this->filterMap['default'];
74+
return $this->filterMap[$attribute->getFrontendInput()] ?? $this->filterMap['default'];
7775
}
7876
}

app/code/Magento/Catalog/Ui/Component/Listing/Columns.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,6 @@ public function prepare()
8080
*/
8181
protected function getFilterType($frontendInput)
8282
{
83-
return isset($this->filterMap[$frontendInput]) ? $this->filterMap[$frontendInput] : $this->filterMap['default'];
83+
return $this->filterMap[$frontendInput] ?? $this->filterMap['default'];
8484
}
8585
}

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
@@ -890,7 +890,7 @@ private function getFormElementsMapValue($value)
890890
{
891891
$valueMap = $this->formElementMapper->getMappings();
892892

893-
return isset($valueMap[$value]) ? $valueMap[$value] : $value;
893+
return $valueMap[$value] ?? $value;
894894
}
895895

896896
/**

app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public function clearFailedCategories()
234234
*/
235235
public function getCategoryById($categoryId)
236236
{
237-
return isset($this->categoriesCache[$categoryId]) ? $this->categoriesCache[$categoryId] : null;
237+
return $this->categoriesCache[$categoryId] ?? null;
238238
}
239239

240240
/**

app/code/Magento/CatalogImportExport/Model/Import/Product/SkuProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public function getNewSku($sku = null)
142142
{
143143
if ($sku !== null) {
144144
$sku = strtolower($sku);
145-
return isset($this->newSkus[$sku]) ? $this->newSkus[$sku] : null;
145+
return $this->newSkus[$sku] ?? null;
146146
}
147147
return $this->newSkus;
148148
}

0 commit comments

Comments
 (0)