Skip to content

Commit 95d2969

Browse files
author
Stanislav Idolov
authored
🔃 [EngCom] Public Pull Requests - 2.2-develop
Accepted Public Pull Requests: - #17002: [Backport] Remove unused comments from _initDiscount() function (by @mageprince) - #16980: Fixed a couple of spelling mistakes (by @mage2pratik) - #16977: Removed double occurrences from Magento modules (by @mage2pratik) - #16978: Wrong namespace defined in compare.phtml (by @ronak2ram) - #16928: Reduce lengthy code of LoginPost (by @GlennCheng) - #16937: Revert changing file permissions in #15144 (by @ihor-sviziev) - #16924: Replacing Usage of Deprecated Methods for Message Manager. (by @tiagosampaio) - #16889: Microrefactoring in product gallery block helper (by @likemusic) - #16890: hide cookie notice instead of reloading site (by @torhoehn) - #16903: Fixes white color coding standard. (by @chirag-wagento) - #16899: Fixing annotations for some methods. (by @tiagosampaio) - #16880: Array short syntax (by @lfluvisotto) - #16891: Remove commented code (by @mage2pratik) - #16882: Remove duplicated string. (by @likemusic) - #16851: Remove direct use of object manager (by @AnshuMishra17) - #16840: Log when Magento is in maintenance mode (by @Ethan3600) - #16841: Clean code (by @GraysonChiang) - #16785: Avoid undefined index warning when using uppercase reserved word (by @FreekVandeursen) - #16707: Update regex in ControllerAclTest (by @aleron75) - #16579: removed _responsive.less import from gallery.less (by @Karlasa)
2 parents 31c3293 + f48590c commit 95d2969

File tree

99 files changed

+230
-226
lines changed

Some content is hidden

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

99 files changed

+230
-226
lines changed

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

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

6363
/**

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/Dashboard/Bar.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ public function getTotals()
3838
*/
3939
public function addTotal($label, $value, $isQuantity = false)
4040
{
41-
/*if (!$isQuantity) {
42-
$value = $this->format($value);
43-
$decimals = substr($value, -2);
44-
$value = substr($value, 0, -2);
45-
} else {
46-
$value = ($value != '')?$value:0;
47-
$decimals = '';
48-
}*/
4941
if (!$isQuantity) {
5042
$value = $this->format($value);
5143
}

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/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/BundleImportExport/Model/Export/RowCustomizer.php

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

327327
/**
@@ -332,7 +332,7 @@ protected function getTypeValue($type)
332332
*/
333333
protected function getPriceViewValue($type)
334334
{
335-
return isset($this->priceViewMapping[$type]) ? $this->priceViewMapping[$type] : self::VALUE_PRICE_RANGE;
335+
return $this->priceViewMapping[$type] ?? self::VALUE_PRICE_RANGE;
336336
}
337337

338338
/**
@@ -343,7 +343,7 @@ protected function getPriceViewValue($type)
343343
*/
344344
protected function getPriceTypeValue($type)
345345
{
346-
return isset($this->priceTypeMapping[$type]) ? $this->priceTypeMapping[$type] : null;
346+
return $this->priceTypeMapping[$type] ?? null;
347347
}
348348

349349
/**
@@ -354,7 +354,7 @@ protected function getPriceTypeValue($type)
354354
*/
355355
private function getShipmentTypeValue($type)
356356
{
357-
return isset($this->shipmentTypeMapping[$type]) ? $this->shipmentTypeMapping[$type] : null;
357+
return $this->shipmentTypeMapping[$type] ?? null;
358358
}
359359

360360
/**

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/Attribute/Set/Main/Tree/Attribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ class Attribute extends \Magento\Backend\Block\Template
1414
/**
1515
* @var string
1616
*/
17-
protected $_template = 'catalog/product/attribute/set/main/tree/attribute.phtml';
17+
protected $_template = 'Magento_Catalog::catalog/product/attribute/set/main/tree/attribute.phtml';
1818
}

