@@ -31,11 +31,11 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function apply(\Iterator $set) |
| 33 | 33 | { |
| 34 | - $result = []; |
|
| 34 | + $result = [ ]; |
|
| 35 | 35 | |
| 36 | 36 | foreach ($set as $item) { |
| 37 | - if (! in_array($item, $result, $this->strict)) { |
|
| 38 | - $result[] = $item; |
|
| 37 | + if ( ! in_array($item, $result, $this->strict)) { |
|
| 38 | + $result[ ] = $item; |
|
| 39 | 39 | } |
| 40 | 40 | } |
| 41 | 41 | |
@@ -38,13 +38,13 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | public function apply(\Iterator $set) |
| 40 | 40 | { |
| 41 | - $result = []; |
|
| 41 | + $result = [ ]; |
|
| 42 | 42 | |
| 43 | 43 | $keyMapper = $this->keyMapper; |
| 44 | 44 | $valueMapper = $this->valueMapper; |
| 45 | 45 | |
| 46 | 46 | foreach ($set as $key => $item) { |
| 47 | - $result[$keyMapper($item, $key)] = $valueMapper($item, $key); |
|
| 47 | + $result[ $keyMapper($item, $key) ] = $valueMapper($item, $key); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | return $result; |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | { |
| 32 | 32 | $val = $this->getValue(); |
| 33 | 33 | |
| 34 | - if (! $val instanceof LocalDate || ! $input instanceof LocalDate) { |
|
| 34 | + if ( ! $val instanceof LocalDate || ! $input instanceof LocalDate) { |
|
| 35 | 35 | return false; |
| 36 | 36 | } |
| 37 | 37 | |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | $count = count($iteratables); |
| 35 | 35 | |
| 36 | 36 | if ($count === 1) { |
| 37 | - return $this->createSingleIterator($iteratables[0]); |
|
| 37 | + return $this->createSingleIterator($iteratables[ 0 ]); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | if ($count > 1) { |
@@ -37,9 +37,9 @@ |
||
| 37 | 37 | $left = (int) floor($middle); |
| 38 | 38 | $right = (int) ceil($middle); |
| 39 | 39 | |
| 40 | - $leftVal = $data[$left]; |
|
| 41 | - $rightVal = $data[$right]; |
|
| 40 | + $leftVal = $data[ $left ]; |
|
| 41 | + $rightVal = $data[ $right ]; |
|
| 42 | 42 | |
| 43 | - return is_scalar($leftVal) && is_scalar($rightVal) ? ($data[$left] + $data[$right]) / 2 : 0; |
|
| 43 | + return is_scalar($leftVal) && is_scalar($rightVal) ? ($data[ $left ] + $data[ $right ]) / 2 : 0; |
|
| 44 | 44 | } |
| 45 | 45 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $func = $this->function; |
| 28 | 28 | $data = iterator_to_array($set); |
| 29 | 29 | |
| 30 | - usort($data, function ($i1, $i2) use ($func) { |
|
| 30 | + usort($data, function($i1, $i2) use ($func) { |
|
| 31 | 31 | |
| 32 | 32 | $val1 = $func($i1); |
| 33 | 33 | $val2 = $func($i2); |
@@ -36,13 +36,13 @@ |
||
| 36 | 36 | |
| 37 | 37 | public function __invoke($input) |
| 38 | 38 | { |
| 39 | - if (! is_string($input)) { |
|
| 39 | + if ( ! is_string($input)) { |
|
| 40 | 40 | return false; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | $search = $this->getValue(); |
| 44 | 44 | |
| 45 | - if (! is_string($search)) { |
|
| 45 | + if ( ! is_string($search)) { |
|
| 46 | 46 | return false; |
| 47 | 47 | } |
| 48 | 48 | |
@@ -37,16 +37,16 @@ |
||
| 37 | 37 | public function apply(\Iterator $set) |
| 38 | 38 | { |
| 39 | 39 | $map = $this->mapper; |
| 40 | - $result = []; |
|
| 41 | - $known = []; |
|
| 40 | + $result = [ ]; |
|
| 41 | + $known = [ ]; |
|
| 42 | 42 | |
| 43 | 43 | foreach ($set as $item) { |
| 44 | 44 | |
| 45 | 45 | $mapped = $map($item); |
| 46 | 46 | |
| 47 | - if (! in_array($mapped, $known, $this->strict)) { |
|
| 48 | - $known[] = $mapped; |
|
| 49 | - $result[] = $item; |
|
| 47 | + if ( ! in_array($mapped, $known, $this->strict)) { |
|
| 48 | + $known[ ] = $mapped; |
|
| 49 | + $result[ ] = $item; |
|
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | public function __invoke($input) |
| 25 | 25 | { |
| 26 | - if (! is_scalar($input)) { |
|
| 26 | + if ( ! is_scalar($input)) { |
|
| 27 | 27 | return false; |
| 28 | 28 | } |
| 29 | 29 | |