Conditions | 4 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | 10 | private static function prepareQueriesConfig(array $configList): array |
|
30 | { |
||
31 | 10 | $result = []; |
|
32 | |||
33 | 10 | foreach ($configList as $item) { |
|
34 | 10 | if (!isset($item['query']) || !is_string($item['query'])) { |
|
35 | 1 | throw new \InvalidArgumentException('Not found query for DB cleaner config'); |
|
36 | } |
||
37 | |||
38 | 9 | $result[] = new QueryConfig( |
|
39 | 9 | $item['query'], |
|
40 | 9 | $item['parameters'] ?? [], |
|
41 | 9 | $item['types'] ?? [] |
|
42 | ); |
||
43 | } |
||
44 | |||
45 | 9 | return $result; |
|
46 | } |
||
48 |