Skip to content

Commit

Permalink
Include suggestions from PR
Browse files Browse the repository at this point in the history
Co-authored-by: mattstauffer <[email protected]>
  • Loading branch information
benholmen and mattstauffer committed Mar 31, 2021
1 parent 1701deb commit b47db5b
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions app/Exceptions/DockerNotAvailableException.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,19 @@ public function render($request = null): void

if (in_array(PHP_OS_FAMILY, ['Darwin', 'Linux', 'Windows'])) {
$osSpecificHelp = 'helpFor' . ucfirst(PHP_OS_FAMILY);
$this->$osSpecificHelp();
$this->$osSpecificHelp($console);
}
}

protected function helpForDarwin()
protected function helpForDarwin($console)
{
$console = app('console');

$console->line('Open Docker for Mac or run:');
$console->line(' open --background -a Docker');
$console->line('to start the Docker service.');
}

protected function helpForLinux()
protected function helpForLinux($console)
{
$console = app('console');
$environment = app(Environment::class);
$shell = app(Shell::class);

Expand All @@ -54,10 +51,8 @@ protected function helpForLinux()
}
}

protected function helpForWindows()
protected function helpForWindows($console)
{
$console = app('console');

$console->line('Open Docker for Windows to start the Docker service.');
}
}

0 comments on commit b47db5b

Please sign in to comment.