Skip to content

Commit 0769b99

Browse files
author
Dmytro Voskoboinikov
committed
Merge branch '2.2-develop' into 2.2.6-develop
2 parents 84c6738 + 7be2b8c commit 0769b99

File tree

249 files changed

+2842
-462
lines changed

Some content is hidden

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

249 files changed

+2842
-462
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/ImageBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected function getRatio(\Magento\Catalog\Helper\Image $helper)
122122
public function create()
123123
{
124124
/** @var \Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface $simpleOption */
125-
$simpleOption = $this->product->getCustomOption('simple_product');
125+
$simpleOption = $this->product->getOptionById('simple_product');
126126

127127
if ($simpleOption !== null) {
128128
$optionProduct = $simpleOption->getProduct();

0 commit comments

Comments
 (0)