@@ -24,8 +24,8 @@ |
||
24 | 24 | */ |
25 | 25 | public function change(int $index, $newItem) : Alterable |
26 | 26 | { |
27 | - $items = $this->items(); |
|
28 | - $items[$index] = $newItem; |
|
27 | + $items=$this->items(); |
|
28 | + $items[$index]=$newItem; |
|
29 | 29 | return $this->newCopy($items); |
30 | 30 | } |
31 | 31 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function delete(int $index) : Purgeable |
26 | 26 | { |
27 | - $items = $this->items(); |
|
27 | + $items=$this->items(); |
|
28 | 28 | unset($items[$index]); |
29 | 29 | return $this->newCopy($items); |
30 | 30 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | { |
38 | 38 | return $this->newCopy(array_filter( |
39 | 39 | $this->items(), |
40 | - function ($item) use ($itemsToRemove) { |
|
40 | + function($item) use ($itemsToRemove) { |
|
41 | 41 | return !in_array($item, $itemsToRemove, true); |
42 | 42 | } |
43 | 43 | )); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | { |
28 | 28 | return $this->newCopy(array_filter( |
29 | 29 | $this->items(), |
30 | - function ($item) use ($others) : bool |
|
30 | + function($item) use ($others) : bool |
|
31 | 31 | { |
32 | 32 | foreach ($others as $otherCollection) { |
33 | 33 | if (in_array($item, $otherCollection->items())) { |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function find($item) : int |
49 | 49 | { |
50 | - $position = $this->positionOf($item); |
|
50 | + $position=$this->positionOf($item); |
|
51 | 51 | $this->mustBeValid($position, $item); |
52 | 52 | return $position; |
53 | 53 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function findThe($object) : int |
61 | 61 | { |
62 | - $position = array_search($object, $this->items(), true); |
|
62 | + $position=array_search($object, $this->items(), true); |
|
63 | 63 | $this->mustBeValid($position, $object); |
64 | 64 | return $position; |
65 | 65 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | * @param bool|null $save_indexes Ignored parameter. |
46 | 46 | * @return self|static |
47 | 47 | */ |
48 | - final public static function fromArray($array, $save_indexes = null) : self |
|
48 | + final public static function fromArray($array, $save_indexes=null) : self |
|
49 | 49 | { |
50 | 50 | return new static(...$array); |
51 | 51 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * @param mixed $initial |
25 | 25 | * @return mixed |
26 | 26 | */ |
27 | - public function reduce(Closure $function, $initial = null) |
|
27 | + public function reduce(Closure $function, $initial=null) |
|
28 | 28 | { |
29 | 29 | return array_reduce($this->items(), $function, $initial); |
30 | 30 | } |