Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function prime(array $paths): int |
||
30 | { |
||
31 | $cached = 0; |
||
32 | |||
33 | foreach ($this->normalizePaths($paths) as $path) { |
||
34 | $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path)); |
||
35 | |||
36 | foreach ($this->filter($iterator) as $file) { |
||
37 | $cached += (int) \opcache_compile_file($file->getRealPath()); |
||
38 | } |
||
39 | } |
||
40 | |||
41 | return $cached; |
||
42 | } |
||
73 |