@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * @param array $filters |
| 27 | 27 | * @return mixed |
| 28 | 28 | */ |
| 29 | - public function all($filters = []) |
|
| 29 | + public function all($filters = [ ]) |
|
| 30 | 30 | { |
| 31 | 31 | return $this->client->get('transactions?'.http_build_query($filters)); |
| 32 | 32 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | public function getByRequestId(string $requestId) |
| 65 | 65 | { |
| 66 | - $query = ['id_type' => 'request_id']; |
|
| 66 | + $query = [ 'id_type' => 'request_id' ]; |
|
| 67 | 67 | return $this->client->get(self::ENDPOINT.'/'.$requestId.'?'.http_build_query($query)); |
| 68 | 68 | } |
| 69 | 69 | } |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | */ |
| 29 | 29 | public function get(string $from, string $to, float $amount) |
| 30 | 30 | { |
| 31 | - $params = ['from' => $from, 'to' => $to, 'amount' => $amount]; |
|
| 31 | + $params = [ 'from' => $from, 'to' => $to, 'amount' => $amount ]; |
|
| 32 | 32 | return $this->client->get(self::ENDPOINT.'?'.http_build_query($params)); |
| 33 | 33 | } |
| 34 | 34 | } |
@@ -104,18 +104,18 @@ |
||
| 104 | 104 | */ |
| 105 | 105 | public function getFailedEvents(string $id, int $limit = null, \DateTime $createdBefore = null) |
| 106 | 106 | { |
| 107 | - $args = []; |
|
| 107 | + $args = [ ]; |
|
| 108 | 108 | if (null !== $limit) { |
| 109 | - $args['limit'] = $limit; |
|
| 109 | + $args[ 'limit' ] = $limit; |
|
| 110 | 110 | } |
| 111 | 111 | if (null !== $limit) { |
| 112 | - $args['created_before'] = $createdBefore->format(\DateTime::ISO8601); |
|
| 112 | + $args[ 'created_before' ] = $createdBefore->format(\DateTime::ISO8601); |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | $query = http_build_query($args); |
| 116 | 116 | |
| 117 | 117 | $endpoint = self::ENDPOINT.'/'.$id.'/failed-events'; |
| 118 | - $endpoint = implode('?', array_filter([$endpoint, $query])); |
|
| 118 | + $endpoint = implode('?', array_filter([ $endpoint, $query ])); |
|
| 119 | 119 | |
| 120 | 120 | return $this->client->get($endpoint); |
| 121 | 121 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * @param string $mode |
| 95 | 95 | * @param array $clientOptions |
| 96 | 96 | */ |
| 97 | - public function __construct(AccessToken $accessToken, $mode = 'production', array $clientOptions = []) |
|
| 97 | + public function __construct(AccessToken $accessToken, $mode = 'production', array $clientOptions = [ ]) |
|
| 98 | 98 | { |
| 99 | 99 | $this->accessToken = $accessToken; |
| 100 | 100 | $this->mode = $mode; |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | */ |
| 163 | 163 | public function post($endpoint, $json) |
| 164 | 164 | { |
| 165 | - $response = $this->httpClient->request('POST', $this->getBaseUrl().$endpoint, ['json' => $json]); |
|
| 165 | + $response = $this->httpClient->request('POST', $this->getBaseUrl().$endpoint, [ 'json' => $json ]); |
|
| 166 | 166 | |
| 167 | 167 | return $this->handleResponse($response); |
| 168 | 168 | } |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | */ |
| 176 | 176 | public function patch($endpoint, $json) |
| 177 | 177 | { |
| 178 | - $response = $this->httpClient->request('PATCH', $this->getBaseUrl().$endpoint, ['json' => $json]); |
|
| 178 | + $response = $this->httpClient->request('PATCH', $this->getBaseUrl().$endpoint, [ 'json' => $json ]); |
|
| 179 | 179 | |
| 180 | 180 | return $this->handleResponse($response); |
| 181 | 181 | } |