Conditions | 4 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | private static function extractDomainsByKey(array $inventory, string $key): array |
||
19 | { |
||
20 | if (!array_key_exists($key, $inventory) |
||
21 | || !is_array($inventory[$key]) |
||
22 | ) return []; |
||
23 | |||
24 | $configs = $inventory[$key]; |
||
25 | |||
26 | $domains = []; |
||
27 | |||
28 | foreach ($configs as $config) { |
||
29 | $domains[] = $config[$key]; |
||
30 | } |
||
31 | |||
32 | return $domains; |
||
33 | } |
||
34 | } |