app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/Gallery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function getElementHtml()
113113
*/
114114
public function getImages()
115115
{
116-
$images = $this->registry->registry('current_product')->getData('media_gallery') ?: null;
116+
$images = $this->getDataObject()->getData('media_gallery') ?: null;
117117
if ($images === null) {
118118
$images = ((array)$this->dataPersistor->get('catalog_product'))['product']['media_gallery'] ?? null;
119119
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public function getImageAttribute($imageId, $attributeName, $default = null)
175175
{
176176
$attributes =
177177
$this->getConfigView()->getMediaAttributes('Magento_Catalog', Image::MEDIA_TYPE_CONFIG_NODE, $imageId);
178-
return isset($attributes[$attributeName]) ? $attributes[$attributeName] : $default;
178+
return $attributes[$attributeName] ?? $default;
179179
}
180180

181181
/**

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ public function execute()
4444
$this->_eventManager->dispatch('catalog_controller_category_delete', ['category' => $category]);
4545
$this->_auth->getAuthStorage()->setDeletedPath($category->getPath());
4646
$this->categoryRepository->delete($category);
47-
$this->messageManager->addSuccess(__('You deleted the category.'));
47+
$this->messageManager->addSuccessMessage(__('You deleted the category.'));
4848
} catch (\Magento\Framework\Exception\LocalizedException $e) {
49-
$this->messageManager->addError($e->getMessage());
49+
$this->messageManager->addErrorMessage($e->getMessage());
5050
return $resultRedirect->setPath('catalog/*/edit', ['_current' => true]);
5151
} catch (\Exception $e) {
52-
$this->messageManager->addError(__('Something went wrong while trying to delete the category.'));
52+
$this->messageManager->addErrorMessage(__('Something went wrong while trying to delete the category.'));
5353
return $resultRedirect->setPath('catalog/*/edit', ['_current' => true]);
5454
}
5555
}

app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected function _validateProducts()
5656
}
5757

5858
if ($error) {
59-
$this->messageManager->addError($error);
59+
$this->messageManager->addErrorMessage($error);
6060
}
6161

6262
return !$error;

app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public function execute()
192192
$this->_eventManager->dispatch('catalog_product_to_website_change', ['products' => $productIds]);
193193
}
194194

195-
$this->messageManager->addSuccess(
195+
$this->messageManager->addSuccessMessage(
196196
__('A total of %1 record(s) were updated.', count($this->attributeHelper->getProductIds()))
197197
);
198198

@@ -205,9 +205,9 @@ public function execute()
205205
$this->_productPriceIndexerProcessor->reindexList($this->attributeHelper->getProductIds());
206206
}
207207
} catch (\Magento\Framework\Exception\LocalizedException $e) {
208-
$this->messageManager->addError($e->getMessage());
208+
$this->messageManager->addErrorMessage($e->getMessage());
209209
} catch (\Exception $e) {
210-
$this->messageManager->addException(
210+
$this->messageManager->addExceptionMessage(
211211
$e,
212212
__('Something went wrong while updating the product(s) attributes.')
213213
);

app/code/Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Validate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function execute()
6868
$response->setError(true);
6969
$response->setMessage($e->getMessage());
7070
} catch (\Exception $e) {
71-
$this->messageManager->addException(
71+
$this->messageManager->addExceptionMessage(
7272
$e,
7373
__('Something went wrong while updating the product(s) attributes.')
7474
);

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Delete.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@ public function execute()
2121
// entity type check
2222
$model->load($id);
2323
if ($model->getEntityTypeId() != $this->_entityTypeId) {
24-
$this->messageManager->addError(__('We can\'t delete the attribute.'));
24+
$this->messageManager->addErrorMessage(__('We can\'t delete the attribute.'));
2525
return $resultRedirect->setPath('catalog/*/');
2626
}
2727

2828
try {
2929
$model->delete();
30-
$this->messageManager->addSuccess(__('You deleted the product attribute.'));
30+
$this->messageManager->addSuccessMessage(__('You deleted the product attribute.'));
3131
return $resultRedirect->setPath('catalog/*/');
3232
} catch (\Exception $e) {
33-
$this->messageManager->addError($e->getMessage());
33+
$this->messageManager->addErrorMessage($e->getMessage());
3434
return $resultRedirect->setPath(
3535
'catalog/*/edit',
3636
['attribute_id' => $this->getRequest()->getParam('attribute_id')]
3737
);
3838
}
3939
}
40-
$this->messageManager->addError(__('We can\'t find an attribute to delete.'));
40+
$this->messageManager->addErrorMessage(__('We can\'t find an attribute to delete.'));
4141
return $resultRedirect->setPath('catalog/*/');
4242
}
4343
}

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ public function execute()
2525
$model->load($id);
2626

2727
if (!$model->getId()) {
28-
$this->messageManager->addError(__('This attribute no longer exists.'));
28+
$this->messageManager->addErrorMessage(__('This attribute no longer exists.'));
2929
$resultRedirect = $this->resultRedirectFactory->create();
3030
return $resultRedirect->setPath('catalog/*/');
3131
}
3232

