1 | <?php |
||
8 | class Set extends AbstractCollection |
||
9 | { |
||
10 | /** |
||
11 | * @param array ...$values |
||
12 | */ |
||
13 | public function __construct(...$values) |
||
17 | |||
18 | /** |
||
19 | * @param mixed $value |
||
20 | */ |
||
21 | public function add($value) |
||
25 | |||
26 | /** |
||
27 | * @inheritdoc |
||
28 | */ |
||
29 | public function set($key, $value) |
||
33 | |||
34 | /** |
||
35 | * @inheritdoc |
||
36 | */ |
||
37 | public function contains($value) |
||
41 | |||
42 | /** |
||
43 | * @inheritdoc |
||
44 | */ |
||
45 | public function remove($value) |
||
49 | } |
||
50 |
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.