| Conditions | 3 |
| Paths | 4 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | 3 | public function __construct(\Traversable $iterator, iterable $indexes) |
|
| 11 | { |
||
| 12 | 3 | if ($indexes instanceof \Traversable) { |
|
| 13 | 3 | $indexes = iterator_to_array(new \IteratorIterator($indexes), false); |
|
| 14 | 3 | } |
|
| 15 | sort($indexes); |
||
| 16 | 3 | $this->indexingIterator = new \ArrayIterator($indexes); |
|
| 17 | |||
| 18 | 3 | $iterator = $iterator instanceof \Countable ? $iterator : new CountableIterator($iterator, CountableIterator::CACHE_COUNT); |
|
| 19 | 3 | parent::__construct($iterator); |
|
| 20 | 3 | } |
|
| 21 | 3 | ||
| 49 |
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.