1 | <?php |
||
10 | class Config implements ConfigContract |
||
11 | { |
||
12 | /** @var array */ |
||
13 | protected $items; |
||
14 | |||
15 | /** @var \Wandu\Config\Contracts\Loader[] */ |
||
16 | protected $loaders = []; |
||
17 | |||
18 | /** |
||
19 | * @param array $items |
||
20 | */ |
||
21 | 21 | public function __construct(array $items = []) |
|
25 | |||
26 | /** |
||
27 | * @param \Wandu\Config\Contracts\Loader $loader |
||
28 | */ |
||
29 | 2 | public function pushLoader(Loader $loader) |
|
33 | |||
34 | /** |
||
35 | * @param string $path |
||
36 | */ |
||
37 | 2 | public function load(string $path) |
|
47 | |||
48 | /** |
||
49 | * @param array $appender |
||
50 | */ |
||
51 | 4 | public function merge(array $appender) |
|
55 | |||
56 | /** |
||
57 | * @param mixed $origin |
||
58 | * @param mixed $appender |
||
59 | * @return mixed |
||
60 | */ |
||
61 | 4 | private function recursiveMerge($origin, $appender) |
|
78 | |||
79 | /** |
||
80 | * {@inheritdoc} |
||
81 | */ |
||
82 | 4 | public function toArray(): array |
|
86 | |||
87 | /** |
||
88 | * {@inheritdoc} |
||
89 | */ |
||
90 | 1 | public function has($name): bool |
|
106 | |||
107 | /** |
||
108 | * {@inheritdoc} |
||
109 | */ |
||
110 | 11 | public function get($name, $default = null) |
|
126 | |||
127 | /** |
||
128 | * {@inheritdoc} |
||
129 | */ |
||
130 | 1 | public function subset($name): ConfigContract |
|
138 | |||
139 | /** |
||
140 | * {@inheritdoc} |
||
141 | */ |
||
142 | public function offsetExists($offset) |
||
146 | |||
147 | /** |
||
148 | * {@inheritdoc} |
||
149 | */ |
||
150 | 3 | public function offsetGet($offset) |
|
158 | |||
159 | /** |
||
160 | * {@inheritdoc} |
||
161 | */ |
||
162 | 1 | public function offsetSet($offset, $value) |
|
166 | |||
167 | /** |
||
168 | * {@inheritdoc} |
||
169 | */ |
||
170 | 1 | public function offsetUnset($offset) |
|
174 | } |
||
175 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.