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