diff --git a/src/UpdateCommand.php b/src/UpdateCommand.php index fdd9aab..298438f 100644 --- a/src/UpdateCommand.php +++ b/src/UpdateCommand.php @@ -94,7 +94,7 @@ protected function extract(string $version, string $archive): string $binary = null; - $zip = new ZipArchive(); + $zip = new ZipArchive; $zip->open($archive); diff --git a/src/functions.php b/src/functions.php index f127795..e420fa1 100644 --- a/src/functions.php +++ b/src/functions.php @@ -29,7 +29,7 @@ function rename_chromedriver_binary(string $binary, string $operatingSystem): st */ function download(string $url, string $destination, $proxy = null, bool $verifySsl = true): void { - $client = new Client(); + $client = new Client; $resource = Utils::tryFopen($destination, 'w'); @@ -54,7 +54,7 @@ function download(string $url, string $destination, $proxy = null, bool $verifyS */ function fetch(string $url, $proxy = null, bool $verifySsl = true): string { - $client = new Client(); + $client = new Client; $response = $client->get($url, array_merge([ 'verify' => $verifySsl, diff --git a/tests/UpdateCommandTest.php b/tests/UpdateCommandTest.php index 5c6a8a9..f69f576 100644 --- a/tests/UpdateCommandTest.php +++ b/tests/UpdateCommandTest.php @@ -14,7 +14,7 @@ class UpdateCommandTest extends TestCase public function it_can_update_to_specific_version() { $app = new Application('Dusk Updater', '1.0.0'); - $app->add(new UpdateCommand()); + $app->add(new UpdateCommand); $command = $app->find('update'); @@ -38,7 +38,7 @@ public function it_can_update_to_specific_version() public function it_can_update_to_major_version() { $app = new Application('Dusk Updater', '1.0.0'); - $app->add(new UpdateCommand()); + $app->add(new UpdateCommand); $command = $app->find('update'); @@ -59,7 +59,7 @@ public function it_cant_update_to_invalid_version() $this->expectExceptionMessage('Unable to retrieve ChromeDriver [74.0.3729].'); $app = new Application('Dusk Updater', '1.0.0'); - $app->add(new UpdateCommand()); + $app->add(new UpdateCommand); $command = $app->find('update');