Passed
Branch 1.x (4725ed)
by Pavel
11:38
created
Category
src/DigiSignClient.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
src/Endpoint/EnvelopeRecipientsEndpoint.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Resource/ListResource.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Resource/BaseResource.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
examples/list_envelopes.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@
 block discarded – undo
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
Please login to merge, or discard this patch.