@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | ?int $ttlSec = null, |
| 47 | 47 | ?int $logoVersion = null, |
| 48 | 48 | ?int $colorSchemeVersion = null |
| 49 | - ): InitPaymentRequest |
|
| 49 | + ) : InitPaymentRequest |
|
| 50 | 50 | { |
| 51 | 51 | return new InitPaymentRequest( |
| 52 | 52 | $this->merchantId, |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | ); |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - public function createClosePayment(string $payId, ?int $totalAmount = null): ClosePaymentRequest |
|
| 94 | + public function createClosePayment(string $payId, ?int $totalAmount = null) : ClosePaymentRequest |
|
| 95 | 95 | { |
| 96 | 96 | return new ClosePaymentRequest( |
| 97 | 97 | $this->merchantId, |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | ); |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - public function createRefundPayment(string $payId, ?int $amount = null): RefundPaymentRequest |
|
| 103 | + public function createRefundPayment(string $payId, ?int $amount = null) : RefundPaymentRequest |
|
| 104 | 104 | { |
| 105 | 105 | return new RefundPaymentRequest( |
| 106 | 106 | $this->merchantId, |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | string $orderId, |
| 142 | 142 | ?Price $price = null, |
| 143 | 143 | ?string $description = null |
| 144 | - ): OneclickInitPaymentRequest |
|
| 144 | + ) : OneclickInitPaymentRequest |
|
| 145 | 145 | { |
| 146 | 146 | return new OneclickInitPaymentRequest( |
| 147 | 147 | $this->merchantId, |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | $this->currency = $currency; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - public function addItem(string $name, int $quantity, int $amount, ?string $description = null): void |
|
| 23 | + public function addItem(string $name, int $quantity, int $amount, ?string $description = null) : void |
|
| 24 | 24 | { |
| 25 | 25 | $this->items[] = new CartItem($name, $quantity, $amount, $description); |
| 26 | 26 | } |
@@ -12,6 +12,6 @@ |
||
| 12 | 12 | * @param string[] $headers |
| 13 | 13 | * @return Response |
| 14 | 14 | */ |
| 15 | - public function request(HttpMethod $method, string $url, ?array $data, array $headers = []): Response; |
|
| 15 | + public function request(HttpMethod $method, string $url, ? array $data, array $headers = []) : Response; |
|
| 16 | 16 | |
| 17 | 17 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $this->apiUrl = $apiUrl; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - public function setLogger(?LoggerInterface $logger): void |
|
| 49 | + public function setLogger(?LoggerInterface $logger) : void |
|
| 50 | 50 | { |
| 51 | 51 | $this->logger = $logger; |
| 52 | 52 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | SignatureDataFormatter $responseSignatureDataFormatter, |
| 76 | 76 | ?\Closure $responseValidityCallback = null, |
| 77 | 77 | array $extensions = [] |
| 78 | - ): Response |
|
| 78 | + ) : Response |
|
| 79 | 79 | { |
| 80 | 80 | return $this->request( |
| 81 | 81 | HttpMethod::get(HttpMethod::GET), |
@@ -180,11 +180,11 @@ discard block |
||
| 180 | 180 | HttpMethod $method, |
| 181 | 181 | string $url, |
| 182 | 182 | array $queries = [], |
| 183 | - ?array $data, |
|
| 183 | + ? array $data, |
|
| 184 | 184 | SignatureDataFormatter $responseSignatureDataFormatter, |
| 185 | 185 | ?\Closure $responseValidityCallback, |
| 186 | 186 | array $extensions = [] |
| 187 | - ): Response |
|
| 187 | + ) : Response |
|
| 188 | 188 | { |
| 189 | 189 | $urlFirstQueryPosition = strpos($url, '{'); |
| 190 | 190 | $endpointName = ($urlFirstQueryPosition !== false ? substr($url, 0, $urlFirstQueryPosition - 1) : $url); |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | * @param mixed[]|null $requestData |
| 339 | 339 | * @param \SlevomatCsobGateway\Api\Response $response |
| 340 | 340 | */ |
| 341 | - private function logRequest(HttpMethod $method, string $url, array $queries, ?array $requestData, Response $response): void |
|
| 341 | + private function logRequest(HttpMethod $method, string $url, array $queries, ? array $requestData, Response $response) : void |
|
| 342 | 342 | { |
| 343 | 343 | if ($this->logger === null) { |
| 344 | 344 | return; |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | * @return Response |
| 30 | 30 | * @throws GuzzleDriverException |
| 31 | 31 | */ |
| 32 | - public function request(HttpMethod $method, string $url, ?array $data, array $headers = []): Response |
|
| 32 | + public function request(HttpMethod $method, string $url, ? array $data, array $headers = []) : Response |
|
| 33 | 33 | { |
| 34 | 34 | $postData = null; |
| 35 | 35 | if ($method->equalsValue(HttpMethod::POST) || $method->equalsValue(HttpMethod::PUT)) { |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | * @return Response |
| 22 | 22 | * @throws CurlDriverException |
| 23 | 23 | */ |
| 24 | - public function request(HttpMethod $method, string $url, ?array $data, array $headers = []): Response |
|
| 24 | + public function request(HttpMethod $method, string $url, ? array $data, array $headers = []) : Response |
|
| 25 | 25 | { |
| 26 | 26 | $ch = curl_init($url); |
| 27 | 27 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | public function __construct( |
| 33 | 33 | ResponseCode $responseCode, |
| 34 | - ?array $data, |
|
| 34 | + ? array $data, |
|
| 35 | 35 | array $headers = [], |
| 36 | 36 | array $extensions = [] |
| 37 | 37 | ) |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | /** |
| 51 | 51 | * @return mixed[]|null |
| 52 | 52 | */ |
| 53 | - public function getData(): ?array |
|
| 53 | + public function getData(): ? array |
|
| 54 | 54 | { |
| 55 | 55 | return $this->data; |
| 56 | 56 | } |
@@ -110,7 +110,7 @@ |
||
| 110 | 110 | * |
| 111 | 111 | * @dataProvider getRequests |
| 112 | 112 | */ |
| 113 | - public function testRequests(HttpMethod $httpMethod, string $url, string $expectedUrl, array $requestData, ?array $expectedRequestData = null, ?array $responseData = null, ResponseCode $responseCode, array $responseHeaders): void |
|
| 113 | + public function testRequests(HttpMethod $httpMethod, string $url, string $expectedUrl, array $requestData, ? array $expectedRequestData = null, ? array $responseData = null, ResponseCode $responseCode, array $responseHeaders) : void |
|
| 114 | 114 | { |
| 115 | 115 | $cryptoService = $this->getMockBuilder(CryptoService::class) |
| 116 | 116 | ->disableOriginalConstructor() |