1 | <?php |
||
16 | class ImmutableContainer extends Container |
||
17 | { |
||
18 | /** |
||
19 | * @param array $params |
||
20 | */ |
||
21 | public function __construct(array $params = []) |
||
29 | |||
30 | /** |
||
31 | * @param string $key |
||
32 | * @param mixed $value |
||
33 | * |
||
34 | * @return ContainerInterface |
||
35 | */ |
||
36 | public function set($key, $value) |
||
43 | |||
44 | /** |
||
45 | * @param string $key |
||
46 | * |
||
47 | * @return ContainerInterface |
||
48 | */ |
||
49 | public function remove($key) |
||
60 | |||
61 | /** |
||
62 | * @param string $key |
||
63 | * @param mixed $value |
||
64 | * |
||
65 | * @return ContainerInterface |
||
66 | */ |
||
67 | protected function setParameter($key, $value) |
||
71 | |||
72 | /** |
||
73 | * @param string $key |
||
74 | * |
||
75 | * @return ContainerInterface |
||
76 | */ |
||
77 | protected function removeParameter($key) |
||
81 | } |
||
82 |
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.