Conditions | 8 |
Paths | 5 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function process(Builder $builder, $results) |
||
|
|||
21 | { |
||
22 | if (!isset($results) || is_string($results) || isset($results['Fouttype'])) { |
||
23 | return []; |
||
24 | } |
||
25 | |||
26 | if (array_has($results, 'Items') || array_has($results, 'items')) { |
||
27 | return reset($results); |
||
28 | } |
||
29 | |||
30 | foreach ($results as $result) { |
||
31 | if (!is_array($result)) { |
||
32 | return [$results]; |
||
33 | } |
||
34 | } |
||
35 | |||
36 | return $results; |
||
37 | } |
||
38 | } |
||
39 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.