Conditions | 3 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
29 | 4 | public function findFiles(string $path, ?array $validExtensions = null, bool $recursive = true): array |
|
30 | { |
||
31 | 4 | $finder = $this->getFinder($path, $validExtensions); |
|
32 | |||
33 | 4 | if (!$recursive) { |
|
34 | 2 | $finder->depth('== 0'); |
|
35 | } |
||
36 | |||
37 | 4 | $videos = []; |
|
38 | |||
39 | /** @var \SplFileInfo $file */ |
||
40 | 4 | foreach ($finder as $file) { |
|
41 | 4 | $videos[] = $file; |
|
42 | } |
||
43 | |||
44 | 4 | return $videos; |
|
45 | } |
||
47 |