Passed
Push — master ( e5235c...ae2a80 )
by Eric
06:13
created
src/Arrays.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      *
72 72
      * @return TDefault|TValue
73 73
      */
74
-    public static function get(array|ArrayAccess $array, int|string $key, mixed $default = null): mixed
74
+    public static function get(array | ArrayAccess $array, int | string $key, mixed $default = null): mixed
75 75
     {
76 76
         if (self::keyExists($array, $key)) {
77 77
             /** @var TValue */
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      *
155 155
      * @return array<int, TValue>|false
156 156
      */
157
-    public static function interlace(array ...$arrays): array|false
157
+    public static function interlace(array ...$arrays): array | false
158 158
     {
159 159
         if ($arrays === []) {
160 160
             return false;
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
      * @param array<TKey, TValue>|ArrayAccess<TKey, TValue> $array
210 210
      * @param TKey                                          $key
211 211
      */
212
-    public static function keyExists(array|ArrayAccess $array, int|string $key): bool
212
+    public static function keyExists(array | ArrayAccess $array, int | string $key): bool
213 213
     {
214 214
         if ($array instanceof ArrayAccess) {
215 215
             return $array->offsetExists($key);
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
     public static function mapDeep(mixed $data, callable $callback, ?WeakMap $seen = null): mixed
235 235
     {
236 236
         /** @var WeakMap<object, true> $weakMap */
237
-        $weakMap = $seen ?? (static fn (): WeakMap => /** @return WeakMap<object, true> */
237
+        $weakMap = $seen ?? (static fn () : WeakMap => /** @return WeakMap<object, true> */
238 238
             new WeakMap())();
239 239
 
240 240
         if (!\is_array($data) && !\is_object($data)) {
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 
260 260
             array_walk(
261 261
                 $props,
262
-                static function (mixed $propValue, string $propName) use ($data, $callback, $weakMap): void {
262
+                static function(mixed $propValue, string $propName) use ($data, $callback, $weakMap): void {
263 263
                     $data->$propName = self::mapDeep($propValue, $callback, $weakMap);
264 264
                 }
265 265
             );
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
      *
285 285
      * @param-out (array<TKey, TValue>|ArrayAccess<TKey, TValue>) $array
286 286
      */
287
-    public static function set(array|ArrayAccess &$array, null|int|string $key, mixed $value): void
287
+    public static function set(array | ArrayAccess & $array, null | int | string $key, mixed $value): void
288 288
     {
289 289
         if ($key === null) {
290 290
             $array[] = $value;
Please login to merge, or discard this patch.
src/Conversion.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -159,10 +159,10 @@
 block discarded – undo
159 159
      * @return array<string, float|int|string>
160 160
      */
161 161
     public static function haversineDistance(
162
-        float|int $startingLatitude,
163
-        float|int $startingLongitude,
164
-        float|int $endingLatitude,
165
-        float|int $endingLongitude,
162
+        float | int $startingLatitude,
163
+        float | int $startingLongitude,
164
+        float | int $endingLatitude,
165
+        float | int $endingLongitude,
166 166
         int $precision = 0
167 167
     ): array {
168 168
         if (!\is_float($startingLatitude)) {
Please login to merge, or discard this patch.