@@ -13,11 +13,11 @@ |
||
| 13 | 13 | ]); |
| 14 | 14 | |
| 15 | 15 | $list = $dgs->envelopes()->list([ |
| 16 | - 'status' => ['in' => ['draft', 'sent']], // status is "draft" or "sent" |
|
| 17 | - 'emailSubject' => ['contains' => 'Documents'], // subject contains "Documents" |
|
| 18 | - 'order' => ['createdAt' => 'DESC'], // order by createdAt descending |
|
| 19 | - 'itemsPerPage' => 30, // limit items returned in request |
|
| 20 | - 'page' => 1, // the page |
|
| 16 | + 'status' => ['in' => ['draft', 'sent']], // status is "draft" or "sent" |
|
| 17 | + 'emailSubject' => ['contains' => 'Documents'], // subject contains "Documents" |
|
| 18 | + 'order' => ['createdAt' => 'DESC'], // order by createdAt descending |
|
| 19 | + 'itemsPerPage' => 30, // limit items returned in request |
|
| 20 | + 'page' => 1, // the page |
|
| 21 | 21 | ]); |
| 22 | 22 | |
| 23 | 23 | // Print envelopes ID, subject and status |
@@ -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 | } |
@@ -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 |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | { |
| 32 | 32 | $this->resourceClass = $resourceClass; |
| 33 | 33 | |
| 34 | - $items = array_map(static function (array $itemValue) use ($resourceClass) { |
|
| 34 | + $items = array_map(static function(array $itemValue) use ($resourceClass) { |
|
| 35 | 35 | return new $resourceClass($itemValue); |
| 36 | 36 | }, $result); |
| 37 | 37 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | public function toArray(): array |
| 67 | 67 | { |
| 68 | 68 | return array_map( |
| 69 | - static function (BaseResource $item): array { |
|
| 69 | + static function(BaseResource $item): array { |
|
| 70 | 70 | return $item->toArray(); |
| 71 | 71 | }, |
| 72 | 72 | $this->getArrayCopy() |