@@ -48,7 +48,7 @@ |
||
| 48 | 48 | $response = $this->patchRequest('', ['json' => $body]); |
| 49 | 49 | $result = $this->parseResponse($response); |
| 50 | 50 | |
| 51 | - return array_map(static function (array $recipientResult): EnvelopeRecipient { |
|
| 51 | + return array_map(static function(array $recipientResult): EnvelopeRecipient { |
|
| 52 | 52 | return new EnvelopeRecipient($recipientResult); |
| 53 | 53 | }, $result); |
| 54 | 54 | } |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | */ |
| 126 | 126 | public static function jsonDecode(string $json): array |
| 127 | 127 | { |
| 128 | - $value = json_decode($json, true); |
|
| 128 | + $value = json_decode($json, true); |
|
| 129 | 129 | |
| 130 | 130 | if (!is_array($value) || json_last_error() !== JSON_ERROR_NONE) { |
| 131 | 131 | throw new JsonException(json_last_error_msg(), json_last_error()); |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $replaces[] = (string)$param; |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - $searches = array_map(static function (string $search): string { |
|
| 161 | + $searches = array_map(static function(string $search): string { |
|
| 162 | 162 | return sprintf("{%s}", $search); |
| 163 | 163 | }, $searches); |
| 164 | 164 | |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | */ |
| 300 | 300 | protected static function normalizeJson(array $json): array |
| 301 | 301 | { |
| 302 | - $normalize = static function ($value) { |
|
| 302 | + $normalize = static function($value) { |
|
| 303 | 303 | if (is_array($value)) { |
| 304 | 304 | return self::normalizeJson($value); |
| 305 | 305 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | if ($value instanceof Collection) { |
| 66 | - $value = array_map(static function (BaseResource $resource): array { |
|
| 66 | + $value = array_map(static function(BaseResource $resource): array { |
|
| 67 | 67 | return $resource->toArray(); |
| 68 | 68 | }, $value->getArrayCopy()); |
| 69 | 69 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | // parse Resource class from type |
| 143 | 143 | preg_match('/Collection<(.+)>/', $type, $matches); |
| 144 | 144 | $resourceClass = $matches[1]; |
| 145 | - $items = array_map(static function (array $itemValue) use ($resourceClass) { |
|
| 145 | + $items = array_map(static function(array $itemValue) use ($resourceClass) { |
|
| 146 | 146 | return new $resourceClass($itemValue); |
| 147 | 147 | }, $value); |
| 148 | 148 | $value = new Collection($items); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | unset($values['resourceClass']); |
| 53 | 53 | $values['items'] = array_map( |
| 54 | - static function (BaseResource $item): array { |
|
| 54 | + static function(BaseResource $item): array { |
|
| 55 | 55 | return $item->toArray(); |
| 56 | 56 | }, |
| 57 | 57 | ($values['items'] ?? []) |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | if ($property === 'items') { |
| 67 | 67 | $resourceClass = $this->resourceClass; |
| 68 | 68 | $value = array_map( |
| 69 | - static function (array $itemValues) use ($resourceClass): BaseResource { |
|
| 69 | + static function(array $itemValues) use ($resourceClass): BaseResource { |
|
| 70 | 70 | return new $resourceClass($itemValues); |
| 71 | 71 | }, |
| 72 | 72 | $value |