@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | $replaces[] = (string)$param; |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | - $searches = array_map(static fn (string $search) => sprintf("{%s}", $search), $searches); |
|
| 132 | + $searches = array_map(static fn(string $search) => sprintf("{%s}", $search), $searches); |
|
| 133 | 133 | |
| 134 | 134 | $uri = str_replace($searches, $replaces, $uri); |
| 135 | 135 | |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | */ |
| 265 | 265 | protected static function normalizeJson(array $json): array |
| 266 | 266 | { |
| 267 | - $normalize = static function ($value) { |
|
| 267 | + $normalize = static function($value) { |
|
| 268 | 268 | if (is_array($value)) { |
| 269 | 269 | return self::normalizeJson($value); |
| 270 | 270 | } |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | $response = $this->patchRequest('', ['json' => $body]); |
| 49 | 49 | $result = $this->parseResponse($response); |
| 50 | 50 | |
| 51 | - return array_map(static fn (array $recipientResult) => new EnvelopeRecipient($recipientResult), $result); |
|
| 51 | + return array_map(static fn(array $recipientResult) => new EnvelopeRecipient($recipientResult), $result); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $values = parent::toArray(); |
| 39 | 39 | |
| 40 | 40 | unset($values['resourceClass']); |
| 41 | - $values['items'] = array_map(static fn (BaseResource $item) => $item->toArray(), ($values['items'] ?? [])); |
|
| 41 | + $values['items'] = array_map(static fn(BaseResource $item) => $item->toArray(), ($values['items'] ?? [])); |
|
| 42 | 42 | |
| 43 | 43 | return $values; |
| 44 | 44 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | { |
| 49 | 49 | if ($property === 'items') { |
| 50 | 50 | $resourceClass = $this->resourceClass; |
| 51 | - $value = array_map(static fn (array $itemValues): BaseResource => new $resourceClass($itemValues), $value); |
|
| 51 | + $value = array_map(static fn(array $itemValues): BaseResource => new $resourceClass($itemValues), $value); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | parent::setProperty($property, $value); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | if ($value instanceof Collection) { |
| 67 | - $value = array_map(static fn (BaseResource $resource) => $resource->toArray(), $value->getArrayCopy()); |
|
| 67 | + $value = array_map(static fn(BaseResource $resource) => $resource->toArray(), $value->getArrayCopy()); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | $result[$property] = $value; |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | // parse Resource class from type |
| 142 | 142 | preg_match('/Collection<(.+)>/', $type, $matches); |
| 143 | 143 | $resourceClass = $matches[1]; |
| 144 | - $items = array_map(static fn (array $itemValue) => new $resourceClass($itemValue), $value); |
|
| 144 | + $items = array_map(static fn(array $itemValue) => new $resourceClass($itemValue), $value); |
|
| 145 | 145 | $value = new Collection($items); |
| 146 | 146 | } |
| 147 | 147 | |
@@ -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 |