Skip to content

Commit 119f6d0

Browse files
authored
Merge pull request #519 from magento-performance/ACPT-1219
ACPT-1219: Fix Static Tests failures for application-Server PR
2 parents 3d5d091 + a839db8 commit 119f6d0

File tree

53 files changed

+186
-158
lines changed

Some content is hidden

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

53 files changed

+186
-158
lines changed

app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ protected function getSelectionAmounts(Product $bundleProduct, $searchMin, $useR
215215
* @param Option $option
216216
* @param bool $canSkipRequiredOption
217217
* @return bool
218-
* @deprecated 100.2.0
218+
* @deprecated 100.2.0 Not used anymore.
219+
* @see Nothing
219220
*/
220221
protected function canSkipOption($option, $canSkipRequiredOption)
221222
{
@@ -227,7 +228,8 @@ protected function canSkipOption($option, $canSkipRequiredOption)
227228
*
228229
* @param Product $bundleProduct
229230
* @return bool
230-
* @deprecated 100.2.0
231+
* @deprecated 100.2.0 Not used anymore.
232+
* @see Nothing
231233
*/
232234
protected function hasRequiredOption($bundleProduct)
233235
{
@@ -246,6 +248,7 @@ function ($item) {
246248
* @param Product $saleableItem
247249
* @return \Magento\Bundle\Model\ResourceModel\Option\Collection
248250
* @deprecated 100.2.0
251+
* @see Nothing
249252
*/
250253
protected function getBundleOptions(Product $saleableItem)
251254
{

app/code/Magento/Bundle/Pricing/Price/BundleOptions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public function calculateOptions(
9292
/** @var \Magento\Bundle\Pricing\Price\BundleSelectionPrice $selectionPriceList */
9393
$selectionPriceList = $this->calculator->createSelectionPriceList($option, $bundleProduct);
9494
$selectionPriceList = $this->calculator->processOptions($option, $selectionPriceList, $searchMin);
95+
// phpcs:ignore Magento2.Performance.ForeachArrayMerge
9596
$priceList = array_merge($priceList, $selectionPriceList);
9697
}
9798
$amount = $this->calculator->calculateBundleAmount(0., $bundleProduct, $priceList);

app/code/Magento/Bundle/Pricing/Price/BundleRegularPrice.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
namespace Magento\Bundle\Pricing\Price;
88

99
use Magento\Bundle\Pricing\Adjustment\BundleCalculatorInterface;
10+
use Magento\Catalog\Pricing\Price\RegularPrice;
1011
use Magento\Framework\ObjectManager\ResetAfterRequestInterface;
1112
use Magento\Framework\Pricing\Amount\AmountInterface;
1213
use Magento\Catalog\Pricing\Price\CustomOptionPrice;
@@ -15,7 +16,7 @@
1516
/**
1617
* Bundle product regular price model
1718
*/
18-
class BundleRegularPrice extends \Magento\Catalog\Pricing\Price\RegularPrice implements RegularPriceInterface, ResetAfterRequestInterface
19+
class BundleRegularPrice extends RegularPrice implements RegularPriceInterface, ResetAfterRequestInterface
1920
{
2021
/**
2122
* @var BundleCalculatorInterface

app/code/Magento/BundleGraphQl/Model/Resolver/BundleItems.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ public function __construct(
5858
}
5959

6060
/**
61-
* Fetch and format bundle option items.
62-
*
6361
* @inheritDoc
6462
*/
6563
public function resolve(Field $field, $context, ResolveInfo $info, array $value = null, array $args = null)

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
2626
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2727
*/
28-
class Bundle extends \Magento\CatalogImportExport\Model\Import\Product\Type\AbstractType
29-
implements ResetAfterRequestInterface
28+
class Bundle extends \Magento\CatalogImportExport\Model\Import\Product\Type\AbstractType implements
29+
ResetAfterRequestInterface
3030
{
3131
/**
3232
* Delimiter before product option value.
@@ -796,6 +796,4 @@ public function _resetState(): void
796796
$this->_cachedOptionSelectQuery = [];
797797
$this->_cachedSkuToProducts = [];
798798
}
799-
800-
801799
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
*/
2020
class Category extends AbstractHelper implements ResetAfterRequestInterface
2121
{
22-
const XML_PATH_USE_CATEGORY_CANONICAL_TAG = 'catalog/seo/category_canonical_tag';
22+
public const XML_PATH_USE_CATEGORY_CANONICAL_TAG = 'catalog/seo/category_canonical_tag';
2323

24-
const XML_PATH_CATEGORY_ROOT_ID = 'catalog/category/root_id';
24+
public const XML_PATH_CATEGORY_ROOT_ID = 'catalog/category/root_id';
2525

2626
/**
2727
* Store categories cache
@@ -31,14 +31,14 @@ class Category extends AbstractHelper implements ResetAfterRequestInterface
3131
protected $_storeCategories = [];
3232

3333
/**
34-
* Store manager
34+
* Store manager instance
3535
*
3636
* @var \Magento\Store\Model\StoreManagerInterface
3737
*/
3838
protected $_storeManager;
3939

4040
/**
41-
* Category factory
41+
* Category factory instance
4242
*
4343
* @var \Magento\Catalog\Model\CategoryFactory
4444
*/

app/code/Magento/Catalog/Model/Layer/FilterList.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
*/
1717
class FilterList implements ResetAfterRequestInterface
1818
{
19-
const CATEGORY_FILTER = 'category';
20-
const ATTRIBUTE_FILTER = 'attribute';
21-
const PRICE_FILTER = 'price';
22-
const DECIMAL_FILTER = 'decimal';
19+
public const CATEGORY_FILTER = 'category';
20+
public const ATTRIBUTE_FILTER = 'attribute';
21+
public const PRICE_FILTER = 'price';
22+
public const DECIMAL_FILTER = 'decimal';
2323

2424
/**
2525
* Filter factory

app/code/Magento/CatalogGraphQl/Model/Resolver/Product/PriceRange.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
namespace Magento\CatalogGraphQl\Model\Resolver\Product;
99

1010
use Magento\CatalogGraphQl\Model\PriceRangeDataProvider;
11-
use Magento\CatalogGraphQl\Model\Resolver\Product\Price\Discount;
12-
use Magento\CatalogGraphQl\Model\Resolver\Product\Price\ProviderPool as PriceProviderPool;
1311
use Magento\Framework\App\ObjectManager;
1412
use Magento\Framework\GraphQl\Query\ResolverInterface;
1513
use Magento\Framework\GraphQl\Config\Element\Field;
@@ -26,13 +24,9 @@ class PriceRange implements ResolverInterface
2624
private PriceRangeDataProvider $priceRangeDataProvider;
2725

2826
/**
29-
* @param PriceProviderPool $priceProviderPool Deprecated. @use $priceRangeDataProvider
30-
* @param Discount $discount Deprecated. @use $priceRangeDataProvider
3127
* @param PriceRangeDataProvider|null $priceRangeDataProvider
3228
*/
3329
public function __construct(
34-
PriceProviderPool $priceProviderPool,
35-
Discount $discount,
3630
PriceRangeDataProvider $priceRangeDataProvider = null
3731
) {
3832
$this->priceRangeDataProvider = $priceRangeDataProvider

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

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
use Magento\CatalogInventory\Api\Data\StockStatusInterface;
1111
use Magento\Framework\ObjectManager\ResetAfterRequestInterface;
1212

13-
/**
14-
* Class StockRegistryStorage
15-
*/
1613
class StockRegistryStorage implements ResetAfterRequestInterface
1714
{
1815
/**
@@ -31,6 +28,8 @@ class StockRegistryStorage implements ResetAfterRequestInterface
3128
private $stockStatuses = [];
3229

3330
/**
31+
* Get Stock Data
32+
*
3433
* @param int $scopeId
3534
* @return StockInterface
3635
*/
@@ -40,6 +39,8 @@ public function getStock($scopeId)
4039
}
4140

4241
/**
42+
* Set Stock cache
43+
*
4344
* @param int $scopeId
4445
* @param StockInterface $value
4546
* @return void
@@ -50,6 +51,8 @@ public function setStock($scopeId, StockInterface $value)
5051
}
5152

5253
/**
54+
* Delete cached Stock based on scopeId
55+
*
5356
* @param int|null $scopeId
5457
* @return void
5558
*/
@@ -63,6 +66,8 @@ public function removeStock($scopeId = null)
6366
}
6467

6568
/**
69+
* Retrieve Stock Item
70+
*
6671
* @param int $productId
6772
* @param int $scopeId
6873
* @return StockItemInterface
@@ -73,6 +78,8 @@ public function getStockItem($productId, $scopeId)
7378
}
7479

7580
/**
81+
* Update Stock Item
82+
*
7683
* @param int $productId
7784
* @param int $scopeId
7885
* @param StockItemInterface $value
@@ -84,6 +91,8 @@ public function setStockItem($productId, $scopeId, StockItemInterface $value)
8491
}
8592

8693
/**
94+
* Remove stock Item based on productId & scopeId
95+
*
8796
* @param int $productId
8897
* @param int|null $scopeId
8998
* @return void
@@ -98,6 +107,8 @@ public function removeStockItem($productId, $scopeId = null)
98107
}
99108

100109
/**
110+
* Retrieve stock status
111+
*
101112
* @param int $productId
102113
* @param int $scopeId
103114
* @return StockStatusInterface
@@ -108,6 +119,8 @@ public function getStockStatus($productId, $scopeId)
108119
}
109120

110121
/**
122+
* Update stock Status
123+
*
111124
* @param int $productId
112125
* @param int $scopeId
113126
* @param StockStatusInterface $value
@@ -119,6 +132,8 @@ public function setStockStatus($productId, $scopeId, StockStatusInterface $value
119132
}
120133

121134
/**
135+
* Clear stock status
136+
*
122137
* @param int $productId
123138
* @param int|null $scopeId
124139
* @return void

app/code/Magento/Config/Console/Command/ConfigShow/ValueProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ValueProcessor
2626
/**
2727
* Placeholder for the output of sensitive data.
2828
*/
29-
const SAFE_PLACEHOLDER = '******';
29+
public const SAFE_PLACEHOLDER = '******';
3030

3131
/**
3232
* System configuration structure factory.

0 commit comments

Comments
 (0)