| Conditions | 4 |
| Paths | 4 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | public function addRules(array $rules, bool $reset = false) : void |
||
|
|
|||
| 44 | { |
||
| 45 | //if ($reset) { |
||
| 46 | $this->reset(); |
||
| 47 | //} |
||
| 48 | |||
| 49 | foreach ($rules as $rule => $pattern) { |
||
| 50 | if (! is_array($pattern)) { |
||
| 51 | continue; |
||
| 52 | } |
||
| 53 | |||
| 54 | $this->rules[$rule] = ($rule === 'uninflected') |
||
| 55 | ? array_merge($pattern, $this->rules[$rule]) |
||
| 56 | : $pattern + $this->rules[$rule]; |
||
| 57 | |||
| 58 | unset($rules[$rule]); |
||
| 59 | } |
||
| 60 | |||
| 61 | $this->rules['rules'] = $rules + $this->rules['rules']; |
||
| 62 | $this->cache = []; |
||
| 63 | } |
||
| 65 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.