@@ -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() |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | ?PaymentStatus $paymentStatus, |
62 | 62 | ?HttpMethod $redirectMethod, |
63 | 63 | ?string $redirectUrl, |
64 | - ?array $redirectParams |
|
64 | + ? array $redirectParams |
|
65 | 65 | ) |
66 | 66 | { |
67 | 67 | Validator::checkPayId($payId); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | /** |
115 | 115 | * @return mixed[]|null |
116 | 116 | */ |
117 | - public function getRedirectParams(): ?array |
|
117 | + public function getRedirectParams(): ? array |
|
118 | 118 | { |
119 | 119 | return $this->redirectParams; |
120 | 120 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | ResultCode $resultCode, |
52 | 52 | string $resultMessage, |
53 | 53 | ?PaymentStatus $paymentStatus, |
54 | - ?array $checkoutParams |
|
54 | + ? array $checkoutParams |
|
55 | 55 | ) |
56 | 56 | { |
57 | 57 | $this->payId = $payId; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | /** |
91 | 91 | * @return mixed[]|null |
92 | 92 | */ |
93 | - public function getCheckoutParams(): ?array |
|
93 | + public function getCheckoutParams(): ? array |
|
94 | 94 | { |
95 | 95 | return $this->checkoutParams; |
96 | 96 | } |