Skip to content

Commit 8fb6fe1

Browse files
author
Stanislav Idolov
authored
ENGCOM-3013: [Backport] [2.2] Changed intval($val) to (int) $val, since it is faster: #18126
2 parents ea1ace7 + b4dcf35 commit 8fb6fe1

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88

99
namespace Magento\Bundle\Model\Product;
1010

11-
use Magento\Framework\App\ObjectManager;
11+
use Magento\Bundle\Model\ResourceModel\Selection\Collection as Selections;
12+
use Magento\Bundle\Model\ResourceModel\Selection\Collection\FilterApplier as SelectionCollectionFilterApplier;
1213
use Magento\Catalog\Api\ProductRepositoryInterface;
14+
use Magento\Framework\App\ObjectManager;
15+
use Magento\Framework\EntityManager\MetadataPool;
1316
use Magento\Framework\Pricing\PriceCurrencyInterface;
1417
use Magento\Framework\Serialize\Serializer\Json;
15-
use Magento\Framework\EntityManager\MetadataPool;
16-
use Magento\Bundle\Model\ResourceModel\Selection\Collection\FilterApplier as SelectionCollectionFilterApplier;
17-
use Magento\Bundle\Model\ResourceModel\Selection\Collection as Selections;
1818

1919
/**
2020
* Bundle Type Model

app/code/Magento/Catalog/Block/Product/Widget/NewWidget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public function getCacheKeyInfo()
139139
[
140140
$this->getDisplayType(),
141141
$this->getProductsPerPage(),
142-
intval($this->getRequest()->getParam($this->getData('page_var_name'), 1)),
142+
(int) $this->getRequest()->getParam($this->getData('page_var_name'), 1),
143143
$this->serializer->serialize($this->getRequest()->getParams())
144144
]
145145
);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function process(\DOMElement $mediaNode, $mediaParentTag)
3636
if ($attributeTagName === 'background') {
3737
$nodeValue = $this->processImageBackground($attribute->nodeValue);
3838
} elseif ($attributeTagName === 'width' || $attributeTagName === 'height') {
39-
$nodeValue = (int)$attribute->nodeValue;
39+
$nodeValue = (int)$attribute->nodeValue;
4040
} else {
4141
$nodeValue = $attribute->nodeValue;
4242
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
use Magento\Catalog\Model\ProductFactory;
1212
use Magento\CatalogInventory\Api\Data\StockItemInterface;
1313
use Magento\CatalogInventory\Model\Spi\StockStateProviderInterface;
14+
use Magento\Framework\DataObject\Factory as ObjectFactory;
1415
use Magento\Framework\Locale\FormatInterface;
1516
use Magento\Framework\Math\Division as MathDivision;
16-
use Magento\Framework\DataObject\Factory as ObjectFactory;
1717

1818
/**
1919
* Interface StockStateProvider

app/code/Magento/CatalogWidget/Block/Product/ProductsList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public function getCacheKeyInfo()
164164
$this->_storeManager->getStore()->getId(),
165165
$this->_design->getDesignTheme()->getId(),
166166
$this->httpContext->getValue(\Magento\Customer\Model\Context::CONTEXT_GROUP),
167-
intval($this->getRequest()->getParam($this->getData('page_var_name'), 1)),
167+
(int) $this->getRequest()->getParam($this->getData('page_var_name'), 1),
168168
$this->getProductsPerPage(),
169169
$conditions,
170170
$this->json->serialize($this->getRequest()->getParams()),

0 commit comments

Comments
 (0)