@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * |
34 | 34 | * @param array $items |
35 | 35 | */ |
36 | - public function __construct(array $items = []) |
|
36 | + public function __construct(array $items = [ ]) |
|
37 | 37 | { |
38 | 38 | $this->items = $items; |
39 | 39 | $this->rewind(); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function set($key, $value) |
59 | 59 | { |
60 | - $this->items[$key] = $value; |
|
60 | + $this->items[ $key ] = $value; |
|
61 | 61 | |
62 | 62 | return $this; |
63 | 63 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | public function get($key, $default = null) |
74 | 74 | { |
75 | 75 | if ($this->containsKey($key)) { |
76 | - return $this->items[$key]; |
|
76 | + return $this->items[ $key ]; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | return $default; |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | */ |
146 | 146 | public function containsKey($key) |
147 | 147 | { |
148 | - return isset($this->items[$key]) || array_key_exists($key, $this->items); |
|
148 | + return isset($this->items[ $key ]) || array_key_exists($key, $this->items); |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | /** |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | */ |
177 | 177 | public function add($item) |
178 | 178 | { |
179 | - $this->items[] = $item; |
|
179 | + $this->items[ ] = $item; |
|
180 | 180 | |
181 | 181 | return $this; |
182 | 182 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | */ |
189 | 189 | public function clear() |
190 | 190 | { |
191 | - $this->items = []; |
|
191 | + $this->items = [ ]; |
|
192 | 192 | |
193 | 193 | return $this; |
194 | 194 | } |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | */ |
203 | 203 | public function remove($key) |
204 | 204 | { |
205 | - unset($this->items[$key]); |
|
205 | + unset($this->items[ $key ]); |
|
206 | 206 | |
207 | 207 | return $this; |
208 | 208 | } |
@@ -219,8 +219,8 @@ discard block |
||
219 | 219 | if (!$this->containsKey($key)) { |
220 | 220 | return null; |
221 | 221 | } |
222 | - $removed = $this->items[$key]; |
|
223 | - unset($this->items[$key]); |
|
222 | + $removed = $this->items[ $key ]; |
|
223 | + unset($this->items[ $key ]); |
|
224 | 224 | |
225 | 225 | return $removed; |
226 | 226 | } |
@@ -719,8 +719,8 @@ discard block |
||
719 | 719 | $collection = Factory::create($items); |
720 | 720 | |
721 | 721 | return $this->map( |
722 | - function ($value, $key, $index) use ($collection) { |
|
723 | - return [$value, $collection->indexOf($index)]; |
|
722 | + function($value, $key, $index) use ($collection) { |
|
723 | + return [ $value, $collection->indexOf($index) ]; |
|
724 | 724 | } |
725 | 725 | ); |
726 | 726 | } |
@@ -831,7 +831,7 @@ discard block |
||
831 | 831 | } |
832 | 832 | |
833 | 833 | return $this->prune( |
834 | - function ($value, $key, $index) use ($offset, $length) { |
|
834 | + function($value, $key, $index) use ($offset, $length) { |
|
835 | 835 | return !(($index >= $offset) && ($index < $offset + $length)); |
836 | 836 | } |
837 | 837 | ); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | * |
24 | 24 | * @return Collection |
25 | 25 | */ |
26 | - public static function create($items = [], $className = 'Novactive\Collection\Collection') |
|
26 | + public static function create($items = [ ], $className = 'Novactive\Collection\Collection') |
|
27 | 27 | { |
28 | 28 | $options = null; |
29 | 29 | if (getenv('DEBUG_COLLECTION_CLASS') && getenv('DEBUG_COLLECTION_CLASS') != '') { |