| 1 | <?php |
||
| 13 | class LazyAppendIterator extends \AppendIterator |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var \Iterator |
||
| 17 | */ |
||
| 18 | private $iterators; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param \Iterator $iterators |
||
| 22 | */ |
||
| 23 | 3 | public function __construct(\Iterator $iterators) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritdoc} |
||
| 34 | */ |
||
| 35 | 2 | public function current() |
|
| 41 | |||
| 42 | /** |
||
| 43 | * {@inheritdoc} |
||
| 44 | */ |
||
| 45 | 2 | public function key() |
|
| 51 | |||
| 52 | /** |
||
| 53 | * {@inheritdoc} |
||
| 54 | */ |
||
| 55 | 2 | public function next() |
|
| 61 | |||
| 62 | /** |
||
| 63 | * {@inheritdoc} |
||
| 64 | */ |
||
| 65 | 2 | public function rewind() |
|
| 71 | |||
| 72 | /** |
||
| 73 | * {@inheritdoc} |
||
| 74 | */ |
||
| 75 | 2 | public function valid() |
|
| 81 | |||
| 82 | /** |
||
| 83 | * Lazily append the next iterator to the chain |
||
| 84 | */ |
||
| 85 | 2 | private function lazyAppend() |
|
| 92 | } |
||
| 93 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()method in theSoncalls the wrong method in the parent class.