Skip to content

Commit

Permalink
PHPStan fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
L3RAZ committed Feb 12, 2024
1 parent e0526c3 commit 847d06d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Handler/CreatePaypalOrderHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class CreatePaypalOrderHandler
/**
* Prestashop context object
*
* @var Context
* @var PrestaShopContext
*/
private $context;
/**
Expand Down Expand Up @@ -121,9 +121,9 @@ public function handle($expressCheckout = false, $updateOrder = false, $paypalOr
$payload = $builder->presentPayload()->getArray();

if (true === $updateOrder) {
$paypalOrder = (new Order($this->context->link))->patch($payload);
$paypalOrder = (new Order($this->context->getLink()))->patch($payload);
} else {
$paypalOrder = (new Order($this->context->link))->create($payload);
$paypalOrder = (new Order($this->context->getLink()))->create($payload);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

namespace PrestaShop\Module\PrestashopCheckout\PayPal\Order\EventSubscriber;

use DateTime;
use Exception;
use PrestaShop\Module\PrestashopCheckout\Checkout\CheckoutChecker;
use PrestaShop\Module\PrestashopCheckout\CommandBus\CommandBusInterface;
use PrestaShop\Module\PrestashopCheckout\Exception\PsCheckoutException;
Expand Down
2 changes: 1 addition & 1 deletion src/PayPal/Order/Query/GetPayPalOrderQueryResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class GetPayPalOrderQueryResult
private $order;

/**
* @param $order array{id: string, status: string, intent: string, payment_source: array, purchase_units: array, payer: array, create_time: string, links: array}
* @param array{id: string, status: string, intent: string, payment_source: array, purchase_units: array, payer: array, create_time: string, links: array} $order
*/
public function __construct($order)
{
Expand Down

0 comments on commit 847d06d

Please sign in to comment.