| Conditions | 5 |
| Paths | 4 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function execute(): void |
||
| 37 | { |
||
| 38 | foreach ($this->staticFiles as $staticFile) { |
||
| 39 | $staticFile = trim($staticFile, '/'); |
||
| 40 | |||
| 41 | $publicPath = File::path("{$this->publicDirectory}/{$staticFile}"); |
||
| 42 | |||
| 43 | if ($this->cacheStaticFiles && $this->fs->exists($publicPath)) { |
||
| 44 | continue; |
||
| 45 | } |
||
| 46 | |||
| 47 | $sourcePath = File::path($staticFile); |
||
| 48 | |||
| 49 | try { |
||
| 50 | $this->copyStaticFile($sourcePath, $publicPath); |
||
| 51 | } catch (FileNotFoundException $exception) { |
||
| 52 | throw FileNotFound::staticFile($sourcePath); |
||
| 53 | } |
||
| 54 | } |
||
| 55 | } |
||
| 56 | |||
| 70 |