From 53f9faa80df8b04cc0df58a15fb1a8a3c1ac9bf7 Mon Sep 17 00:00:00 2001 From: Thibaut Selingue Date: Thu, 27 Jun 2024 17:43:19 +0200 Subject: [PATCH] style(php): apply php cs fixer --- src/Action/CancelAction.php | 9 +- src/Action/CaptureAction.php | 9 +- src/Action/ChoosePaymentTypeAction.php | 13 +-- src/Action/ConvertPaymentAction.php | 13 +-- src/Action/NotifyAction.php | 9 +- src/Action/RefundAction.php | 9 +- src/Action/StatusAction.php | 25 ++--- src/Api.php | 19 ++-- src/PayBoxRequestParams.php | 34 +++---- src/PayBoxReturnParam.php | 30 +++--- src/PayboxRetour.php | 136 ++++++++++++------------- tests/Action/NotifyActionTest.php | 3 +- tests/ApiTest.php | 5 +- 13 files changed, 139 insertions(+), 175 deletions(-) diff --git a/src/Action/CancelAction.php b/src/Action/CancelAction.php index 98333c1..27c8544 100644 --- a/src/Action/CancelAction.php +++ b/src/Action/CancelAction.php @@ -10,8 +10,6 @@ class CancelAction extends GatewayAwareAction { /** - * {@inheritdoc} - * * @param Cancel $request */ public function execute($request): void @@ -23,14 +21,11 @@ public function execute($request): void throw new \LogicException('Not implemented'); } - /** - * {@inheritdoc} - */ public function supports($request) { return - $request instanceof Cancel && - $request->getModel() instanceof \ArrayAccess + $request instanceof Cancel + && $request->getModel() instanceof \ArrayAccess ; } } diff --git a/src/Action/CaptureAction.php b/src/Action/CaptureAction.php index 0a00cc1..b233db5 100644 --- a/src/Action/CaptureAction.php +++ b/src/Action/CaptureAction.php @@ -23,8 +23,6 @@ public function __construct() } /** - * {@inheritdoc} - * * @param Capture $request */ public function execute($request): void @@ -51,14 +49,11 @@ public function execute($request): void } } - /** - * {@inheritdoc} - */ public function supports($request) { return - $request instanceof Capture && - $request->getModel() instanceof \ArrayAccess + $request instanceof Capture + && $request->getModel() instanceof \ArrayAccess ; } } diff --git a/src/Action/ChoosePaymentTypeAction.php b/src/Action/ChoosePaymentTypeAction.php index 11a00b5..6de5c8c 100644 --- a/src/Action/ChoosePaymentTypeAction.php +++ b/src/Action/ChoosePaymentTypeAction.php @@ -33,8 +33,6 @@ public function __construct($templateName) } /** - * {@inheritdoc} - * * @param ChoosePaymentType $request */ public function execute($request): void @@ -46,7 +44,7 @@ public function execute($request): void $getHttpRequest = new GetHttpRequest(); $this->gateway->execute($getHttpRequest); - /* if form has been submitted, set the payment type and card type to complete the payment details*/ + /* if form has been submitted, set the payment type and card type to complete the payment details */ if ('POST' == $getHttpRequest->method && isset($getHttpRequest->request['paymentType'])) { $details[PayBoxRequestParams::PBX_TYPEPAIEMENT] = $getHttpRequest->request['paymentType']; $details[PayBoxRequestParams::PBX_TYPECARTE] = $getHttpRequest->request['cardType']; @@ -64,14 +62,11 @@ public function execute($request): void throw new HttpResponse($template->getResult()); } - /** - * {@inheritdoc} - */ public function supports($request) { return - $request instanceof ChoosePaymentType && - $request->getModel() instanceof \ArrayAccess - ; + $request instanceof ChoosePaymentType + && $request->getModel() instanceof \ArrayAccess + ; } } diff --git a/src/Action/ConvertPaymentAction.php b/src/Action/ConvertPaymentAction.php index 83bf181..edbc669 100644 --- a/src/Action/ConvertPaymentAction.php +++ b/src/Action/ConvertPaymentAction.php @@ -17,8 +17,6 @@ class ConvertPaymentAction extends ApiLoggerAwareAction implements ActionInterfa use GenericTokenFactoryAwareTrait; /** - * {@inheritdoc} - * * @param Convert $request */ public function execute($request): void @@ -30,7 +28,7 @@ public function execute($request): void $details = ArrayObject::ensureArrayObject($payment->getDetails()); $details[PayBoxRequestParams::PBX_TOTAL] = $payment->getTotalAmount(); - //TODO : dynamise currency code. + // TODO : dynamise currency code. $details[PayBoxRequestParams::PBX_DEVISE] = '978'; $details[PayBoxRequestParams::PBX_CMD] = $payment->getNumber(); $details[PayBoxRequestParams::PBX_PORTEUR] = $payment->getClientEmail(); @@ -53,15 +51,12 @@ public function execute($request): void $request->setResult((array) $details); } - /** - * {@inheritdoc} - */ public function supports($request) { return - $request instanceof Convert && - $request->getSource() instanceof PaymentInterface && - 'array' === $request->getTo() + $request instanceof Convert + && $request->getSource() instanceof PaymentInterface + && 'array' === $request->getTo() ; } } diff --git a/src/Action/NotifyAction.php b/src/Action/NotifyAction.php index 4fd5a4b..2cd35c5 100644 --- a/src/Action/NotifyAction.php +++ b/src/Action/NotifyAction.php @@ -37,8 +37,6 @@ public function __construct() /** * @See documentation ManuelIntegrationVerifone_PayboxSystem_V8 5.3 Instant Payment Notification * - * {@inheritdoc} - * * @param Notify $request */ public function execute($request): void @@ -84,14 +82,11 @@ public function execute($request): void throw new HttpResponse('OK', 200); } - /** - * {@inheritdoc} - */ public function supports($request) { return - $request instanceof Notify && - $request->getModel() instanceof \ArrayAccess + $request instanceof Notify + && $request->getModel() instanceof \ArrayAccess ; } diff --git a/src/Action/RefundAction.php b/src/Action/RefundAction.php index 821194a..82ee537 100644 --- a/src/Action/RefundAction.php +++ b/src/Action/RefundAction.php @@ -10,8 +10,6 @@ class RefundAction extends GatewayAwareAction { /** - * {@inheritdoc} - * * @param Refund $request */ public function execute($request): void @@ -23,14 +21,11 @@ public function execute($request): void throw new \LogicException('Not implemented'); } - /** - * {@inheritdoc} - */ public function supports($request) { return - $request instanceof Refund && - $request->getModel() instanceof \ArrayAccess + $request instanceof Refund + && $request->getModel() instanceof \ArrayAccess ; } } diff --git a/src/Action/StatusAction.php b/src/Action/StatusAction.php index 58b48f5..5329502 100644 --- a/src/Action/StatusAction.php +++ b/src/Action/StatusAction.php @@ -9,25 +9,23 @@ class StatusAction implements ActionInterface { - const SUCCESS = '00000'; + public const SUCCESS = '00000'; - const CONTACT_CARD_OWNER = '01'; + public const CONTACT_CARD_OWNER = '01'; - const INVALID_TRANSACTION = '12'; + public const INVALID_TRANSACTION = '12'; - const INVALID_AMOUNT = '13'; + public const INVALID_AMOUNT = '13'; - const INVALID_HOLDER_NUMBER = '14'; + public const INVALID_HOLDER_NUMBER = '14'; - const CUSTOM_CANCELATION = '17'; + public const CUSTOM_CANCELATION = '17'; - const RETRY_LATER = '19'; + public const RETRY_LATER = '19'; - const EXPIRED_CARD = '33'; + public const EXPIRED_CARD = '33'; /** - * {@inheritdoc} - * * @param GetStatusInterface $request */ public function execute($request): void @@ -51,14 +49,11 @@ public function execute($request): void $request->markFailed(); } - /** - * {@inheritdoc} - */ public function supports($request) { return - $request instanceof GetStatusInterface && - $request->getModel() instanceof \ArrayAccess + $request instanceof GetStatusInterface + && $request->getModel() instanceof \ArrayAccess ; } } diff --git a/src/Api.php b/src/Api.php index 1541061..9eee775 100644 --- a/src/Api.php +++ b/src/Api.php @@ -12,7 +12,6 @@ use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareTrait; use Psr\Log\NullLogger; -use RuntimeException; class Api implements LoggerAwareInterface { @@ -20,17 +19,17 @@ class Api implements LoggerAwareInterface /** * Primary server. */ - const MAIN_SERVER = 'tpeweb.paybox.com'; + public const MAIN_SERVER = 'tpeweb.paybox.com'; /** * Backup server. */ - const BACKUP_SERVER = 'tpeweb1.paybox.com'; + public const BACKUP_SERVER = 'tpeweb1.paybox.com'; /** * Sandbox server. */ - const SANDBOX_SERVER = 'preprod-tpeweb.paybox.com'; + public const SANDBOX_SERVER = 'preprod-tpeweb.paybox.com'; /** * @var HttpClientInterface @@ -47,7 +46,7 @@ class Api implements LoggerAwareInterface */ protected $options = []; - const PAYBOX_IP_ADDRESSES = [ + public const PAYBOX_IP_ADDRESSES = [ // incoming ip addresses // pre-production '195.101.99.73', @@ -63,7 +62,7 @@ class Api implements LoggerAwareInterface // outgoing ip addresses // pre-production '195.101.99.76', - //production + // production '194.2.122.158', '194.2.122.190', '195.25.7.166', @@ -113,7 +112,7 @@ protected function doRequest(string $method, array $fields): ResponseInterface * * @return string server url * - * @throws RuntimeException if no server available + * @throws \RuntimeException if no server available */ protected function getApiEndpoint() { @@ -134,7 +133,7 @@ protected function getApiEndpoint() } } - throw new RuntimeException('No server available.'); + throw new \RuntimeException('No server available.'); } /** @@ -244,8 +243,8 @@ private function checkPayboxSignature(GetHttpRequest $httpRequest): bool $signatureInitialized = $signature; } else { $this->logger->error('Fail to base_decode signature', [ - 'signature' => $signature, - ]); + 'signature' => $signature, + ]); return false; } diff --git a/src/PayBoxRequestParams.php b/src/PayBoxRequestParams.php index 6ae1534..7bd151b 100644 --- a/src/PayBoxRequestParams.php +++ b/src/PayBoxRequestParams.php @@ -10,82 +10,82 @@ interface PayBoxRequestParams /** * Paybox Site param. */ - const PBX_SITE = 'PBX_SITE'; + public const PBX_SITE = 'PBX_SITE'; /** * Paybox rang param. */ - const PBX_RANG = 'PBX_RANG'; + public const PBX_RANG = 'PBX_RANG'; /** * Paybox identifiant param. */ - const PBX_IDENTIFIANT = 'PBX_IDENTIFIANT'; + public const PBX_IDENTIFIANT = 'PBX_IDENTIFIANT'; /** * Paybox hash param. */ - const PBX_HASH = 'PBX_HASH'; + public const PBX_HASH = 'PBX_HASH'; /** * Paybox code retour param. */ - const PBX_RETOUR = 'PBX_RETOUR'; + public const PBX_RETOUR = 'PBX_RETOUR'; /** * Paybox hmac param. */ - const PBX_HMAC = 'PBX_HMAC'; + public const PBX_HMAC = 'PBX_HMAC'; /** * Paybox payment type param. */ - const PBX_TYPEPAIEMENT = 'PBX_TYPEPAIEMENT'; + public const PBX_TYPEPAIEMENT = 'PBX_TYPEPAIEMENT'; /** * Paybox card type param. */ - const PBX_TYPECARTE = 'PBX_TYPECARTE'; + public const PBX_TYPECARTE = 'PBX_TYPECARTE'; /** * Paybox total param. */ - const PBX_TOTAL = 'PBX_TOTAL'; + public const PBX_TOTAL = 'PBX_TOTAL'; /** * Paybox devise param. */ - const PBX_DEVISE = 'PBX_DEVISE'; + public const PBX_DEVISE = 'PBX_DEVISE'; /** * Paybox order number param. */ - const PBX_CMD = 'PBX_CMD'; + public const PBX_CMD = 'PBX_CMD'; /** * Paybox porteur param. */ - const PBX_PORTEUR = 'PBX_PORTEUR'; + public const PBX_PORTEUR = 'PBX_PORTEUR'; /** * Paybox redirect url when payment done. */ - const PBX_EFFECTUE = 'PBX_EFFECTUE'; + public const PBX_EFFECTUE = 'PBX_EFFECTUE'; /** * Paybox redirect url when payment canceled. */ - const PBX_ANNULE = 'PBX_ANNULE'; + public const PBX_ANNULE = 'PBX_ANNULE'; /** * Paybox redirect url when payment refused. */ - const PBX_REFUSE = 'PBX_REFUSE'; + public const PBX_REFUSE = 'PBX_REFUSE'; /** * Paybox time param. */ - const PBX_TIME = 'PBX_TIME'; + public const PBX_TIME = 'PBX_TIME'; /** * Server to server callback URL, also called IPN (Instant Payment Notification), called @@ -93,5 +93,5 @@ interface PayBoxRequestParams * manage safely the validation of the orders. * Fields defined in PBX_RETOUR will be sent to this page. */ - const PBX_REPONDRE_A = 'PBX_REPONDRE_A'; + public const PBX_REPONDRE_A = 'PBX_REPONDRE_A'; } diff --git a/src/PayBoxReturnParam.php b/src/PayBoxReturnParam.php index 8d62893..049fb3e 100644 --- a/src/PayBoxReturnParam.php +++ b/src/PayBoxReturnParam.php @@ -2,48 +2,48 @@ namespace Marem\PayumPaybox; -//TODO : A completer +// TODO : A completer interface PayBoxReturnParam { /** * Montant de la transaction (précisé dans PBX_TOTAL). */ - const TRANSACTION_AMOUNT = 'M'; + public const TRANSACTION_AMOUNT = 'M'; /** * Référence commande (précisée dans PBX_CMD) : espace URL encodé. */ - const REFERENCE = 'R'; + public const REFERENCE = 'R'; /** * Numéro d’appel. */ - const PHONE = 'T'; + public const PHONE = 'T'; /** * Numéro d’Autorisation (numéro remis par le centre d’autorisation) : URL encodé. */ - const AUTHORIZATION_NUMBER = 'A'; + public const AUTHORIZATION_NUMBER = 'A'; /** * Numéro d’abonnement (numéro remis par la plateforme). */ - const SUBSCRIPTION_NUMBER = 'B'; + public const SUBSCRIPTION_NUMBER = 'B'; /** * Type de Carte retenu (cf. PBX_TYPECARTE). */ - const CARD_TYPE = 'C'; + public const CARD_TYPE = 'C'; /** * Date de fin de validité de la carte du porteur. Format : AAMM. */ - const CARD_END_VALIDITY = 'D'; + public const CARD_END_VALIDITY = 'D'; /** * Code réponse de la transaction (cf. Tableau 2 : Codes réponse PBX_RETOUR). */ - const TRANSACTION_RESPONSE_CODE = 'E'; + public const TRANSACTION_RESPONSE_CODE = 'E'; /** * Etat de l’authentification du porteur vis-à-vis du programme 3-D Secure : @@ -52,30 +52,30 @@ interface PayBoxReturnParam * U : L’authentification du porteur n’a pas pu s’effectuer * N : Porteur non authentifié. */ - const THREE_D_SECURE_AUTHENTICATION_STATE = 'F'; + public const THREE_D_SECURE_AUTHENTICATION_STATE = 'F'; /** * Garantie du paiement par le programme 3-D Secure. Format : O ou N. */ - const THREE_D_SECURE_WARRANTY = 'G'; + public const THREE_D_SECURE_WARRANTY = 'G'; /** * Empreinte de la carte. */ - const EMPREINTE_CARD = 'H'; + public const EMPREINTE_CARD = 'H'; /** * Code pays de l’adresse IP de l’internaute. Format : ISO 3166 (alphabétique). */ - const USER_IP = 'I'; + public const USER_IP = 'I'; /** * 2 derniers chiffres du numéro de carte du porteur. */ - const CARD_LAST_DIGITS = 'J'; + public const CARD_LAST_DIGITS = 'J'; /** * Signature sur les variables de l’URL. Format : url-encodé. */ - const URL_SIGNATURE = 'K'; + public const URL_SIGNATURE = 'K'; } diff --git a/src/PayboxRetour.php b/src/PayboxRetour.php index 115628a..dd0fe9e 100644 --- a/src/PayboxRetour.php +++ b/src/PayboxRetour.php @@ -6,74 +6,74 @@ final class PayboxRetour extends ReadableEnum { - const PBX_RETOUR_00000 = '00000'; - const PBX_RETOUR_00001 = '00001'; - const PBX_RETOUR_00100 = '00100'; - const PBX_RETOUR_00101 = '00101'; - const PBX_RETOUR_00102 = '00102'; - const PBX_RETOUR_00103 = '00103'; - const PBX_RETOUR_00104 = '00104'; - const PBX_RETOUR_00105 = '00105'; - const PBX_RETOUR_00107 = '00107'; - const PBX_RETOUR_00108 = '00108'; - const PBX_RETOUR_00112 = '00112'; - const PBX_RETOUR_00113 = '00113'; - const PBX_RETOUR_00114 = '00114'; - const PBX_RETOUR_00115 = '00115'; - const PBX_RETOUR_00117 = '00117'; - const PBX_RETOUR_00119 = '00119'; - const PBX_RETOUR_00120 = '00120'; - const PBX_RETOUR_00124 = '00124'; - const PBX_RETOUR_00125 = '00125'; - const PBX_RETOUR_00126 = '00126'; - const PBX_RETOUR_00127 = '00127'; - const PBX_RETOUR_00128 = '00128'; - const PBX_RETOUR_00129 = '00129'; - const PBX_RETOUR_00130 = '00130'; - const PBX_RETOUR_00131 = '00131'; - const PBX_RETOUR_00133 = '00133'; - const PBX_RETOUR_00134 = '00134'; - const PBX_RETOUR_00138 = '00138'; - const PBX_RETOUR_00141 = '00141'; - const PBX_RETOUR_00143 = '00143'; - const PBX_RETOUR_00151 = '00151'; - const PBX_RETOUR_00154 = '00154'; - const PBX_RETOUR_00155 = '00155'; - const PBX_RETOUR_00156 = '00156'; - const PBX_RETOUR_00157 = '00157'; - const PBX_RETOUR_00158 = '00158'; - const PBX_RETOUR_00159 = '00159'; - const PBX_RETOUR_00160 = '00160'; - const PBX_RETOUR_00161 = '00161'; - const PBX_RETOUR_00163 = '00163'; - const PBX_RETOUR_00168 = '00168'; - const PBX_RETOUR_00175 = '00175'; - const PBX_RETOUR_00176 = '00176'; - const PBX_RETOUR_00189 = '00189'; - const PBX_RETOUR_00190 = '00190'; - const PBX_RETOUR_00191 = '00191'; - const PBX_RETOUR_00194 = '00194'; - const PBX_RETOUR_00196 = '00196'; - const PBX_RETOUR_00197 = '00197'; - const PBX_RETOUR_00198 = '00198'; - const PBX_RETOUR_00199 = '00199'; - const PBX_RETOUR_00003 = '00003'; - const PBX_RETOUR_00004 = '00004'; - const PBX_RETOUR_00006 = '00006'; - const PBX_RETOUR_00008 = '00008'; - const PBX_RETOUR_00009 = '00009'; - const PBX_RETOUR_00010 = '00010'; - const PBX_RETOUR_00011 = '00011'; - const PBX_RETOUR_00015 = '00015'; - const PBX_RETOUR_00016 = '00016'; - const PBX_RETOUR_00021 = '00021'; - const PBX_RETOUR_00029 = '00029'; - const PBX_RETOUR_00030 = '00030'; - const PBX_RETOUR_00031 = '00031'; - const PBX_RETOUR_00032 = '00032'; - const PBX_RETOUR_00033 = '00033'; - const PBX_RETOUR_00040 = '00040'; - const PBX_RETOUR_99999 = '99999'; + public const PBX_RETOUR_00000 = '00000'; + public const PBX_RETOUR_00001 = '00001'; + public const PBX_RETOUR_00100 = '00100'; + public const PBX_RETOUR_00101 = '00101'; + public const PBX_RETOUR_00102 = '00102'; + public const PBX_RETOUR_00103 = '00103'; + public const PBX_RETOUR_00104 = '00104'; + public const PBX_RETOUR_00105 = '00105'; + public const PBX_RETOUR_00107 = '00107'; + public const PBX_RETOUR_00108 = '00108'; + public const PBX_RETOUR_00112 = '00112'; + public const PBX_RETOUR_00113 = '00113'; + public const PBX_RETOUR_00114 = '00114'; + public const PBX_RETOUR_00115 = '00115'; + public const PBX_RETOUR_00117 = '00117'; + public const PBX_RETOUR_00119 = '00119'; + public const PBX_RETOUR_00120 = '00120'; + public const PBX_RETOUR_00124 = '00124'; + public const PBX_RETOUR_00125 = '00125'; + public const PBX_RETOUR_00126 = '00126'; + public const PBX_RETOUR_00127 = '00127'; + public const PBX_RETOUR_00128 = '00128'; + public const PBX_RETOUR_00129 = '00129'; + public const PBX_RETOUR_00130 = '00130'; + public const PBX_RETOUR_00131 = '00131'; + public const PBX_RETOUR_00133 = '00133'; + public const PBX_RETOUR_00134 = '00134'; + public const PBX_RETOUR_00138 = '00138'; + public const PBX_RETOUR_00141 = '00141'; + public const PBX_RETOUR_00143 = '00143'; + public const PBX_RETOUR_00151 = '00151'; + public const PBX_RETOUR_00154 = '00154'; + public const PBX_RETOUR_00155 = '00155'; + public const PBX_RETOUR_00156 = '00156'; + public const PBX_RETOUR_00157 = '00157'; + public const PBX_RETOUR_00158 = '00158'; + public const PBX_RETOUR_00159 = '00159'; + public const PBX_RETOUR_00160 = '00160'; + public const PBX_RETOUR_00161 = '00161'; + public const PBX_RETOUR_00163 = '00163'; + public const PBX_RETOUR_00168 = '00168'; + public const PBX_RETOUR_00175 = '00175'; + public const PBX_RETOUR_00176 = '00176'; + public const PBX_RETOUR_00189 = '00189'; + public const PBX_RETOUR_00190 = '00190'; + public const PBX_RETOUR_00191 = '00191'; + public const PBX_RETOUR_00194 = '00194'; + public const PBX_RETOUR_00196 = '00196'; + public const PBX_RETOUR_00197 = '00197'; + public const PBX_RETOUR_00198 = '00198'; + public const PBX_RETOUR_00199 = '00199'; + public const PBX_RETOUR_00003 = '00003'; + public const PBX_RETOUR_00004 = '00004'; + public const PBX_RETOUR_00006 = '00006'; + public const PBX_RETOUR_00008 = '00008'; + public const PBX_RETOUR_00009 = '00009'; + public const PBX_RETOUR_00010 = '00010'; + public const PBX_RETOUR_00011 = '00011'; + public const PBX_RETOUR_00015 = '00015'; + public const PBX_RETOUR_00016 = '00016'; + public const PBX_RETOUR_00021 = '00021'; + public const PBX_RETOUR_00029 = '00029'; + public const PBX_RETOUR_00030 = '00030'; + public const PBX_RETOUR_00031 = '00031'; + public const PBX_RETOUR_00032 = '00032'; + public const PBX_RETOUR_00033 = '00033'; + public const PBX_RETOUR_00040 = '00040'; + public const PBX_RETOUR_99999 = '99999'; public static function values(): array { diff --git a/tests/Action/NotifyActionTest.php b/tests/Action/NotifyActionTest.php index 742e1bf..8871cef 100644 --- a/tests/Action/NotifyActionTest.php +++ b/tests/Action/NotifyActionTest.php @@ -14,7 +14,6 @@ use Payum\Core\Request\Notify; use Payum\Core\Tests\GenericActionTest; use Psr\Log\LoggerAwareInterface; -use stdClass; class NotifyActionTest extends GenericActionTest { @@ -53,7 +52,7 @@ public function testThrowIfUnsupportedApiGiven() { $this->expectException(UnsupportedApiException::class); $action = new NotifyAction(); - $action->setApi(new stdClass()); + $action->setApi(new \stdClass()); } /** diff --git a/tests/ApiTest.php b/tests/ApiTest.php index ad6dca6..97877e5 100644 --- a/tests/ApiTest.php +++ b/tests/ApiTest.php @@ -96,6 +96,7 @@ public function testCheckPayboxSignatureShouldReturnFalseBecauseAQueryParameterH /** * @covers \Marem\PayumPaybox\Api::checkOriginIpAddress + * * @dataProvider checkOriginIpAddressProvider */ public function testCheckOriginIpAddress($request, $expected) @@ -117,7 +118,7 @@ public function testCheckOriginIpAddress($request, $expected) */ public function invokeMethod(&$object, $methodName, array $parameters = []) { - $reflection = new \ReflectionClass(\get_class($object)); + $reflection = new \ReflectionClass($object); $method = $reflection->getMethod($methodName); $method->setAccessible(true); @@ -151,7 +152,7 @@ public function checkOriginIpAddressProvider() [$ko, false], [$okProductionIncoming, true], ] - ; + ; } private function getApiMock(): Api