diff --git a/app/Commands/Sites/ListCommand.php b/app/Commands/Sites/ListCommand.php index 36e83d0..99552a9 100644 --- a/app/Commands/Sites/ListCommand.php +++ b/app/Commands/Sites/ListCommand.php @@ -15,7 +15,7 @@ protected function action() $serverId = $this->argument('server_id'); if ($serverId) { - $sites = collect($this->spinupwp->sites->listForServer((int)$serverId)); + $sites = collect($this->spinupwp->sites->listForServer((int) $serverId)); } else { $sites = collect($this->spinupwp->sites->list()); } @@ -24,7 +24,7 @@ protected function action() return $sites; } - return $sites->map(fn($site) => [ + return $sites->map(fn ($site) => [ 'ID' => $site->id, 'Server ID' => $site->server_id, 'Domain' => $site->domain, diff --git a/tests/Feature/Commands/ServersListCommandTest.php b/tests/Feature/Commands/ServersListCommandTest.php index 692d149..6f6ad05 100644 --- a/tests/Feature/Commands/ServersListCommandTest.php +++ b/tests/Feature/Commands/ServersListCommandTest.php @@ -15,8 +15,8 @@ 'used' => 7661140000, 'updated_at' => '2021-11-03T16:52:48.000000Z', ], - 'database' => [ - 'server' => 'mysql-8.0' + 'database' => [ + 'server' => 'mysql-8.0', ], ], [ @@ -31,8 +31,8 @@ 'used' => 7661140000, 'updated_at' => '2021-11-03T16:52:48.000000Z', ], - 'database' => [ - 'server' => 'mysql-8.0' + 'database' => [ + 'server' => 'mysql-8.0', ], ], ]; @@ -69,14 +69,14 @@ 'hellfish-media', '127.0.0.1', '20.04', - 'mysql-8.0' + 'mysql-8.0', ], [ '2', 'staging.hellfish-media', '127.0.0.1', '20.04', - 'mysql-8.0' + 'mysql-8.0', ], ] ); diff --git a/tests/Feature/Commands/SitesListCommandTest.php b/tests/Feature/Commands/SitesListCommandTest.php index 2961705..6def05f 100644 --- a/tests/Feature/Commands/SitesListCommandTest.php +++ b/tests/Feature/Commands/SitesListCommandTest.php @@ -9,12 +9,12 @@ 'domain' => 'hellfishmedia.com', 'site_user' => 'hellfish', 'php_version' => '8.0', - 'page_cache' => [ + 'page_cache' => [ 'enabled' => true, ], 'https' => [ 'enabled' => true, - ] + ], ], [ 'id' => 2, @@ -22,12 +22,12 @@ 'domain' => 'staging.hellfishmedia.com', 'site_user' => 'staging-hellfish', 'php_version' => '8.0', - 'page_cache' => [ + 'page_cache' => [ 'enabled' => false, ], 'https' => [ 'enabled' => false, - ] + ], ], ]; beforeEach(function () use ($response) {