Conditions | 5 |
Paths | 4 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
18 | 3 | public function __construct(\Iterator $iterable) |
|
19 | { |
||
20 | 3 | $data = []; |
|
21 | 3 | foreach ($iterable as $subIterable) { |
|
22 | 2 | if (is_array($subIterable) || $subIterable instanceof \Traversable) { |
|
23 | 2 | foreach ($subIterable as $key => $value) { |
|
24 | 2 | $data [] = [$key, $value]; |
|
25 | } |
||
26 | } |
||
27 | } |
||
28 | 3 | parent::__construct(new \ArrayIterator($data)); |
|
29 | 3 | } |
|
30 | |||
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 theSon
calls the wrong method in the parent class.