| Conditions | 3 |
| Paths | 4 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function handle(): void |
||
| 20 | { |
||
| 21 | $this->newLine(); |
||
| 22 | |||
| 23 | $files = MediaFile::all(); |
||
| 24 | |||
| 25 | if (Config::getBool('hyde.load_app_styles_from_cdn', false)) { |
||
| 26 | $files->forget('app.css'); |
||
| 27 | } |
||
| 28 | |||
| 29 | if ($files->isEmpty()) { |
||
| 30 | $this->skip("No media files to transfer.\n"); |
||
| 31 | } |
||
| 32 | |||
| 33 | $this->withProgressBar($files, function (MediaFile $file): void { |
||
| 34 | $sitePath = $file->getOutputPath(); |
||
| 35 | $this->needsParentDirectory($sitePath); |
||
| 36 | Filesystem::putContents($sitePath, $file->getContents()); |
||
| 37 | }); |
||
| 38 | |||
| 39 | $this->newLine(); |
||
| 40 | } |
||
| 47 |