Skip to content

Commit 9e8b8be

Browse files
committed
Fixes for PHP 8.4 compatibility
1 parent 82ff294 commit 9e8b8be

File tree

13 files changed

+25
-25
lines changed

13 files changed

+25
-25
lines changed

Api/Data/CardInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function setMethodInstance($method);
6161
*/
6262
public function setCustomer(
6363
\Magento\Customer\Api\Data\CustomerInterface $customer,
64-
\Magento\Payment\Model\InfoInterface $payment = null
64+
?\Magento\Payment\Model\InfoInterface $payment = null
6565
);
6666

6767
/**

Model/AbstractGateway.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public function __construct(
161161
\ParadoxLabs\TokenBase\Model\Gateway\ResponseFactory $responseFactory,
162162
\Magento\Framework\HTTP\ZendClientFactory $httpClientFactory,
163163
array $data = [],
164-
\Magento\Framework\HTTP\ClientInterfaceFactory $communicatorFactory = null
164+
?\Magento\Framework\HTTP\ClientInterfaceFactory $communicatorFactory = null
165165
) {
166166
$this->helper = $helper;
167167
$this->responseFactory = $responseFactory;

Model/Api/GraphQL/DeleteCard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ public function resolve(
8484
\Magento\Framework\GraphQl\Config\Element\Field $field,
8585
$context,
8686
\Magento\Framework\GraphQl\Schema\Type\ResolveInfo $info,
87-
array $value = null,
88-
array $args = null
87+
?array $value = null,
88+
?array $args = null
8989
) {
9090
if (!isset($args['hash']) || empty($args['hash'])) {
9191
throw new GraphQlInputException(__('Card "hash" value must be specified'));

Model/Api/GraphQL/GetCards.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ public function resolve(
9090
\Magento\Framework\GraphQl\Config\Element\Field $field,
9191
$context,
9292
\Magento\Framework\GraphQl\Schema\Type\ResolveInfo $info,
93-
array $value = null,
94-
array $args = null
93+
?array $value = null,
94+
?array $args = null
9595
) {
9696
$this->graphQL->authenticate($context, true);
9797

Model/Api/GraphQL/GetCheckoutConfig.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ public function resolve(
8282
\Magento\Framework\GraphQl\Config\Element\Field $field,
8383
$context,
8484
\Magento\Framework\GraphQl\Schema\Type\ResolveInfo $info,
85-
array $value = null,
86-
array $args = null
85+
?array $value = null,
86+
?array $args = null
8787
) {
8888
// Validate
8989
$this->graphQL->authenticate($context);

Model/Api/GraphQL/UpdateCard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ public function resolve(
117117
\Magento\Framework\GraphQl\Config\Element\Field $field,
118118
$context,
119119
\Magento\Framework\GraphQl\Schema\Type\ResolveInfo $info,
120-
array $value = null,
121-
array $args = null
120+
?array $value = null,
121+
?array $args = null
122122
) {
123123
$this->graphQL->authenticate($context);
124124

Model/Card.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ class Card extends \Magento\Framework\Model\AbstractExtensibleModel implements
149149
* @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory
150150
* @param \Magento\Framework\Api\AttributeValueFactory $customAttributeFactory
151151
* @param Card\Context $cardContext
152-
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
153-
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
152+
* @param \Magento\Framework\Model\ResourceModel\AbstractResource|null $resource
153+
* @param \Magento\Framework\Data\Collection\AbstractDb|null $resourceCollection
154154
* @param array $data
155155
*/
156156
public function __construct(
@@ -159,8 +159,8 @@ public function __construct(
159159
\Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory,
160160
\Magento\Framework\Api\AttributeValueFactory $customAttributeFactory,
161161
\ParadoxLabs\TokenBase\Model\Card\Context $cardContext,
162-
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
163-
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
162+
?\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
163+
?\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
164164
array $data = []
165165
) {
166166
parent::__construct(
@@ -258,7 +258,7 @@ public function getTypeInstance()
258258
*/
259259
public function setCustomer(
260260
\Magento\Customer\Api\Data\CustomerInterface $customer,
261-
InfoInterface $payment = null
261+
?InfoInterface $payment = null
262262
) {
263263
if ($customer->getEmail() != '') {
264264
$this->setCustomerEmail($customer->getEmail());

Observer/AdminNotification/Feed.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ class Feed extends \Magento\AdminNotification\Model\Feed
5252
* @param \ParadoxLabs\TokenBase\Helper\Data $helper
5353
* @param \Magento\Framework\Module\Dir $moduleDir
5454
* @param \Magento\Framework\Filesystem\Io\File $fileHandler
55-
* @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
56-
* @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
55+
* @param \Magento\Framework\Model\ResourceModel\AbstractResource|null $resource
56+
* @param \Magento\Framework\Data\Collection\AbstractDb|null $resourceCollection
5757
* @param array $data
5858
*/
5959
public function __construct(
@@ -68,8 +68,8 @@ public function __construct(
6868
\ParadoxLabs\TokenBase\Helper\Data $helper,
6969
\Magento\Framework\Module\Dir $moduleDir,
7070
\Magento\Framework\Filesystem\Io\File $fileHandler,
71-
\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
72-
\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
71+
?\Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
72+
?\Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
7373
array $data = []
7474
) {
7575
$this->helper = $helper;

Observer/ValidatePaymentObserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ValidatePaymentObserver implements \Magento\Framework\Event\ObserverInterf
3636
* @param \Magento\Payment\Gateway\Validator\ValidatorPoolInterface|null $validatorPool
3737
*/
3838
public function __construct(
39-
\Magento\Payment\Gateway\Validator\ValidatorPoolInterface $validatorPool = null
39+
?\Magento\Payment\Gateway\Validator\ValidatorPoolInterface $validatorPool = null
4040
) {
4141
$this->validatorPool = $validatorPool;
4242
}

Plugin/Checkout/Model/GuestPaymentInformationManagement/Plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function aroundSavePaymentInformationAndPlaceOrder(
9292
$cartId,
9393
$email,
9494
\Magento\Quote\Api\Data\PaymentInterface $paymentMethod,
95-
\Magento\Quote\Api\Data\AddressInterface $billingAddress = null
95+
?\Magento\Quote\Api\Data\AddressInterface $billingAddress = null
9696
) {
9797
try {
9898
return $proceed($cartId, $email, $paymentMethod, $billingAddress);

0 commit comments

Comments
 (0)