File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
app/code/Magento/CatalogInventory/Model/ResourceModel/Stock Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -99,12 +99,9 @@ public function mapWebsiteFilter($website)
99
99
/**
100
100
* @inheritdoc
101
101
*/
102
- public function mapProductsFilter ($ products )
102
+ public function mapProductsFilter (... $ products )
103
103
{
104
104
$ productIds = [];
105
- if (!is_array ($ products )) {
106
- $ products = [$ products ];
107
- }
108
105
foreach ($ products as $ product ) {
109
106
if ($ product instanceof \Magento \Catalog \Model \Product) {
110
107
$ productIds [] = $ product ->getId ();
Original file line number Diff line number Diff line change @@ -56,12 +56,9 @@ public function mapWebsiteFilter($website)
56
56
* @param int|array|\Magento\Catalog\Model\Product|\Magento\Catalog\Model\Product[] $products
57
57
* @return void
58
58
*/
59
- public function mapProductsFilter ($ products )
59
+ public function mapProductsFilter (... $ products )
60
60
{
61
61
$ productIds = [];
62
- if (!is_array ($ products )) {
63
- $ products = [$ products ];
64
- }
65
62
foreach ($ products as $ product ) {
66
63
if ($ product instanceof \Magento \Catalog \Model \Product) {
67
64
$ productIds [] = $ product ->getId ();
You can’t perform that action at this time.
0 commit comments