@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * and composes that instead, to ensure we have access to the various |
| 43 | 43 | * iterator capabilities. |
| 44 | 44 | */ |
| 45 | - public function __construct(Traversable $iterator, Closure $stringify=null) |
|
| 45 | + public function __construct(Traversable $iterator, Closure $stringify = null) |
|
| 46 | 46 | { |
| 47 | 47 | if ($iterator instanceof IteratorAggregate) { |
| 48 | 48 | $iterator = $iterator->getIterator(); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | return ($this->position === count($this->iterator)); |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | - return (! $this->iterator->valid()); |
|
| 113 | + return (!$this->iterator->valid()); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | public function seek($offset, $whence = SEEK_SET) |
| 134 | 134 | { |
| 135 | - if (! is_int($offset) && ! is_numeric($offset)) { |
|
| 135 | + if (!is_int($offset) && !is_numeric($offset)) { |
|
| 136 | 136 | return false; |
| 137 | 137 | } |
| 138 | 138 | |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | $key = $this->iterator->key(); |
| 145 | - if (! is_int($key) && ! is_numeric($key)) { |
|
| 145 | + if (!is_int($key) && !is_numeric($key)) { |
|
| 146 | 146 | $key = 0; |
| 147 | 147 | $this->iterator->rewind(); |
| 148 | 148 | } |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | $index = 0; |
| 213 | 213 | $contents = ''; |
| 214 | 214 | while ($this->iterator->valid() && $index < $length) { |
| 215 | - if($this->stringify !== null) { |
|
| 215 | + if ($this->stringify !== null) { |
|
| 216 | 216 | $contents .= $this->stringify->call($this, $this->iterator->current()); |
| 217 | 217 | } else { |
| 218 | 218 | $contents .= $this->iterator->current(); |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | { |
| 234 | 234 | $contents = ''; |
| 235 | 235 | while ($this->iterator->valid()) { |
| 236 | - if($this->stringify !== null) { |
|
| 236 | + if ($this->stringify !== null) { |
|
| 237 | 237 | $contents .= $this->stringify->call($this, $this->iterator->current()); |
| 238 | 238 | } else { |
| 239 | 239 | $contents .= $this->iterator->current(); |
@@ -253,6 +253,6 @@ discard block |
||
| 253 | 253 | */ |
| 254 | 254 | public function getMetadata($key = null) |
| 255 | 255 | { |
| 256 | - return ($key === null) ? [] : null; |
|
| 256 | + return ($key === null) ? [ ] : null; |
|
| 257 | 257 | } |
| 258 | 258 | } |