| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 4 | public function build(ImageRepository $imageSet) |
|
| 17 | { |
||
| 18 | 4 | file_put_contents( |
|
| 19 | 4 | config('porter.docker-compose-file'), |
|
| 20 | 4 | view("docker_compose.{$imageSet->getName()}.base")->with([ |
|
| 21 | 4 | 'home' => setting('home'), |
|
| 22 | 4 | 'host_machine_name' => setting('host_machine_name'), |
|
| 23 | 4 | 'activePhpVersions' => PhpVersion::active()->get(), |
|
| 24 | 4 | 'useMysql' => setting('use_mysql') == 'on', |
|
| 25 | 4 | 'useRedis' => setting('use_redis') == 'on', |
|
| 26 | 4 | 'useBrowser' => setting('use_browser') == 'on', |
|
| 27 | 4 | 'imageSet' => $imageSet->getName(), |
|
| 28 | 4 | 'imageSetPath' => $imageSet->getPath(), |
|
| 29 | 4 | 'libraryPath' => config('porter.library_path'), |
|
| 30 | 4 | ])->render() |
|
| 31 | ); |
||
| 42 |
If you suppress an error, we recommend checking for the error condition explicitly: