Conditions | 5 |
Paths | 5 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | * @return array<string, int> |
||
22 | */ |
||
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 | } |
||
43 |