| Total Complexity | 7 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 8 | class DotChainOperator |
||
| 9 | { |
||
| 10 | 14 | public static function update($arr, $key, $val) |
|
| 22 | } |
||
| 23 | |||
| 24 | 14 | private static function _v(&$arr, array $keys, Closure $filter, $i = 0) |
|
| 25 | { |
||
| 26 | 14 | if (empty($keys[$i])) { |
|
| 27 | 14 | $arr = $filter($arr); |
|
| 28 | 14 | return; |
|
| 29 | } |
||
| 30 | |||
| 31 | 14 | $currKey = $keys[$i]; |
|
| 32 | |||
| 33 | 14 | if ($currKey === '*') { |
|
| 34 | 10 | self::_h($arr, $keys, $filter, $i); |
|
| 35 | } else { |
||
| 36 | 14 | self::_v($arr[$currKey], $keys, $filter, $i + 1); |
|
| 37 | } |
||
| 38 | 14 | } |
|
| 39 | |||
| 40 | 10 | private static function _h(&$arr, array $keys, Closure $filter, $i) |
|
| 44 | } |
||
| 45 | } |
||
| 46 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.