3333
// entity type check
3434
if ($model->getEntityTypeId() != $this->_entityTypeId) {
35-
$this->messageManager->addError(__('This attribute cannot be edited.'));
35+
$this->messageManager->addErrorMessage(__('This attribute cannot be edited.'));
3636
$resultRedirect = $this->resultRedirectFactory->create();
3737
return $resultRedirect->setPath('catalog/*/');
3838
}

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Validate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function execute()
9191
$attributeSet->setEntityTypeId($this->_entityTypeId)->load($setName, 'attribute_set_name');
9292
if ($attributeSet->getId()) {
9393
$setName = $this->_objectManager->get(\Magento\Framework\Escaper::class)->escapeHtml($setName);
94-
$this->messageManager->addError(__('An attribute set named \'%1\' already exists.', $setName));
94+
$this->messageManager->addErrorMessage(__('An attribute set named \'%1\' already exists.', $setName));
9595

9696
$layout = $this->layoutFactory->create();
9797
$layout->initMessages();

app/code/Magento/Catalog/Controller/Adminhtml/Product/Duplicate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ public function execute()
4343
$product = $this->productBuilder->build($this->getRequest());
4444
try {
4545
$newProduct = $this->productCopier->copy($product);
46-
$this->messageManager->addSuccess(__('You duplicated the product.'));
46+
$this->messageManager->addSuccessMessage(__('You duplicated the product.'));
4747
$resultRedirect->setPath('catalog/*/edit', ['_current' => true, 'id' => $newProduct->getId()]);
4848
} catch (\Exception $e) {
4949
$this->_objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e);
50-
$this->messageManager->addError($e->getMessage());
50+
$this->messageManager->addErrorMessage($e->getMessage());
5151
$resultRedirect->setPath('catalog/*/edit', ['_current' => true]);
5252
}
5353
return $resultRedirect;

app/code/Magento/Catalog/Controller/Adminhtml/Product/Edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ public function execute()
5252
if (($productId && !$product->getEntityId())) {
5353
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
5454
$resultRedirect = $this->resultRedirectFactory->create();
55-
$this->messageManager->addError(__('This product doesn\'t exist.'));
55+
$this->messageManager->addErrorMessage(__('This product doesn\'t exist.'));
5656
return $resultRedirect->setPath('catalog/*/');
5757
} elseif ($productId === 0) {
5858
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
5959
$resultRedirect = $this->resultRedirectFactory->create();
60-
$this->messageManager->addError(__('Invalid product id. Should be numeric value greater than 0'));
60+
$this->messageManager->addErrorMessage(__('Invalid product id. Should be numeric value greater than 0'));
6161
return $resultRedirect->setPath('catalog/*/');
6262
}
6363

app/code/Magento/Catalog/Controller/Adminhtml/Product/Group/Save.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ public function execute()
2929
);
3030

3131
if ($model->itemExists()) {
32-
$this->messageManager->addError(__('A group with the same name already exists.'));
32+
$this->messageManager->addErrorMessage(__('A group with the same name already exists.'));
3333
} else {
3434
try {
3535
$model->save();
3636
} catch (\Exception $e) {
37-
$this->messageManager->addError(__('Something went wrong while saving this group.'));
37+
$this->messageManager->addErrorMessage(__('Something went wrong while saving this group.'));
3838
}
3939
}
4040
}

app/code/Magento/Catalog/Controller/Adminhtml/Product/MassDelete.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function execute()
6666
}
6767

6868
if ($productDeleted) {
69-
$this->messageManager->addSuccess(
69+
$this->messageManager->addSuccessMessage(
7070
__('A total of %1 record(s) have been deleted.', $productDeleted)
7171
);
7272
}

app/code/Magento/Catalog/Controller/Adminhtml/Product/MassStatus.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,12 @@ public function execute()
9494
$this->_validateMassStatus($productIds, $status);
9595
$this->_objectManager->get(\Magento\Catalog\Model\Product\Action::class)
9696
->updateAttributes($productIds, ['status' => $status], $storeId);
97-
$this->messageManager->addSuccess(__('A total of %1 record(s) have been updated.', count($productIds)));
97+
$this->messageManager->addSuccessMessage(
98+
__('A total of %1 record(s) have been updated.', count($productIds))
99+
);
98100
$this->_productPriceIndexerProcessor->reindexList($productIds);
99101
} catch (\Magento\Framework\Exception\LocalizedException $e) {
100-
$this->messageManager->addError($e->getMessage());
102+
$this->messageManager->addErrorMessage($e->getMessage());
101103
} catch (\Exception $e) {
102104
$this->_getSession()->addException($e, __('Something went wrong while updating the product(s) status.'));
103105
}

