| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 5.1971 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 51 | 28 | protected function handleFieldsGroups($fields) { |
|
| 52 | 28 | foreach ($this->fieldsGroups as $group => $groupFields) { |
|
| 53 | $fields[$group] = Arr::where(Arr::only($fields, $groupFields), function ($value, $key) { |
||
| 54 | return !empty($value); |
||
| 55 | }); |
||
| 56 | |||
| 57 | if (empty($fields[$group])) { |
||
| 58 | $fields[$group] = null; |
||
| 59 | } |
||
| 60 | |||
| 61 | Arr::forget($fields, $groupFields); |
||
| 62 | } |
||
| 63 | |||
| 64 | 28 | return $fields; |
|
| 65 | } |
||
| 67 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.