Conditions | 6 |
Paths | 6 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public static function generateTypes(array $parameters): array |
||
24 | { |
||
25 | $types = []; |
||
26 | foreach ($parameters as $key => $value) { |
||
27 | if (is_array($value)) { |
||
28 | foreach ($value as $val) { |
||
29 | if (!is_int($val)) { |
||
30 | $types[$key] = Connection::PARAM_STR_ARRAY; |
||
31 | continue 2; |
||
32 | } |
||
33 | } |
||
34 | $types[$key] = Connection::PARAM_INT_ARRAY; |
||
35 | } elseif (is_int($value)) { |
||
36 | $types[$key] = ParameterType::INTEGER; |
||
37 | } |
||
38 | } |
||
39 | |||
40 | return $types; |
||
41 | } |
||
43 |