Skip to content

Commit 3092050

Browse files
committed
Fix ecs and phpstan
1 parent f06f012 commit 3092050

11 files changed

Lines changed: 12 additions & 13 deletions

src/AbstractStripeGatewayFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
use FluxSE\PayumStripe\Action\Api\Resource\RetrieveSubscriptionAction;
3333
use FluxSE\PayumStripe\Action\Api\Resource\UpdatePaymentIntentAction;
3434
use FluxSE\PayumStripe\Action\Api\Resource\UpdateSubscriptionAction;
35-
use FluxSE\PayumStripe\Action\Api\WebhookEvent\PaymentIntentCanceledAction;
36-
use FluxSE\PayumStripe\Action\Api\WebhookEvent\AuthorizedPaymentIntentManuallyCanceledAction;
3735
use FluxSE\PayumStripe\Action\Api\WebhookEvent\AuthorizedPaymentIntentCanceledAction;
36+
use FluxSE\PayumStripe\Action\Api\WebhookEvent\AuthorizedPaymentIntentManuallyCanceledAction;
3837
use FluxSE\PayumStripe\Action\Api\WebhookEvent\AuthorizedPaymentIntentSucceededAction;
38+
use FluxSE\PayumStripe\Action\Api\WebhookEvent\PaymentIntentCanceledAction;
3939
use FluxSE\PayumStripe\Action\Api\WebhookEvent\PaymentIntentSucceededAction;
4040
use FluxSE\PayumStripe\Action\Api\WebhookEvent\SetupIntentCanceledAction;
4141
use FluxSE\PayumStripe\Action\Api\WebhookEvent\SetupIntentSucceededAction;

src/Action/Api/WebhookEvent/AbstractPaymentAction.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,13 @@ protected function retrieveSessionModeObject(WebhookEvent $request): ?StripeObje
5151
return null;
5252
}
5353

54-
/** @var StripeObject|null $sessionModeObject */
5554
$sessionModeObject = $stripeObject->offsetGet('object');
5655

5756
if (null === $sessionModeObject) {
5857
return null;
5958
}
6059

61-
if (false === $sessionModeObject instanceof StripeObject) {
60+
if (false === ($sessionModeObject instanceof StripeObject)) {
6261
return null;
6362
}
6463

src/Action/Api/WebhookEvent/AbstractPaymentIntentAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ protected function retrieveSessionModeObject(WebhookEvent $request): ?StripeObje
2929

3030
return null;
3131
}
32-
}
32+
}

src/Action/Api/WebhookEvent/AuthorizedPaymentIntentSucceededAction.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ protected function getSupportedCaptureMethod(): string
2020
{
2121
return 'manual';
2222
}
23+
2324
public function getTokenHashMetadataKeyName(): string
2425
{
2526
return TokenHashKeysInterface::CAPTURE_AUTHORIZE_TOKEN_HASH_KEY_NAME;

src/Action/Api/WebhookEvent/SetupIntentSucceededAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ protected function getSupportedEventTypes(): array
1414
Event::SETUP_INTENT_SUCCEEDED,
1515
];
1616
}
17-
}
17+
}

tests/Action/Api/WebhookEvent/AuthorizedPaymentIntentCanceledActionTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Payum\Core\Request\Notify;
1717
use PHPUnit\Framework\TestCase;
1818
use Stripe\Event;
19-
use Stripe\PaymentIntent;
2019
use Tests\FluxSE\PayumStripe\Action\GatewayAwareTestTrait;
2120

2221
final class AuthorizedPaymentIntentCanceledActionTest extends TestCase
@@ -68,7 +67,7 @@ public function provideNotSupportedModels(): array
6867
],
6968
],
7069
'type' => Event::PAYMENT_INTENT_CANCELED,
71-
]]
70+
]],
7271
];
7372
}
7473

tests/Action/Api/WebhookEvent/AuthorizedPaymentIntentManuallyCanceledActionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function provideNotSupportedModels(): array
6767
],
6868
],
6969
'type' => Event::PAYMENT_INTENT_CANCELED,
70-
]]
70+
]],
7171
];
7272
}
7373

tests/Action/Api/WebhookEvent/AuthorizedPaymentIntentSucceededActionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function provideNotSupportedModels(): array
6767
],
6868
],
6969
'type' => Event::PAYMENT_INTENT_SUCCEEDED,
70-
]]
70+
]],
7171
];
7272
}
7373

tests/Action/Api/WebhookEvent/PaymentIntentCanceledActionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function provideNotSupportedModels(): array
6767
],
6868
],
6969
'type' => Event::PAYMENT_INTENT_CANCELED,
70-
]]
70+
]],
7171
];
7272
}
7373

tests/Action/Api/WebhookEvent/PaymentIntentSucceededActionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function provideNotSupportedModels(): array
6767
],
6868
],
6969
'type' => Event::PAYMENT_INTENT_SUCCEEDED,
70-
]]
70+
]],
7171
];
7272
}
7373

0 commit comments

Comments
 (0)