| Conditions | 5 |
| Paths | 8 |
| Total Lines | 23 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | public function merge() |
||
| 25 | { |
||
| 26 | $arrays = $this->arrays; |
||
| 27 | $keys = []; |
||
| 28 | |||
| 29 | foreach ($arrays as $array) { |
||
| 30 | $keys = array_merge($keys, array_keys($array)); |
||
| 31 | } |
||
| 32 | |||
| 33 | $keys = array_unique($keys); |
||
| 34 | |||
| 35 | $merged = array_fill_keys($keys, null); |
||
| 36 | |||
| 37 | foreach ($arrays as $array) { |
||
| 38 | foreach ($keys as $key) { |
||
| 39 | if (array_key_exists($key, $array)) { |
||
| 40 | $merged[$key] = $this->mergeValues($merged[$key], $array[$key]); |
||
| 41 | } |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | return $merged; |
||
| 46 | } |
||
| 47 | |||
| 66 | } |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.