1 | <?php |
||
9 | class ArrayConfig extends \ArrayObject |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * @param array|\ArrayObject $data |
||
14 | */ |
||
15 | 23 | public function __construct($data) |
|
22 | |||
23 | /** |
||
24 | * restricts the config to a specific visibility. |
||
25 | * |
||
26 | * @param string $restriction |
||
27 | * @param string $separator |
||
28 | * @return RestrictedConfig |
||
29 | */ |
||
30 | 2 | public function restrict($restriction, $separator = '.') |
|
34 | |||
35 | /** |
||
36 | * @param mixed $key |
||
37 | * @param mixed $value |
||
38 | */ |
||
39 | 6 | public function offsetSet($key, $value) |
|
44 | |||
45 | /** |
||
46 | * @param array|\ArrayObject $data |
||
47 | * @return array |
||
48 | */ |
||
49 | 23 | private function buildConfig($data) |
|
53 | |||
54 | /** |
||
55 | * @param array|\ArrayObject $data |
||
56 | * @return array |
||
57 | */ |
||
58 | 23 | private function formatKeys($data) |
|
68 | |||
69 | /** |
||
70 | * @param $data |
||
71 | * @param array $replacements |
||
72 | * @return mixed |
||
73 | */ |
||
74 | 23 | private function replace($data, array $replacements) |
|
85 | } |
||
86 |
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.