| Conditions | 2 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | 2 | public function all(): OutputFileCollection |
|
| 25 | { |
||
| 26 | /** @var Collection|array $paths */ |
||
| 27 | 2 | $paths = $this->jigsaw->getOutputPaths(); |
|
| 28 | |||
| 29 | $paths = array_map(function (string $path) { |
||
| 30 | 2 | return $this->jigsaw->getDestinationPath() . $path . '/index.html'; |
|
| 31 | 2 | }, is_array($paths) ? $paths : $paths->toArray()); |
|
|
|
|||
| 32 | |||
| 33 | $paths = array_filter($paths, function (string $path) { |
||
| 34 | 2 | return $this->filesystem->exists($path); |
|
| 35 | 2 | }); |
|
| 36 | |||
| 37 | return new OutputFileCollection(array_map(function (string $path) { |
||
| 38 | 2 | return new OutputFile($path, $this->filesystem->get($path)); |
|
| 39 | 2 | }, $paths)); |
|
| 40 | } |
||
| 42 |