Conditions | 3 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
13 | /** |
||
14 | * @param string $fromDirectory |
||
15 | * @return String[] |
||
16 | */ |
||
17 | public function discoverFiles(string $fromDirectory): array |
||
18 | { |
||
19 | $currentDirectory = $fromDirectory; |
||
20 | do { |
||
21 | $globResult = glob($currentDirectory . '/' . self::VALID_FILE_NAME_GLOB); |
||
22 | |||
23 | if (count($globResult)) { |
||
24 | return [ $this->preferNonDistributionFiles($globResult) ]; |
||
25 | } |
||
26 | |||
27 | $currentDirectory = dirname($currentDirectory); |
||
28 | } while ($currentDirectory !== '/'); |
||
48 |