| Conditions | 5 |
| Paths | 5 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function prime(array $paths): int |
||
| 30 | { |
||
| 31 | $cached = 0; |
||
| 32 | |||
| 33 | foreach ($paths as $path) { |
||
| 34 | if (false === $path = \realpath($path)) { |
||
| 35 | continue; |
||
| 36 | } |
||
| 37 | |||
| 38 | $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path)); |
||
| 39 | |||
| 40 | foreach ($this->filter($iterator) as $file) { |
||
| 41 | \opcache_compile_file($file->getRealPath()) && $cached++; |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | return $cached; |
||
| 46 | } |
||
| 65 |