Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Apr 29, 2019
1 parent 899fa16 commit 60339a5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions src/Console/ChromeDriverCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ class ChromeDriverCommand extends Command
public function handle()
{
$version = $this->version();

$all = $this->option('all');

$currentOS = OperatingSystem::id();

foreach ($this->slugs as $os => $slug) {
Expand Down Expand Up @@ -145,9 +147,9 @@ protected function version()
$version = $this->latestChromeVersion();
}

$url = sprintf($this->versionUrl, $version);

return trim(file_get_contents($url));
return trim(file_get_contents(
sprintf($this->versionUrl, $version)
));
}

/**
Expand All @@ -173,10 +175,12 @@ protected function latestChromeVersion()
*/
protected function download($version, $slug)
{
$archive = $this->directory.'chromedriver.zip';
$url = sprintf($this->downloadUrl, $version, $slug);

file_put_contents($archive, fopen($url, 'r'));
file_put_contents(
$archive = $this->directory.'chromedriver.zip',
fopen($url, 'r')
);

return $archive;
}
Expand All @@ -190,7 +194,9 @@ protected function download($version, $slug)
protected function extract($archive)
{
$zip = new ZipArchive;

$zip->open($archive);

$zip->extractTo($this->directory);

$binary = $zip->getNameIndex(0);
Expand Down
2 changes: 1 addition & 1 deletion src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function handle()

$this->info('Dusk scaffolding installed successfully.');

$this->info('Installing ChromeDriver binaries...');
$this->comment('Downloading ChromeDriver binaries...');

$this->call('dusk:chrome-driver', ['--all' => true]);
}
Expand Down

0 comments on commit 60339a5

Please sign in to comment.