Passed
Push — master ( 28f3a4...9d6212 )
by Martins
02:09
created
src/Tree.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace MartanLV\Koki;
6 6
 
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function __construct(array $intervals, bool $preSorted = false)
23 23
     {
24
-        !$preSorted && usort($intervals, function (IntervalInterface $i0, IntervalInterface $i) {
24
+        !$preSorted && usort($intervals, function(IntervalInterface $i0, IntervalInterface $i) {
25 25
             return $i0->getStart() <=> $i->getStart();
26 26
         });
27 27
         $this->root = $this->toTree($intervals);
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             return;
43 43
         }
44 44
 
45
-        array_walk($intervals, function (IntervalInterface $el) use (&$max) {
45
+        array_walk($intervals, function(IntervalInterface $el) use (&$max) {
46 46
             if ($max < $el->getEnd()) {
47 47
                 $max = $el->getEnd();
48 48
             }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public function select(int $low, int $high): array
70 70
     {
71
-        return $this->root ? $this->root->select($low, $high) : [];
71
+        return $this->root ? $this->root->select($low, $high) : [ ];
72 72
     }
73 73
 
74 74
     /**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     {
79 79
         $arr = $this->all();
80 80
 
81
-        usort($arr, function (IntervalInterface $i0, IntervalInterface $i) {
81
+        usort($arr, function(IntervalInterface $i0, IntervalInterface $i) {
82 82
             return $i0->getStart() <=> $i->getStart();
83 83
         });
84 84
 
@@ -87,17 +87,17 @@  discard block
 block discarded – undo
87 87
 
88 88
     public function yieldInterSelect(int $low, int $high)
89 89
     {
90
-        return $this->root ? $this->root->yieldInterSelect($low, $high) : [];
90
+        return $this->root ? $this->root->yieldInterSelect($low, $high) : [ ];
91 91
     }
92 92
 
93 93
     public function interSelect(int $low, int $high): array
94 94
     {
95
-        return $this->root ? $this->root->interSelect($low, $high) : [];
95
+        return $this->root ? $this->root->interSelect($low, $high) : [ ];
96 96
     }
97 97
 
98 98
     public function yieldSelect(int $low, int $high)
99 99
     {
100
-        return $this->root ? $this->root->yieldSelect($low, $high) : [];
100
+        return $this->root ? $this->root->yieldSelect($low, $high) : [ ];
101 101
     }
102 102
 
103 103
     /**
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      */
106 106
     public function all(): array
107 107
     {
108
-        return $this->root ? $this->root->all() : [];
108
+        return $this->root ? $this->root->all() : [ ];
109 109
     }
110 110
 
111 111
     /**
@@ -115,6 +115,6 @@  discard block
 block discarded – undo
115 115
      */
116 116
     public function yieldAll()
117 117
     {
118
-        return $this->root ? $this->root->yieldAll() : [];
118
+        return $this->root ? $this->root->yieldAll() : [ ];
119 119
     }
120 120
 }
Please login to merge, or discard this patch.