| Conditions | 7 |
| Paths | 7 |
| Total Lines | 20 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 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 | } elseif (is_bool($value)) { |
||
| 38 | $types[$key] = ParameterType::BOOLEAN; |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 42 | return $types; |
||
| 43 | } |
||
| 45 |