Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | public function handle(Finder $finder, FilesystemManager $filesystemManager, Repository $config) |
||
36 | { |
||
37 | $files = $finder->getFiles(); |
||
38 | |||
39 | foreach ($files as $file) { |
||
40 | $bool = $filesystemManager |
||
41 | ->disk($config->get('asset-cdn.filesystem.disk')) |
||
42 | ->putFileAs( |
||
43 | $file->getRelativePath(), |
||
44 | new File($file->getPathname()), |
||
45 | $file->getFilename(), |
||
46 | $config->get('asset-cdn.filesystem.options') |
||
47 | ); |
||
48 | |||
49 | if (! $bool) { |
||
50 | $this->error("Problem uploading: {$file->getRelativePathname()}"); |
||
51 | } else { |
||
52 | $this->info("Successfully uploaded: {$file->getRelativePathname()}"); |
||
53 | } |
||
57 |