Conditions | 5 |
Paths | 4 |
Total Lines | 29 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
38 | public function load() |
||
39 | { |
||
40 | $this->config = []; |
||
41 | |||
42 | foreach ($this->paths as $path) { |
||
43 | if (file_exists($path)) { |
||
44 | $this->logger->debug('Loading config file: ' . $path); |
||
45 | |||
46 | $config = include $path; |
||
47 | |||
48 | foreach ($config as $event => $prioritizedActions) { |
||
49 | // merge config |
||
50 | $this->config[$event] = array_merge( |
||
51 | isset($this->config[$event]) ? $this->config[$event] : [], |
||
52 | $prioritizedActions |
||
53 | ); |
||
54 | |||
55 | // reorder actions |
||
56 | ksort($this->config[$event]); |
||
57 | } |
||
58 | } else { |
||
59 | $this->logger->debug('Config file does not exist: ' . $path); |
||
60 | } |
||
61 | } |
||
62 | |||
63 | $this->logger->debug('Configuration loaded.'); |
||
64 | |||
65 | return $this; |
||
66 | } |
||
67 | |||
111 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.