app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Delete.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ public function execute()
3636
$resultRedirect = $this->resultRedirectFactory->create();
3737
try {
3838
$this->attributeSetRepository->deleteById($setId);
39-
$this->messageManager->addSuccess(__('The attribute set has been removed.'));
39+
$this->messageManager->addSuccessMessage(__('The attribute set has been removed.'));
4040
$resultRedirect->setPath('catalog/*/');
4141
} catch (\Exception $e) {
42-
$this->messageManager->addError(__('We can\'t delete this set right now.'));
42+
$this->messageManager->addErrorMessage(__('We can\'t delete this set right now.'));
4343
$resultRedirect->setUrl($this->_redirect->getRedirectUrl($this->getUrl('*')));
4444
}
4545
return $resultRedirect;

app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ public function execute()
127127
$model->initFromSkeleton($this->getRequest()->getParam('skeleton_set'));
128128
}
129129
$model->save();
130-
$this->messageManager->addSuccess(__('You saved the attribute set.'));
130+
$this->messageManager->addSuccessMessage(__('You saved the attribute set.'));
131131
} catch (\Magento\Framework\Exception\AlreadyExistsException $e) {
132132
$this->messageManager->addErrorMessage($e->getMessage());
133133
$hasError = true;
134134
} catch (\Magento\Framework\Exception\LocalizedException $e) {
135-
$this->messageManager->addError($e->getMessage());
135+
$this->messageManager->addErrorMessage($e->getMessage());
136136
$hasError = true;
137137
} catch (\Exception $e) {
138-
$this->messageManager->addException($e, __('Something went wrong while saving the attribute set.'));
138+
$this->messageManager->addExceptionMessage($e, __('Something went wrong while saving the attribute set.'));
139139
$hasError = true;
140140
}
141141

app/code/Magento/Catalog/Controller/Adminhtml/Product/Validate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function execute()
137137
$response->setError(true);
138138
$response->setMessages([$e->getMessage()]);
139139
} catch (\Exception $e) {
140-
$this->messageManager->addError($e->getMessage());
140+
$this->messageManager->addErrorMessage($e->getMessage());
141141
$layout = $this->layoutFactory->create();
142142
$layout->initMessages();
143143
$response->setError(true);

app/code/Magento/Catalog/Controller/Product/Compare/Clear.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ public function execute()
3030

3131
try {
3232
$items->clear();
33-
$this->messageManager->addSuccess(__('You cleared the comparison list.'));
33+
$this->messageManager->addSuccessMessage(__('You cleared the comparison list.'));
3434
$this->_objectManager->get(\Magento\Catalog\Helper\Product\Compare::class)->calculate();
3535
} catch (\Magento\Framework\Exception\LocalizedException $e) {
36-
$this->messageManager->addError($e->getMessage());
36+
$this->messageManager->addErrorMessage($e->getMessage());
3737
} catch (\Exception $e) {
38-
$this->messageManager->addException($e, __('Something went wrong clearing the comparison list.'));
38+
$this->messageManager->addExceptionMessage($e, __('Something went wrong clearing the comparison list.'));
3939
}
4040

4141
/** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */

app/code/Magento/Catalog/Controller/Product/Compare/Remove.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function execute()
4444
$item->delete();
4545
$productName = $this->_objectManager->get(\Magento\Framework\Escaper::class)
4646
->escapeHtml($product->getName());
47-
$this->messageManager->addSuccess(
47+
$this->messageManager->addSuccessMessage(
4848
__('You removed product %1 from the comparison list.', $productName)
4949
);
5050
$this->_eventManager->dispatch(

app/code/Magento/Catalog/Controller/Product/View.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,16 @@ public function execute()
8181
&& $this->_request->getParam(self::PARAM_NAME_URL_ENCODED)
8282
) {
8383
$product = $this->_initProduct();
84+
8485
if (!$product) {
8586
return $this->noProductRedirect();
8687
}
88+
8789
if ($specifyOptions) {
8890
$notice = $product->getTypeInstance()->getSpecifyOptionMessage();
89-
$this->messageManager->addNotice($notice);
91+
$this->messageManager->addNoticeMessage($notice);
9092
}
93+
9194
if ($this->getRequest()->isAjax()) {
9295
$this->getResponse()->representJson(
9396
$this->_objectManager->get(\Magento\Framework\Json\Helper\Data::class)->jsonEncode([

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
/**

0 commit comments

Comments
 (0)