From 770d8bae159c7fdfc9a35a17b1b66e988acc9e2f Mon Sep 17 00:00:00 2001 From: Marcel Hauri Date: Wed, 16 May 2018 12:46:16 +0200 Subject: [PATCH 1/5] [fix] Property shippingAddress has unknown class Magento\InstantPurchase\Model\AddressIn as its type. --- .../Magento/InstantPurchase/Model/InstantPurchaseOption.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/InstantPurchase/Model/InstantPurchaseOption.php b/app/code/Magento/InstantPurchase/Model/InstantPurchaseOption.php index 214b93560669f..29ec874c41a1a 100644 --- a/app/code/Magento/InstantPurchase/Model/InstantPurchaseOption.php +++ b/app/code/Magento/InstantPurchase/Model/InstantPurchaseOption.php @@ -25,7 +25,7 @@ class InstantPurchaseOption private $paymentToken; /** - * @var AddressIn + * @var Address */ private $shippingAddress; From e03c9a3c5cc63b299eb0a93c80550534e6a5d1f6 Mon Sep 17 00:00:00 2001 From: Marcel Hauri Date: Wed, 16 May 2018 12:50:35 +0200 Subject: [PATCH 2/5] [fix] accept null for properties --- .../InstantPurchase/Model/InstantPurchaseOption.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/InstantPurchase/Model/InstantPurchaseOption.php b/app/code/Magento/InstantPurchase/Model/InstantPurchaseOption.php index 29ec874c41a1a..0748c5818c857 100644 --- a/app/code/Magento/InstantPurchase/Model/InstantPurchaseOption.php +++ b/app/code/Magento/InstantPurchase/Model/InstantPurchaseOption.php @@ -20,22 +20,22 @@ class InstantPurchaseOption { /** - * @var PaymentTokenInterface + * @var PaymentTokenInterface|null */ private $paymentToken; /** - * @var Address + * @var Address|null */ private $shippingAddress; /** - * @var Address + * @var Address|null */ private $billingAddress; /** - * @var ShippingMethodInterface + * @var ShippingMethodInterface|null */ private $shippingMethod; From 31a098ba81be3bd3413cf845d47316e42ac51daa Mon Sep 17 00:00:00 2001 From: Marcel Hauri Date: Wed, 16 May 2018 12:54:00 +0200 Subject: [PATCH 3/5] [fix] PHPDoc tag param $addressId had none type hint --- .../Model/InstantPurchaseOptionLoadingFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/InstantPurchase/Model/InstantPurchaseOptionLoadingFactory.php b/app/code/Magento/InstantPurchase/Model/InstantPurchaseOptionLoadingFactory.php index d1dc71b80d5d1..b203cfdad2221 100644 --- a/app/code/Magento/InstantPurchase/Model/InstantPurchaseOptionLoadingFactory.php +++ b/app/code/Magento/InstantPurchase/Model/InstantPurchaseOptionLoadingFactory.php @@ -100,7 +100,7 @@ public function create( /** * Loads customer address model by identifier. * - * @param $addressId + * @param int $addressId * @return Address */ private function getAddress($addressId): Address From 57e3180950fa26128edbdfe763d2469add1ec5d2 Mon Sep 17 00:00:00 2001 From: Marcel Hauri Date: Wed, 16 May 2018 13:37:10 +0200 Subject: [PATCH 4/5] [fix] return type in InvalidArgumentException instead of fixed value chooser --- .../ShippingMethodChoose/DeferredShippingMethodChooserPool.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/DeferredShippingMethodChooserPool.php b/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/DeferredShippingMethodChooserPool.php index 96c01cdbb6663..ca0e9351967ad 100644 --- a/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/DeferredShippingMethodChooserPool.php +++ b/app/code/Magento/InstantPurchase/Model/ShippingMethodChoose/DeferredShippingMethodChooserPool.php @@ -39,7 +39,7 @@ public function get($type) : DeferredShippingMethodChooserInterface { if (!isset($this->choosers[$type])) { throw new \InvalidArgumentException(sprintf( - 'Deferred shipping method chooser is not registered.', + 'Deferred shipping method %s is not registered.', $type )); } From 08508fae913796e516618ba2c9043495b16ef7a8 Mon Sep 17 00:00:00 2001 From: Marcel Hauri Date: Wed, 16 May 2018 14:24:50 +0200 Subject: [PATCH 5/5] [fix] missing PHPDoc tag param $storeId --- .../PaymentMethodIntegration/IntegrationsManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/InstantPurchase/PaymentMethodIntegration/IntegrationsManager.php b/app/code/Magento/InstantPurchase/PaymentMethodIntegration/IntegrationsManager.php index 9c93febe0db36..3ad2e000e97d3 100644 --- a/app/code/Magento/InstantPurchase/PaymentMethodIntegration/IntegrationsManager.php +++ b/app/code/Magento/InstantPurchase/PaymentMethodIntegration/IntegrationsManager.php @@ -146,7 +146,7 @@ private function findIntegrations(int $storeId): array * * * @param VaultPaymentInterface $paymentMethod - * @param $storeId + * @param int|string|null|\Magento\Store\Model\Store $storeId * @return bool */ private function isIntegrationAvailable(VaultPaymentInterface $paymentMethod, $storeId): bool