Skip to content

Commit 04313b2

Browse files
ACPT-1552
Fixing static test failures
1 parent c43fd66 commit 04313b2

File tree

18 files changed

+51
-45
lines changed

18 files changed

+51
-45
lines changed

app/code/Magento/BundleGraphQl/Model/Cart/BuyRequest/BundleDataProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class BundleDataProvider implements BuyRequestDataProviderInterface
2525
/**
2626
* @param ArrayManager $arrayManager @deprecated @see $arrayManagerFactory
2727
* @param ArrayManagerFactory|null $arrayManagerFactory
28+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
2829
*/
2930
public function __construct(
3031
ArrayManager $arrayManager,
@@ -34,7 +35,6 @@ public function __construct(
3435
?? ObjectManager::getInstance()->get(ArrayManagerFactory::class);
3536
}
3637

37-
3838
/**
3939
* @inheritdoc
4040
*/

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@
2424
*/
2525
class Type implements OptionSourceInterface, ResetAfterRequestInterface
2626
{
27-
const TYPE_SIMPLE = 'simple';
27+
public const TYPE_SIMPLE = 'simple';
2828

29-
const TYPE_BUNDLE = 'bundle';
29+
public const TYPE_BUNDLE = 'bundle';
3030

31-
const TYPE_VIRTUAL = 'virtual';
31+
public const TYPE_VIRTUAL = 'virtual';
3232

33-
const DEFAULT_TYPE = 'simple';
33+
public const DEFAULT_TYPE = 'simple';
3434

35-
const DEFAULT_TYPE_MODEL = Simple::class;
35+
public const DEFAULT_TYPE_MODEL = Simple::class;
3636

37-
const DEFAULT_PRICE_MODEL = Price::class;
37+
public const DEFAULT_PRICE_MODEL = Price::class;
3838

3939
/**
4040
* @var ConfigInterface
@@ -56,8 +56,6 @@ class Type implements OptionSourceInterface, ResetAfterRequestInterface
5656
protected $_compositeTypes;
5757

5858
/**
59-
* Price models
60-
*
6159
* @var array|null|Price
6260
*/
6361
protected $_priceModels;

app/code/Magento/Catalog/Test/Unit/Model/Product/Webapi/Rest/RequestTypeBasedDeserializerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
use Magento\Framework\Xml\ParserFactory as ParserXmlFactory;
2020
use PHPUnit\Framework\MockObject\MockObject;
2121

22+
/**
23+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
24+
*/
2225
class RequestTypeBasedDeserializerTest extends \PHPUnit\Framework\TestCase
2326
{
2427
/** @var RequestTypeBasedDeserializer */

app/code/Magento/ConfigurableProductGraphQl/Model/Cart/BuyRequest/SuperAttributeDataProvider.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
/**
2727
* DataProvider for building super attribute options in buy requests
28+
*
29+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2830
*/
2931
class SuperAttributeDataProvider implements BuyRequestDataProviderInterface
3032
{
@@ -60,6 +62,7 @@ class SuperAttributeDataProvider implements BuyRequestDataProviderInterface
6062
* @param MetadataPool $metadataPool
6163
* @param StockStateInterface $stockState
6264
* @param ArrayManagerFactory|null $arrayManagerFactory
65+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
6366
*/
6467
public function __construct(
6568
ArrayManager $arrayManager,

app/code/Magento/PaypalGraphQl/Model/PayflowProAdditionalDataProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class PayflowProAdditionalDataProvider implements AdditionalDataProviderInterfac
1818
{
1919
/**
2020
* @param ArrayManager $arrayManager
21+
* phpcs:disable Magento2.CodeAnalysis.EmptyBlock
22+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
2123
*/
2224
public function __construct(
2325
ArrayManager $arrayManager

app/code/Magento/PaypalGraphQl/Model/PayflowProCcVaultAdditionalDataProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
*/
1616
class PayflowProCcVaultAdditionalDataProvider implements AdditionalDataProviderInterface
1717
{
18-
const CC_VAULT_CODE = 'payflowpro_cc_vault';
18+
public const CC_VAULT_CODE = 'payflowpro_cc_vault';
1919

2020
/**
2121
* @param ArrayManager $arrayManager
22+
* phpcs:ignore Magento2.CodeAnalysis.EmptyBlock
23+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
2224
*/
2325
public function __construct(
2426
ArrayManager $arrayManager

app/code/Magento/PaypalGraphQl/Model/Plugin/Resolver/SetPaymentMethodOnCart.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99

1010
use Magento\Framework\App\ObjectManager;
1111
use Magento\Framework\Exception\LocalizedException;
12+
use Magento\Framework\GraphQl\Config\Element\Field;
1213
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
1314
use Magento\Framework\GraphQl\Query\Resolver\ContextInterface;
1415
use Magento\Framework\GraphQl\Query\ResolverInterface;
15-
use Magento\Framework\GraphQl\Config\Element\Field;
1616
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
17+
use Magento\Framework\Stdlib\ArrayManager;
1718
use Magento\Framework\Stdlib\ArrayManagerFactory;
1819
use Magento\Paypal\Model\Express\Checkout\Factory as CheckoutFactory;
19-
use Magento\Framework\Stdlib\ArrayManager;
2020
use Magento\PaypalGraphQl\Model\Provider\Checkout as CheckoutProvider;
2121
use Magento\PaypalGraphQl\Model\Provider\Config as ConfigProvider;
2222

@@ -58,6 +58,7 @@ class SetPaymentMethodOnCart
5858
* @param ConfigProvider $configProvider
5959
* @param array $allowedPaymentMethodCodes
6060
* @param ArrayManagerFactory|null $arrayManagerFactory
61+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
6162
*/
6263
public function __construct(
6364
CheckoutFactory $checkoutFactory,

app/code/Magento/QuoteGraphQl/Model/Cart/BuyRequest/CustomizableOptionsDataProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ class CustomizableOptionsDataProvider implements BuyRequestDataProviderInterface
2424
/**
2525
* @param ArrayManager $arrayManager @deprecated @see $arrayManagerFactory
2626
* @param ArrayManagerFactory|null $arrayManagerFactory
27+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
2728
*/
2829
public function __construct(
29-
ArrayManager $arrayManager
30+
ArrayManager $arrayManager,
31+
?ArrayManagerFactory $arrayManagerFactory = null,
3032
) {
3133
$this->arrayManagerFactory = $arrayManagerFactory
3234
?? ObjectManager::getInstance()->get(ArrayManagerFactory::class);

app/code/Magento/QuoteGraphQl/Model/Cart/BuyRequest/QuantityDataProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class QuantityDataProvider implements BuyRequestDataProviderInterface
2525
/**
2626
* @param ArrayManager $arrayManager @deprecated @see $arrayManagerFactory
2727
* @param ArrayManagerFactory|null $arrayManagerFactory
28+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
2829
*/
2930
public function __construct(
3031
ArrayManager $arrayManager,

app/code/Magento/Sales/Model/ResourceModel/Attribute.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public function _resetState(): void
5050
}
5151

5252
/**
53+
* Gets the connection, lazy loading it if needed
54+
*
5355
* @return \Magento\Framework\DB\Adapter\AdapterInterface
5456
*/
5557
protected function getConnection()

0 commit comments

Comments
 (0)