1 | <?php |
||
16 | class ParameterBag extends Data |
||
17 | { |
||
18 | /** |
||
19 | * Sets array of parameters |
||
20 | * |
||
21 | * @param $parameters |
||
22 | */ |
||
23 | public function setParameters($parameters) |
||
27 | |||
28 | /** |
||
29 | * Adds array of parameters |
||
30 | * |
||
31 | * @param array $parameters |
||
32 | */ |
||
33 | public function addParameters(array $parameters) |
||
37 | |||
38 | /** |
||
39 | * Sets parameter with given name and value |
||
40 | * |
||
41 | * @param int|string $name |
||
42 | * @param mixed $value |
||
43 | */ |
||
44 | public function setParameter($name, $value) |
||
48 | |||
49 | /** |
||
50 | * Gets the parameter by its name |
||
51 | * |
||
52 | * @param string $name |
||
53 | * @param mixed $default |
||
54 | * @return mixed |
||
55 | */ |
||
56 | public function getParameter($name, $default = null) |
||
63 | |||
64 | /** |
||
65 | * Gets all parameters |
||
66 | * @return array |
||
67 | */ |
||
68 | public function toArray() |
||
72 | } |
||
73 |
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.