@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function __invoke($input) |
| 23 | 23 | { |
| 24 | - if (! is_int($input)) { |
|
| 24 | + if ( ! is_int($input)) { |
|
| 25 | 25 | return false; |
| 26 | 26 | } |
| 27 | 27 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | $factor = $this->getValue(); |
| 25 | 25 | |
| 26 | - if (! is_numeric($factor) || ! is_numeric($input) || (float) $factor === 0.0) { |
|
| 26 | + if ( ! is_numeric($factor) || ! is_numeric($input) || (float) $factor === 0.0) { |
|
| 27 | 27 | return false; |
| 28 | 28 | } |
| 29 | 29 | |
@@ -32,11 +32,11 @@ |
||
| 32 | 32 | { |
| 33 | 33 | $group = 0; |
| 34 | 34 | $counter = $this->chunkSize; |
| 35 | - $ret = []; |
|
| 35 | + $ret = [ ]; |
|
| 36 | 36 | |
| 37 | 37 | foreach ($set as $item) { |
| 38 | 38 | |
| 39 | - $ret[$group][] = $item; |
|
| 39 | + $ret[ $group ][ ] = $item; |
|
| 40 | 40 | |
| 41 | 41 | if (--$counter === 0) { |
| 42 | 42 | $counter = $this->chunkSize; |
@@ -20,13 +20,13 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function apply(\Iterator $set) |
| 22 | 22 | { |
| 23 | - $ret = []; |
|
| 23 | + $ret = [ ]; |
|
| 24 | 24 | $func = $this->function; |
| 25 | 25 | |
| 26 | 26 | foreach ($set as $key => $item) { |
| 27 | 27 | $group = $func($item, $key); |
| 28 | 28 | |
| 29 | - $ret[$group][] = $item; |
|
| 29 | + $ret[ $group ][ ] = $item; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | return new \ArrayIterator($ret); |
@@ -35,12 +35,12 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function apply($input, $index, IntermediateContext $context) |
| 37 | 37 | { |
| 38 | - if (! $context->memory->contains($this)) { |
|
| 38 | + if ( ! $context->memory->contains($this)) { |
|
| 39 | 39 | $context->memory->offsetSet($this, 0); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $count = $context->memory->offsetGet($this); |
| 43 | - $context->memory->offsetSet($this, $count+1); |
|
| 43 | + $context->memory->offsetSet($this, $count + 1); |
|
| 44 | 44 | |
| 45 | 45 | $takeIt = $count >= $this->skip; |
| 46 | 46 | |
@@ -35,12 +35,12 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function apply($input, $index, IntermediateContext $context) |
| 37 | 37 | { |
| 38 | - if (! $context->memory->contains($this)) { |
|
| 38 | + if ( ! $context->memory->contains($this)) { |
|
| 39 | 39 | $context->memory->offsetSet($this, 0); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | $count = $context->memory->offsetGet($this); |
| 43 | - $context->memory->offsetSet($this, $count+1); |
|
| 43 | + $context->memory->offsetSet($this, $count + 1); |
|
| 44 | 44 | |
| 45 | 45 | $takeIt = $count < $this->limit; |
| 46 | 46 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function __construct($default = 0.0) |
| 22 | 22 | { |
| 23 | - $this->default = (float) $default; |
|
| 23 | + $this->default = (float) $default; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |
@@ -41,6 +41,6 @@ |
||
| 41 | 41 | return $this->default; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - return $data[mt_rand(0, $count - 1)]; |
|
| 44 | + return $data[ mt_rand(0, $count - 1) ]; |
|
| 45 | 45 | } |
| 46 | 46 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public static function isValidDateString($str) |
| 37 | 37 | { |
| 38 | - if (! is_string($str)) { |
|
| 38 | + if ( ! is_string($str)) { |
|
| 39 | 39 | return false; |
| 40 | 40 | } |
| 41 | 41 | |