From fc1b23b52301da32c49e18e5541f582ec7ef2dfc Mon Sep 17 00:00:00 2001 From: driesvints Date: Fri, 2 Aug 2024 08:24:13 +0000 Subject: [PATCH] Fix code styling --- cli/Valet/Expose.php | 2 +- cli/Valet/Ngrok.php | 2 +- cli/Valet/Site.php | 2 +- cli/Valet/Valet.php | 2 +- cli/app.php | 4 ++-- cli/includes/helpers.php | 4 ++-- tests/Drivers/BasicValetDriverTest.php | 12 ++++++------ tests/Drivers/BasicWithPublicValetDriverTest.php | 16 ++++++++-------- tests/Drivers/BedrockValetDriverTest.php | 6 +++--- tests/Drivers/CakeValetDriverTest.php | 6 +++--- tests/Drivers/Concrete5ValetDriverTest.php | 6 +++--- tests/Drivers/ContaoValetDriverTest.php | 6 +++--- tests/Drivers/CraftValetDriverTest.php | 6 +++--- tests/Drivers/DrupalValetDriverTest.php | 6 +++--- tests/Drivers/JigsawValetDriverTest.php | 6 +++--- tests/Drivers/JoomlaValetDriverTest.php | 6 +++--- tests/Drivers/KatanaValetDriverTest.php | 6 +++--- tests/Drivers/KirbyValetDriverTest.php | 6 +++--- tests/Drivers/LaravelValetDriverTest.php | 6 +++--- tests/Drivers/Magento2ValetDriverTest.php | 6 +++--- tests/Drivers/NeosValetDriverTest.php | 6 +++--- tests/Drivers/SculpinValetDriverTest.php | 6 +++--- tests/Drivers/StatamicV1ValetDriverTest.php | 6 +++--- tests/Drivers/StatamicV2ValetDriverTest.php | 6 +++--- tests/Drivers/StatamicValetDriverTest.php | 10 +++++----- tests/Drivers/SymfonyValetDriverTest.php | 6 +++--- tests/Drivers/Typo3ValetDriverTest.php | 6 +++--- tests/Drivers/WordPressValetDriverTest.php | 6 +++--- 28 files changed, 84 insertions(+), 84 deletions(-) diff --git a/cli/Valet/Expose.php b/cli/Valet/Expose.php index 922cec5..cd00d5e 100644 --- a/cli/Valet/Expose.php +++ b/cli/Valet/Expose.php @@ -15,7 +15,7 @@ public function currentTunnelUrl(?string $domain = null): ?string try { $response = retry(20, function () use ($endpoint, $domain) { - $body = json_decode((new Client())->get($endpoint)->getBody()); + $body = json_decode((new Client)->get($endpoint)->getBody()); if (isset($body->tunnels) && count($body->tunnels) > 0) { if ($tunnelUrl = $this->findHttpTunnelUrl($body->tunnels, $domain)) { diff --git a/cli/Valet/Ngrok.php b/cli/Valet/Ngrok.php index 5214e66..58583d1 100644 --- a/cli/Valet/Ngrok.php +++ b/cli/Valet/Ngrok.php @@ -26,7 +26,7 @@ public function currentTunnelUrl(?string $domain = null): string foreach ($this->tunnelsEndpoints as $endpoint) { try { $response = retry(20, function () use ($endpoint, $domain) { - $body = json_decode((new Client())->get($endpoint)->getBody()); + $body = json_decode((new Client)->get($endpoint)->getBody()); if (isset($body->tunnels) && count($body->tunnels) > 0) { if ($tunnelUrl = $this->findHttpTunnelUrl($body->tunnels, $domain)) { diff --git a/cli/Valet/Site.php b/cli/Valet/Site.php index 4908256..d0108b1 100644 --- a/cli/Valet/Site.php +++ b/cli/Valet/Site.php @@ -478,7 +478,7 @@ public function secure(string $url, ?string $siteConf = null, int $certificateEx // Create the CA if it doesn't exist. // If the user cancels the trust operation, the old certificate will not be removed. $this->files->ensureDirExists($this->caPath(), user()); - $caExpireInDate = (new \DateTime())->diff(new \DateTime("+{$caExpireInYears} years")); + $caExpireInDate = (new \DateTime)->diff(new \DateTime("+{$caExpireInYears} years")); $this->createCa($caExpireInDate->format('%a')); $this->unsecure($url); diff --git a/cli/Valet/Valet.php b/cli/Valet/Valet.php index 38d7b87..5e30483 100644 --- a/cli/Valet/Valet.php +++ b/cli/Valet/Valet.php @@ -36,7 +36,7 @@ public function unlinkFromUsersBin(): void public function onLatestVersion(string $currentVersion): bool { $url = 'https://api.github.com/repos/laravel/valet/releases/latest'; - $response = json_decode((new Client())->get($url)->getBody()); + $response = json_decode((new Client)->get($url)->getBody()); return version_compare($currentVersion, trim($response->tag_name, 'v'), '>='); } diff --git a/cli/app.php b/cli/app.php index 7cfa223..4fcb1ba 100644 --- a/cli/app.php +++ b/cli/app.php @@ -37,7 +37,7 @@ $app = new Application('Laravel Valet', $version); -$app->setDispatcher($dispatcher = new EventDispatcher()); +$app->setDispatcher($dispatcher = new EventDispatcher); $dispatcher->addListener( ConsoleEvents::COMMAND, @@ -280,7 +280,7 @@ function (ConsoleCommandEvent $event) { * Display all of the currently secured sites. */ $app->command('secured [--expiring] [--days=]', function (OutputInterface $output, $expiring = null, $days = 60) { - $now = (new Datetime())->add(new DateInterval('P'.$days.'D')); + $now = (new Datetime)->add(new DateInterval('P'.$days.'D')); $sites = collect(Site::securedWithDates()) ->when($expiring, fn ($collection) => $collection->filter(fn ($row) => $row['exp'] < $now)) ->map(function ($row) { diff --git a/cli/includes/helpers.php b/cli/includes/helpers.php index f9d0ce8..6b7375c 100644 --- a/cli/includes/helpers.php +++ b/cli/includes/helpers.php @@ -25,7 +25,7 @@ define('VALET_LOOPBACK', '127.0.0.1'); define('VALET_SERVER_PATH', realpath(__DIR__.'/../../server.php')); -define('BREW_PREFIX', (new CommandLine())->runAsUser('printf $(brew --prefix)')); +define('BREW_PREFIX', (new CommandLine)->runAsUser('printf $(brew --prefix)')); define('ISOLATED_PHP_VERSION', 'ISOLATED_PHP_VERSION'); @@ -38,7 +38,7 @@ function writer(?OutputInterface $writer = null): OutputInterface|\NullWriter|nu if (! $writer) { if (! $container->bound('writer')) { - $container->instance('writer', new ConsoleOutput()); + $container->instance('writer', new ConsoleOutput); } return $container->make('writer'); diff --git a/tests/Drivers/BasicValetDriverTest.php b/tests/Drivers/BasicValetDriverTest.php index 49a4a96..94611c9 100644 --- a/tests/Drivers/BasicValetDriverTest.php +++ b/tests/Drivers/BasicValetDriverTest.php @@ -6,7 +6,7 @@ class BasicValetDriverTest extends BaseDriverTestCase { public function test_it_serves_anything() { - $driver = new BasicValetDriver(); + $driver = new BasicValetDriver; foreach ($this->projects() as $projectDir) { $this->assertTrue($driver->serves($projectDir, 'my-site', '/')); @@ -16,7 +16,7 @@ public function test_it_serves_anything() public function test_it_serves_php_files_from_root() { $projectPath = $this->projectDir('basic-no-public'); - $driver = new BasicValetDriver(); + $driver = new BasicValetDriver; $this->assertEquals( $projectPath.'/file-in-root.php', @@ -27,7 +27,7 @@ public function test_it_serves_php_files_from_root() public function test_it_serves_directory_with_index_php() { $projectPath = $this->projectDir('basic-no-public'); - $driver = new BasicValetDriver(); + $driver = new BasicValetDriver; $this->assertEquals( $projectPath.'/about/index.php', @@ -38,7 +38,7 @@ public function test_it_serves_directory_with_index_php() public function test_it_routes_to_index_if_404() { $projectPath = $this->projectDir('basic-no-public'); - $driver = new BasicValetDriver(); + $driver = new BasicValetDriver; $this->assertEquals( $projectPath.'/index.php', @@ -49,7 +49,7 @@ public function test_it_routes_to_index_if_404() public function test_it_serves_directory_with_index_html() { $projectPath = $this->projectDir('basic-no-public'); - $driver = new BasicValetDriver(); + $driver = new BasicValetDriver; $this->assertEquals( $projectPath.'/team/index.html', @@ -60,7 +60,7 @@ public function test_it_serves_directory_with_index_html() public function test_it_serves_static_files() { $projectPath = $this->projectDir('basic-no-public'); - $driver = new BasicValetDriver(); + $driver = new BasicValetDriver; $this->assertEquals( $projectPath.'/assets/document.txt', diff --git a/tests/Drivers/BasicWithPublicValetDriverTest.php b/tests/Drivers/BasicWithPublicValetDriverTest.php index 51a7ed2..fec768a 100644 --- a/tests/Drivers/BasicWithPublicValetDriverTest.php +++ b/tests/Drivers/BasicWithPublicValetDriverTest.php @@ -6,14 +6,14 @@ class BasicWithPublicValetDriverTest extends BaseDriverTestCase { public function test_it_serves_anything_with_public() { - $driver = new BasicWithPublicValetDriver(); + $driver = new BasicWithPublicValetDriver; $this->assertTrue($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_doesnt_serve_from_not_public() { - $driver = new BasicWithPublicValetDriver(); + $driver = new BasicWithPublicValetDriver; $this->assertFalse($driver->serves($this->projectDir('basic-no-public'), 'my-site', '/')); } @@ -21,7 +21,7 @@ public function test_it_doesnt_serve_from_not_public() public function test_it_serves_php_files_from_public() { $projectPath = $this->projectDir('public-with-index-non-laravel'); - $driver = new BasicWithPublicValetDriver(); + $driver = new BasicWithPublicValetDriver; $this->assertEquals( $projectPath.'/public/file-in-public.php', @@ -32,7 +32,7 @@ public function test_it_serves_php_files_from_public() public function test_it_doesnt_serve_php_files_from_root() { $projectPath = $this->projectDir('public-with-index-non-laravel'); - $driver = new BasicWithPublicValetDriver(); + $driver = new BasicWithPublicValetDriver; $this->assertEquals( $projectPath.'/public/index.php', @@ -43,7 +43,7 @@ public function test_it_doesnt_serve_php_files_from_root() public function test_it_serves_directory_with_index_php() { $projectPath = $this->projectDir('public-with-index-non-laravel'); - $driver = new BasicWithPublicValetDriver(); + $driver = new BasicWithPublicValetDriver; $this->assertEquals( $projectPath.'/public/about/index.php', @@ -54,7 +54,7 @@ public function test_it_serves_directory_with_index_php() public function test_it_route_to_public_index_if_404() { $projectPath = $this->projectDir('public-with-index-non-laravel'); - $driver = new BasicWithPublicValetDriver(); + $driver = new BasicWithPublicValetDriver; $this->assertEquals( $projectPath.'/public/index.php', @@ -65,7 +65,7 @@ public function test_it_route_to_public_index_if_404() public function test_it_serves_directory_with_index_html() { $projectPath = $this->projectDir('public-with-index-non-laravel'); - $driver = new BasicWithPublicValetDriver(); + $driver = new BasicWithPublicValetDriver; $this->assertEquals( $projectPath.'/public/team/index.html', @@ -76,7 +76,7 @@ public function test_it_serves_directory_with_index_html() public function test_it_serves_static_files() { $projectPath = $this->projectDir('public-with-index-non-laravel'); - $driver = new BasicWithPublicValetDriver(); + $driver = new BasicWithPublicValetDriver; $this->assertEquals( $projectPath.'/public/assets/document.txt', diff --git a/tests/Drivers/BedrockValetDriverTest.php b/tests/Drivers/BedrockValetDriverTest.php index 2423dd6..29bc327 100644 --- a/tests/Drivers/BedrockValetDriverTest.php +++ b/tests/Drivers/BedrockValetDriverTest.php @@ -6,21 +6,21 @@ class BedrockValetDriverTest extends BaseDriverTestCase { public function test_it_serves_bedrock_projects() { - $driver = new BedrockValetDriver(); + $driver = new BedrockValetDriver; $this->assertTrue($driver->serves($this->projectDir('bedrock'), 'my-site', '/')); } public function test_it_doesnt_serve_non_bedrock_projects() { - $driver = new BedrockValetDriver(); + $driver = new BedrockValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new BedrockValetDriver(); + $driver = new BedrockValetDriver; $projectPath = $this->projectDir('bedrock'); $this->assertEquals($projectPath.'/web/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); diff --git a/tests/Drivers/CakeValetDriverTest.php b/tests/Drivers/CakeValetDriverTest.php index 24d6159..4177298 100644 --- a/tests/Drivers/CakeValetDriverTest.php +++ b/tests/Drivers/CakeValetDriverTest.php @@ -6,21 +6,21 @@ class CakeValetDriverTest extends BaseDriverTestCase { public function test_it_serves_cake_projects() { - $driver = new CakeValetDriver(); + $driver = new CakeValetDriver; $this->assertTrue($driver->serves($this->projectDir('cake'), 'my-site', '/')); } public function test_it_doesnt_serve_non_cake_projects() { - $driver = new CakeValetDriver(); + $driver = new CakeValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new CakeValetDriver(); + $driver = new CakeValetDriver; $projectPath = $this->projectDir('cake'); $this->assertEquals($projectPath.'/webroot/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); diff --git a/tests/Drivers/Concrete5ValetDriverTest.php b/tests/Drivers/Concrete5ValetDriverTest.php index bdf252b..ad61898 100644 --- a/tests/Drivers/Concrete5ValetDriverTest.php +++ b/tests/Drivers/Concrete5ValetDriverTest.php @@ -6,21 +6,21 @@ class Concrete5ValetDriverTest extends BaseDriverTestCase { public function test_it_serves_concrete5_projects() { - $driver = new Concrete5ValetDriver(); + $driver = new Concrete5ValetDriver; $this->assertTrue($driver->serves($this->projectDir('concrete5'), 'my-site', '/')); } public function test_it_doesnt_serve_non_concrete5_projects() { - $driver = new Concrete5ValetDriver(); + $driver = new Concrete5ValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new Concrete5ValetDriver(); + $driver = new Concrete5ValetDriver; $projectPath = $this->projectDir('concrete5'); $this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); diff --git a/tests/Drivers/ContaoValetDriverTest.php b/tests/Drivers/ContaoValetDriverTest.php index b103064..9fc48e1 100644 --- a/tests/Drivers/ContaoValetDriverTest.php +++ b/tests/Drivers/ContaoValetDriverTest.php @@ -6,21 +6,21 @@ class ContaoValetDriverTest extends BaseDriverTestCase { public function test_it_serves_contao_projects() { - $driver = new ContaoValetDriver(); + $driver = new ContaoValetDriver; $this->assertTrue($driver->serves($this->projectDir('contao'), 'my-site', '/')); } public function test_it_doesnt_serve_non_contao_projects() { - $driver = new ContaoValetDriver(); + $driver = new ContaoValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new ContaoValetDriver(); + $driver = new ContaoValetDriver; $projectPath = $this->projectDir('contao'); $this->assertEquals($projectPath.'/web/app.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); diff --git a/tests/Drivers/CraftValetDriverTest.php b/tests/Drivers/CraftValetDriverTest.php index 97bad9d..ba0c191 100644 --- a/tests/Drivers/CraftValetDriverTest.php +++ b/tests/Drivers/CraftValetDriverTest.php @@ -6,21 +6,21 @@ class CraftValetDriverTest extends BaseDriverTestCase { public function test_it_serves_craft_projects() { - $driver = new CraftValetDriver(); + $driver = new CraftValetDriver; $this->assertTrue($driver->serves($this->projectDir('craft'), 'my-site', '/')); } public function test_it_doesnt_serve_non_craft_projects() { - $driver = new CraftValetDriver(); + $driver = new CraftValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new CraftValetDriver(); + $driver = new CraftValetDriver; $projectPath = $this->projectDir('craft'); $this->assertEquals($projectPath.'/public/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); diff --git a/tests/Drivers/DrupalValetDriverTest.php b/tests/Drivers/DrupalValetDriverTest.php index a763335..de6f3e9 100644 --- a/tests/Drivers/DrupalValetDriverTest.php +++ b/tests/Drivers/DrupalValetDriverTest.php @@ -6,21 +6,21 @@ class DrupalValetDriverTest extends BaseDriverTestCase { public function test_it_serves_drupal_projects() { - $driver = new DrupalValetDriver(); + $driver = new DrupalValetDriver; $this->assertTrue($driver->serves($this->projectDir('drupal'), 'my-site', '/')); } public function test_it_doesnt_serve_non_drupal_projects() { - $driver = new DrupalValetDriver(); + $driver = new DrupalValetDriver; $this->assertFalse((bool) $driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new DrupalValetDriver(); + $driver = new DrupalValetDriver; $projectPath = $this->projectDir('drupal'); $this->assertEquals($projectPath.'/public/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); diff --git a/tests/Drivers/JigsawValetDriverTest.php b/tests/Drivers/JigsawValetDriverTest.php index aa01327..e2885a0 100644 --- a/tests/Drivers/JigsawValetDriverTest.php +++ b/tests/Drivers/JigsawValetDriverTest.php @@ -6,21 +6,21 @@ class JigsawValetDriverTest extends BaseDriverTestCase { public function test_it_serves_jigsaw_projects() { - $driver = new JigsawValetDriver(); + $driver = new JigsawValetDriver; $this->assertTrue($driver->serves($this->projectDir('jigsaw'), 'my-site', '/')); } public function test_it_doesnt_serve_non_jigsaw_projects_with_public_directory() { - $driver = new JigsawValetDriver(); + $driver = new JigsawValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_mutates_uri() { - $driver = new JigsawValetDriver(); + $driver = new JigsawValetDriver; $this->assertEquals('/build_local/about', $driver->mutateUri('/about')); } diff --git a/tests/Drivers/JoomlaValetDriverTest.php b/tests/Drivers/JoomlaValetDriverTest.php index 8dcc28f..516a355 100644 --- a/tests/Drivers/JoomlaValetDriverTest.php +++ b/tests/Drivers/JoomlaValetDriverTest.php @@ -6,21 +6,21 @@ class JoomlaValetDriverTest extends BaseDriverTestCase { public function test_it_serves_joomla_projects() { - $driver = new JoomlaValetDriver(); + $driver = new JoomlaValetDriver; $this->assertTrue($driver->serves($this->projectDir('joomla'), 'my-site', '/')); } public function test_it_doesnt_serve_non_joomla_projects_with_public_directory() { - $driver = new JoomlaValetDriver(); + $driver = new JoomlaValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new JoomlaValetDriver(); + $driver = new JoomlaValetDriver; $projectPath = $this->projectDir('joomla'); $this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); diff --git a/tests/Drivers/KatanaValetDriverTest.php b/tests/Drivers/KatanaValetDriverTest.php index 738f44a..d5f8e64 100644 --- a/tests/Drivers/KatanaValetDriverTest.php +++ b/tests/Drivers/KatanaValetDriverTest.php @@ -6,21 +6,21 @@ class KatanaValetDriverTest extends BaseDriverTestCase { public function test_it_serves_katana_projects() { - $driver = new KatanaValetDriver(); + $driver = new KatanaValetDriver; $this->assertTrue($driver->serves($this->projectDir('katana'), 'my-site', '/')); } public function test_it_doesnt_serve_non_katana_projects_with_public_directory() { - $driver = new KatanaValetDriver(); + $driver = new KatanaValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_mutates_uri() { - $driver = new KatanaValetDriver(); + $driver = new KatanaValetDriver; $this->assertEquals('/public/about', $driver->mutateUri('/about')); } diff --git a/tests/Drivers/KirbyValetDriverTest.php b/tests/Drivers/KirbyValetDriverTest.php index 491e94f..8afbdfe 100644 --- a/tests/Drivers/KirbyValetDriverTest.php +++ b/tests/Drivers/KirbyValetDriverTest.php @@ -6,21 +6,21 @@ class KirbyValetDriverTest extends BaseDriverTestCase { public function test_it_serves_kirby_projects() { - $driver = new KirbyValetDriver(); + $driver = new KirbyValetDriver; $this->assertTrue($driver->serves($this->projectDir('kirby'), 'my-site', '/')); } public function test_it_doesnt_serve_non_kirby_projects_with_public_directory() { - $driver = new KirbyValetDriver(); + $driver = new KirbyValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new KirbyValetDriver(); + $driver = new KirbyValetDriver; $projectPath = $this->projectDir('kirby'); $this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); diff --git a/tests/Drivers/LaravelValetDriverTest.php b/tests/Drivers/LaravelValetDriverTest.php index 2350ed6..390d972 100644 --- a/tests/Drivers/LaravelValetDriverTest.php +++ b/tests/Drivers/LaravelValetDriverTest.php @@ -6,21 +6,21 @@ class LaravelValetDriverTest extends BaseDriverTestCase { public function test_it_serves_laravel_projects() { - $driver = new LaravelValetDriver(); + $driver = new LaravelValetDriver; $this->assertTrue($driver->serves($this->projectDir('laravel'), 'my-site', '/')); } public function test_it_doesnt_serve_non_laravel_projects_with_public_directory() { - $driver = new LaravelValetDriver(); + $driver = new LaravelValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new LaravelValetDriver(); + $driver = new LaravelValetDriver; $projectPath = $this->projectDir('laravel'); $this->assertEquals($projectPath.'/public/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); diff --git a/tests/Drivers/Magento2ValetDriverTest.php b/tests/Drivers/Magento2ValetDriverTest.php index a0b8a4b..b94bbfe 100644 --- a/tests/Drivers/Magento2ValetDriverTest.php +++ b/tests/Drivers/Magento2ValetDriverTest.php @@ -6,21 +6,21 @@ class Magento2ValetDriverTest extends BaseDriverTestCase { public function test_it_serves_magento2_projects() { - $driver = new Magento2ValetDriver(); + $driver = new Magento2ValetDriver; $this->assertTrue($driver->serves($this->projectDir('magento2'), 'my-site', '/')); } public function test_it_doesnt_serve_non_magento2_projects_with_public_directory() { - $driver = new Magento2ValetDriver(); + $driver = new Magento2ValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new Magento2ValetDriver(); + $driver = new Magento2ValetDriver; $projectPath = $this->projectDir('magento2'); $this->assertEquals($projectPath.'/pub/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); diff --git a/tests/Drivers/NeosValetDriverTest.php b/tests/Drivers/NeosValetDriverTest.php index 0c1073d..9955c39 100644 --- a/tests/Drivers/NeosValetDriverTest.php +++ b/tests/Drivers/NeosValetDriverTest.php @@ -6,21 +6,21 @@ class NeosValetDriverTest extends BaseDriverTestCase { public function test_it_serves_neos_projects() { - $driver = new NeosValetDriver(); + $driver = new NeosValetDriver; $this->assertTrue($driver->serves($this->projectDir('neos'), 'my-site', '/')); } public function test_it_doesnt_serve_non_neos_projects_with_public_directory() { - $driver = new NeosValetDriver(); + $driver = new NeosValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new NeosValetDriver(); + $driver = new NeosValetDriver; $projectPath = $this->projectDir('neos'); $this->assertEquals($projectPath.'/Web/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); diff --git a/tests/Drivers/SculpinValetDriverTest.php b/tests/Drivers/SculpinValetDriverTest.php index ca698d5..6660afb 100644 --- a/tests/Drivers/SculpinValetDriverTest.php +++ b/tests/Drivers/SculpinValetDriverTest.php @@ -6,21 +6,21 @@ class SculpinValetDriverTest extends BaseDriverTestCase { public function test_it_serves_sculpin_projects() { - $driver = new SculpinValetDriver(); + $driver = new SculpinValetDriver; $this->assertTrue($driver->serves($this->projectDir('sculpin'), 'my-site', '/')); } public function test_it_doesnt_serve_non_sculpin_projects_with_public_directory() { - $driver = new SculpinValetDriver(); + $driver = new SculpinValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_mutates_uri() { - $driver = new SculpinValetDriver(); + $driver = new SculpinValetDriver; $this->assertEquals('/output_dev/about', $driver->mutateUri('/about')); } diff --git a/tests/Drivers/StatamicV1ValetDriverTest.php b/tests/Drivers/StatamicV1ValetDriverTest.php index 87503e8..925253b 100644 --- a/tests/Drivers/StatamicV1ValetDriverTest.php +++ b/tests/Drivers/StatamicV1ValetDriverTest.php @@ -6,21 +6,21 @@ class StatamicV1ValetDriverTest extends BaseDriverTestCase { public function test_it_serves_statamicv1_projects() { - $driver = new StatamicV1ValetDriver(); + $driver = new StatamicV1ValetDriver; $this->assertTrue($driver->serves($this->projectDir('statamicv1'), 'my-site', '/')); } public function test_it_doesnt_serve_non_statamicv1_projects() { - $driver = new StatamicV1ValetDriver(); + $driver = new StatamicV1ValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new StatamicV1ValetDriver(); + $driver = new StatamicV1ValetDriver; $projectPath = $this->projectDir('statamicv1'); $this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); diff --git a/tests/Drivers/StatamicV2ValetDriverTest.php b/tests/Drivers/StatamicV2ValetDriverTest.php index 630e6d1..c2e4898 100644 --- a/tests/Drivers/StatamicV2ValetDriverTest.php +++ b/tests/Drivers/StatamicV2ValetDriverTest.php @@ -6,21 +6,21 @@ class StatamicV2ValetDriverTest extends BaseDriverTestCase { public function test_it_serves_statamic_projects() { - $driver = new StatamicV2ValetDriver(); + $driver = new StatamicV2ValetDriver; $this->assertTrue($driver->serves($this->projectDir('statamicv2'), 'my-site', '/')); } public function test_it_doesnt_serve_non_statamic_projects() { - $driver = new StatamicV2ValetDriver(); + $driver = new StatamicV2ValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new StatamicV2ValetDriver(); + $driver = new StatamicV2ValetDriver; $_SERVER['REQUEST_METHOD'] = 'GET'; $_SERVER['REQUEST_URI'] = '/about/'; diff --git a/tests/Drivers/StatamicValetDriverTest.php b/tests/Drivers/StatamicValetDriverTest.php index 5d2f0ee..ce2d14e 100644 --- a/tests/Drivers/StatamicValetDriverTest.php +++ b/tests/Drivers/StatamicValetDriverTest.php @@ -6,28 +6,28 @@ class StatamicValetDriverTest extends BaseDriverTestCase { public function test_it_serves_statamic_projects() { - $driver = new StatamicValetDriver(); + $driver = new StatamicValetDriver; $this->assertTrue($driver->serves($this->projectDir('statamic'), 'my-site', '/')); } public function test_it_doesnt_serve_non_statamic_projects_with_public_directory() { - $driver = new StatamicValetDriver(); + $driver = new StatamicValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_doesnt_serve_laravel_projects() { - $driver = new StatamicValetDriver(); + $driver = new StatamicValetDriver; $this->assertFalse($driver->serves($this->projectDir('laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new StatamicValetDriver(); + $driver = new StatamicValetDriver; $projectPath = $this->projectDir('statamic'); $this->assertEquals($projectPath.'/public/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); @@ -35,7 +35,7 @@ public function test_it_gets_front_controller() public function test_it_serves_statically_cached_pages() { - $driver = new StatamicValetDriver(); + $driver = new StatamicValetDriver; $projectPath = $this->projectDir('statamic'); diff --git a/tests/Drivers/SymfonyValetDriverTest.php b/tests/Drivers/SymfonyValetDriverTest.php index 71f4571..627931c 100644 --- a/tests/Drivers/SymfonyValetDriverTest.php +++ b/tests/Drivers/SymfonyValetDriverTest.php @@ -6,21 +6,21 @@ class SymfonyValetDriverTest extends BaseDriverTestCase { public function test_it_serves_symfony_projects() { - $driver = new SymfonyValetDriver(); + $driver = new SymfonyValetDriver; $this->assertTrue($driver->serves($this->projectDir('symfony'), 'my-site', '/')); } public function test_it_doesnt_serve_non_symfony_projects() { - $driver = new SymfonyValetDriver(); + $driver = new SymfonyValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new SymfonyValetDriver(); + $driver = new SymfonyValetDriver; $projectPath = $this->projectDir('symfony'); $this->assertEquals($projectPath.'/web/app.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); diff --git a/tests/Drivers/Typo3ValetDriverTest.php b/tests/Drivers/Typo3ValetDriverTest.php index a546317..a68f39f 100644 --- a/tests/Drivers/Typo3ValetDriverTest.php +++ b/tests/Drivers/Typo3ValetDriverTest.php @@ -6,21 +6,21 @@ class Typo3ValetDriverTest extends BaseDriverTestCase { public function test_it_serves_typo3_projects() { - $driver = new Typo3ValetDriver(); + $driver = new Typo3ValetDriver; $this->assertTrue($driver->serves($this->projectDir('typo3'), 'my-site', '/')); } public function test_it_doesnt_serve_non_typo3_projects() { - $driver = new Typo3ValetDriver(); + $driver = new Typo3ValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new Typo3ValetDriver(); + $driver = new Typo3ValetDriver; $projectPath = $this->projectDir('typo3'); $this->assertEquals($projectPath.'/web/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/')); diff --git a/tests/Drivers/WordPressValetDriverTest.php b/tests/Drivers/WordPressValetDriverTest.php index 317831b..e19132f 100644 --- a/tests/Drivers/WordPressValetDriverTest.php +++ b/tests/Drivers/WordPressValetDriverTest.php @@ -6,21 +6,21 @@ class WordPressValetDriverTest extends BaseDriverTestCase { public function test_it_serves_wordpress_projects() { - $driver = new WordPressValetDriver(); + $driver = new WordPressValetDriver; $this->assertTrue($driver->serves($this->projectDir('wordpress'), 'my-site', '/')); } public function test_it_doesnt_serve_non_wordpress_projects() { - $driver = new WordPressValetDriver(); + $driver = new WordPressValetDriver; $this->assertFalse($driver->serves($this->projectDir('public-with-index-non-laravel'), 'my-site', '/')); } public function test_it_gets_front_controller() { - $driver = new WordPressValetDriver(); + $driver = new WordPressValetDriver; $projectPath = $this->projectDir('wordpress'); $this->assertEquals($projectPath.'/index.php', $driver->frontControllerPath($projectPath, 'my-site', '/'));