Total Complexity | 5 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | abstract class WebserverUtil |
||
9 | { |
||
10 | public static function extractDocumentRoots(array $inventory): array |
||
11 | { |
||
12 | $documentRoots = self::extractDocumentRootByKey($inventory, ApacheServerNameCollector::COLLECTION_IDENTIFIER); |
||
13 | $documentRoots = array_merge($documentRoots, self::extractDocumentRootByKey($inventory, NginxServerNameCollector::COLLECTION_IDENTIFIER)); |
||
14 | |||
15 | return array_unique($documentRoots); |
||
16 | } |
||
17 | |||
18 | private static function extractDocumentRootByKey(array $inventory, string $key): array |
||
33 | } |
||
34 | } |