Skip to content

Commit

Permalink
fix Symfony Request type change
Browse files Browse the repository at this point in the history
  • Loading branch information
oallain committed Jan 28, 2023
1 parent d681261 commit b7eedea
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Controller/CancelPayPalCheckoutPaymentAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function __construct(

public function __invoke(Request $request): Response
{
/** @psalm-suppress RedundantCastGivenDocblockType */
$content = (array) json_decode((string) $request->getContent(false), true);

$payment = $this->paymentProvider->getByPayPalOrderId((string) $content['payPalOrderId']);
Expand Down
1 change: 1 addition & 0 deletions src/Controller/CancelPayPalOrderAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function __construct(

public function __invoke(Request $request): Response
{
/** @psalm-suppress RedundantCastGivenDocblockType */
$content = (array) json_decode((string) $request->getContent(false), true);

$payment = $this->paymentProvider->getByPayPalOrderId((string) $content['payPalOrderId']);
Expand Down
1 change: 1 addition & 0 deletions src/Controller/CancelPayPalPaymentAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public function __construct(

public function __invoke(Request $request): Response
{
/** @psalm-suppress RedundantCastGivenDocblockType */
$content = (array) json_decode((string) $request->getContent(false), true);

$payment = $this->paymentProvider->getByPayPalOrderId((string) $content['payPalOrderId']);
Expand Down
1 change: 1 addition & 0 deletions src/Controller/PayPalPaymentOnErrorAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function __construct(FlashBagInterface|RequestStack $flashBagOrRequestSta

public function __invoke(Request $request): Response
{
/** @psalm-suppress RedundantCastGivenDocblockType */
$this->logger->error((string) $request->getContent());
FlashBagProvider::getFlashBag($this->flashBagOrRequestStack)
->add('error', 'sylius.pay_pal.something_went_wrong')
Expand Down
1 change: 1 addition & 0 deletions src/Controller/Webhook/RefundOrderAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public function __invoke(Request $request): Response

private function getPayPalPaymentUrl(Request $request): string
{
/** @psalm-suppress RedundantCastGivenDocblockType */
$content = (array) json_decode((string) $request->getContent(false), true);
Assert::keyExists($content, 'resource');
$resource = (array) $content['resource'];
Expand Down
6 changes: 6 additions & 0 deletions src/Onboarding/Initiator/OnboardingInitiator.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ final class OnboardingInitiator implements OnboardingInitiatorInterface

private string $createPartnerReferralsUrl;

/**
* @psalm-suppress DeprecatedClass
*/
private Security $security;

/**
* @psalm-suppress DeprecatedClass
*/
public function __construct(UrlGeneratorInterface $urlGenerator, Security $security, string $facilitatorUrl)
{
$this->urlGenerator = $urlGenerator;
Expand Down

0 comments on commit b7eedea

Please sign in to comment.