Passed
Pull Request — master (#45)
by Christopher
04:31 queued 01:28
created
src/polyfill.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,8 +51,12 @@  discard block
 block discarded – undo
51 51
 if(!function_exists('iterable_to_array')) {
52 52
     function iterable_to_array(?iterable $it): array
53 53
     {
54
-        if(null === $it) return [];
55
-        if (is_array($it)) return $it;
54
+        if(null === $it) {
55
+            return [];
56
+        }
57
+        if (is_array($it)) {
58
+            return $it;
59
+        }
56 60
         $ret = [];
57 61
         array_push($ret, ...$it);
58 62
         return $ret;
@@ -62,7 +66,9 @@  discard block
 block discarded – undo
62 66
 
63 67
     function iterable_to_traversable(?iterable $it): Traversable
64 68
     {
65
-        if(null === $it) $it = [];
69
+        if(null === $it) {
70
+            $it = [];
71
+        }
66 72
         yield from $it;
67 73
     }
68 74
 }
69 75
\ No newline at end of file
Please login to merge, or discard this patch.