@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | * |
| 18 | 18 | * @link http://php.net/manual/class.arrayaccess.php |
| 19 | 19 | */ |
| 20 | -trait ArrayAccessTrait{ |
|
| 20 | +trait ArrayAccessTrait { |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * @var array |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * @link http://php.net/manual/arrayaccess.offsetget.php |
| 42 | 42 | * @inheritdoc |
| 43 | 43 | */ |
| 44 | - public function offsetGet($offset){ |
|
| 44 | + public function offsetGet($offset) { |
|
| 45 | 45 | return $this->array[$offset] ?? null; |
| 46 | 46 | } |
| 47 | 47 | |
@@ -49,12 +49,12 @@ discard block |
||
| 49 | 49 | * @link http://php.net/manual/arrayaccess.offsetset.php |
| 50 | 50 | * @inheritdoc |
| 51 | 51 | */ |
| 52 | - public function offsetSet($offset, $value){ |
|
| 52 | + public function offsetSet($offset, $value) { |
|
| 53 | 53 | |
| 54 | - if(is_null($offset)){ |
|
| 54 | + if (is_null($offset)) { |
|
| 55 | 55 | $this->array[] = $value; |
| 56 | 56 | } |
| 57 | - else{ |
|
| 57 | + else { |
|
| 58 | 58 | $this->array[$offset] = $value; |
| 59 | 59 | } |
| 60 | 60 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | * @link http://php.net/manual/arrayaccess.offsetunset.php |
| 65 | 65 | * @inheritdoc |
| 66 | 66 | */ |
| 67 | - public function offsetUnset($offset){ |
|
| 67 | + public function offsetUnset($offset) { |
|
| 68 | 68 | unset($this->array[$offset]); |
| 69 | 69 | } |
| 70 | 70 | |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | * |
| 19 | 19 | * @link http://php.net/manual/class.traversable.php |
| 20 | 20 | */ |
| 21 | -trait IteratorTrait{ |
|
| 21 | +trait IteratorTrait { |
|
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * @var array |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * @link http://php.net/manual/iterator.current.php |
| 35 | 35 | * @inheritdoc |
| 36 | 36 | */ |
| 37 | - public function current(){ |
|
| 37 | + public function current() { |
|
| 38 | 38 | return $this->array[$this->offset] ?? null; |
| 39 | 39 | } |
| 40 | 40 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * @link http://php.net/manual/iterator.next.php |
| 43 | 43 | * @inheritdoc |
| 44 | 44 | */ |
| 45 | - public function next(){ |
|
| 45 | + public function next() { |
|
| 46 | 46 | $this->offset++; |
| 47 | 47 | } |
| 48 | 48 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * @link http://php.net/manual/iterator.key.php |
| 51 | 51 | * @inheritdoc |
| 52 | 52 | */ |
| 53 | - public function key(){ |
|
| 53 | + public function key() { |
|
| 54 | 54 | return $this->offset; |
| 55 | 55 | } |
| 56 | 56 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | * @link http://php.net/manual/iterator.rewind.php |
| 67 | 67 | * @inheritdoc |
| 68 | 68 | */ |
| 69 | - public function rewind(){ |
|
| 69 | + public function rewind() { |
|
| 70 | 70 | $this->offset = 0; |
| 71 | 71 | } |
| 72 | 72 | |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | * |
| 18 | 18 | * @link http://php.net/manual/class.serializable.php |
| 19 | 19 | */ |
| 20 | -trait SerializableTrait{ |
|
| 20 | +trait SerializableTrait { |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * @var array |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | * @link http://php.net/manual/serializable.unserialize.php |
| 37 | 37 | * @inheritdoc |
| 38 | 38 | */ |
| 39 | - public function unserialize($serialized){ |
|
| 39 | + public function unserialize($serialized) { |
|
| 40 | 40 | $this->array = unserialize($serialized); |
| 41 | 41 | } |
| 42 | 42 | |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | * |
| 18 | 18 | * @link http://php.net/manual/class.countable.php |
| 19 | 19 | */ |
| 20 | -trait CountableTrait{ |
|
| 20 | +trait CountableTrait { |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * @var array |
@@ -21,19 +21,19 @@ |
||
| 21 | 21 | * |
| 22 | 22 | * @link http://php.net/manual/class.seekableiterator.php |
| 23 | 23 | */ |
| 24 | -trait SeekableIteratorTrait{ |
|
| 24 | +trait SeekableIteratorTrait { |
|
| 25 | 25 | use IteratorTrait; |
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * @link http://php.net/manual/seekableiterator.seek.php |
| 29 | 29 | * @inheritdoc |
| 30 | 30 | */ |
| 31 | - public function seek($pos){ |
|
| 31 | + public function seek($pos) { |
|
| 32 | 32 | $this->rewind(); |
| 33 | 33 | |
| 34 | - for( ; $this->offset < $pos; ){ |
|
| 34 | + for (; $this->offset < $pos;) { |
|
| 35 | 35 | |
| 36 | - if(!next($this->array)) { |
|
| 36 | + if (!next($this->array)) { |
|
| 37 | 37 | throw new OutOfBoundsException('invalid seek position: '.$pos); |
| 38 | 38 | } |
| 39 | 39 | |