Completed
Push — master ( 10de85...76baec )
by Kacper
03:21
created
Utils/Filter.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
  */
35 35
 function equals($value) : \Closure
36 36
 {
37
-    return function ($argument) use ($value) {
37
+    return function($argument) use ($value) {
38 38
         return $argument == $value;
39 39
     };
40 40
 }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
  */
56 56
 function same($value) : \Closure
57 57
 {
58
-    return function ($argument) use ($value) {
58
+    return function($argument) use ($value) {
59 59
         return $argument === $value;
60 60
     };
61 61
 }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
  */
78 78
 function instance($expected) : \Closure
79 79
 {
80
-    return function ($object) use ($expected) {
80
+    return function($object) use ($expected) {
81 81
         return $expected instanceof \Closure ? $expected(get_class($object)) : $object instanceof $expected;
82 82
     };
83 83
 }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
  */
104 104
 function matches($regex, ...$options) : \Closure
105 105
 {
106
-    return function ($value) use ($regex, $options) {
106
+    return function($value) use ($regex, $options) {
107 107
         return preg_match($regex, $value, $null, ...$options) > 0;
108 108
     };
109 109
 }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
  * @return \Closure
123 123
  */
124 124
 function in(...$options) {
125
-    return function ($value) use ($options) {
125
+    return function($value) use ($options) {
126 126
         return in_array($value, $options);
127 127
     };
128 128
 }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
  */
197 197
 function all(callable ...$functions) : \Closure
198 198
 {
199
-    return function (...$args) use ($functions) {
199
+    return function(...$args) use ($functions) {
200 200
         foreach ($functions as $function) {
201 201
             if (!$function(...$args)) {
202 202
                 return false;
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
  */
226 226
 function any(callable ...$functions) : \Closure
227 227
 {
228
-    return function (...$args) use ($functions) {
228
+    return function(...$args) use ($functions) {
229 229
         foreach ($functions as $function) {
230 230
             if ($function(...$args)) {
231 231
                 return true;
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
  */
270 270
 function not(callable $predicate) : \Closure
271 271
 {
272
-    return function (...$arguments) use ($predicate) {
272
+    return function(...$arguments) use ($predicate) {
273 273
         return !$predicate(...$arguments);
274 274
     };
275 275
 }
@@ -297,13 +297,13 @@  discard block
 block discarded – undo
297 297
  */
298 298
 function argument(int $offset, callable $predicate, $length = true) : \Closure
299 299
 {
300
-    if($length === true) {
300
+    if ($length === true) {
301 301
         $length = 1;
302
-    } elseif($length === false) {
302
+    } elseif ($length === false) {
303 303
         $length = null;
304 304
     }
305 305
 
306
-    return function (...$arguments) use ($predicate, $offset, $length) {
306
+    return function(...$arguments) use ($predicate, $offset, $length) {
307 307
         return $predicate(...array_slice($arguments, $offset, $length, false));
308 308
     };
309 309
 }
@@ -326,9 +326,9 @@  discard block
 block discarded – undo
326 326
  */
327 327
 function consecutive(callable ...$predicates)
328 328
 {
329
-    return function (...$arguments) use ($predicates) {
329
+    return function(...$arguments) use ($predicates) {
330 330
         foreach ($arguments as $index => $value) {
331
-            if(!$predicates[$index]($value)) {
331
+            if (!$predicates[$index]($value)) {
332 332
                 return false;
333 333
             }
334 334
         }
Please login to merge, or discard this patch.
Utils/ObservableCollection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function offsetSet($index, $value)
72 72
     {
73 73
         parent::offsetSet($index, $value);
74
-        $this->emit('set', [ $value, $index ]);
74
+        $this->emit('set', [$value, $index]);
75 75
     }
76 76
 
77 77
     /**
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function offsetUnset($index)
87 87
     {
88
-        $this->emit('remove', [ $this[$index], $index ]);
88
+        $this->emit('remove', [$this[$index], $index]);
89 89
 
90 90
         parent::offsetUnset($index);
91 91
 
92
-        if(!count($this)) {
92
+        if (!count($this)) {
93 93
             $this->emit('empty');
94 94
         }
95 95
     }
Please login to merge, or discard this patch.