@@ -33,7 +33,7 @@ |
||
| 33 | 33 | } |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - final public static function fromArray($array, $save_indexes = null) |
|
| 36 | + final public static function fromArray($array, $save_indexes=null) |
|
| 37 | 37 | { |
| 38 | 38 | return new static(...$array); |
| 39 | 39 | } |
@@ -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 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | /** @see Searchable::find() */ |
| 36 | 36 | public function find($item) : int |
| 37 | 37 | { |
| 38 | - $position = $this->positionOf($item); |
|
| 38 | + $position=$this->positionOf($item); |
|
| 39 | 39 | $this->mustBeValid($position, $item); |
| 40 | 40 | return $position; |
| 41 | 41 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | /** @see Searchable::findThe() */ |
| 44 | 44 | public function findThe($object) : int |
| 45 | 45 | { |
| 46 | - $position = array_search($object, $this->items(), true); |
|
| 46 | + $position=array_search($object, $this->items(), true); |
|
| 47 | 47 | $this->mustBeValid($position, $object); |
| 48 | 48 | return $position; |
| 49 | 49 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * @see Reducible::reduce() |
| 23 | 23 | * @see array_reduce |
| 24 | 24 | */ |
| 25 | - public function reduce(Closure $function, $initial = null) |
|
| 25 | + public function reduce(Closure $function, $initial=null) |
|
| 26 | 26 | { |
| 27 | 27 | return array_reduce($this->items(), $function, $initial); |
| 28 | 28 | } |
@@ -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 | )); |