mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
code style fix
add command tests
This commit is contained in:
@ -13,7 +13,7 @@ public function __construct(protected string $provider, protected string $databa
|
||||
|
||||
public function file(): string
|
||||
{
|
||||
return File::get(resource_path(sprintf("commands/database/%s/backup.sh", $this->provider)));
|
||||
return File::get(resource_path(sprintf('commands/database/%s/backup.sh', $this->provider)));
|
||||
}
|
||||
|
||||
public function content(): string
|
||||
|
@ -13,7 +13,7 @@ public function __construct(protected string $provider, protected string $name)
|
||||
|
||||
public function file(): string
|
||||
{
|
||||
return File::get(resource_path(sprintf("commands/database/%s/create.sh", $this->provider)));
|
||||
return File::get(resource_path(sprintf('commands/database/%s/create.sh', $this->provider)));
|
||||
}
|
||||
|
||||
public function content(): string
|
||||
|
@ -17,7 +17,7 @@ public function __construct(
|
||||
|
||||
public function file(): string
|
||||
{
|
||||
return File::get(resource_path(sprintf("commands/database/%s/create-user.sh", $this->provider)));
|
||||
return File::get(resource_path(sprintf('commands/database/%s/create-user.sh', $this->provider)));
|
||||
}
|
||||
|
||||
public function content(): string
|
||||
|
@ -13,7 +13,7 @@ public function __construct(protected string $provider, protected string $name)
|
||||
|
||||
public function file(): string
|
||||
{
|
||||
return File::get(resource_path(sprintf("commands/database/%s/delete.sh", $this->provider)));
|
||||
return File::get(resource_path(sprintf('commands/database/%s/delete.sh', $this->provider)));
|
||||
}
|
||||
|
||||
public function content(): string
|
||||
|
@ -13,7 +13,7 @@ public function __construct(protected string $provider, protected string $userna
|
||||
|
||||
public function file(): string
|
||||
{
|
||||
return File::get(resource_path(sprintf("commands/database/%s/delete-user.sh", $this->provider)));
|
||||
return File::get(resource_path(sprintf('commands/database/%s/delete-user.sh', $this->provider)));
|
||||
}
|
||||
|
||||
public function content(): string
|
||||
|
@ -17,7 +17,7 @@ public function __construct(
|
||||
|
||||
public function file(): string
|
||||
{
|
||||
return File::get(resource_path(sprintf("commands/database/%s/link.sh", $this->provider)));
|
||||
return File::get(resource_path(sprintf('commands/database/%s/link.sh', $this->provider)));
|
||||
}
|
||||
|
||||
public function content(): string
|
||||
|
@ -13,7 +13,7 @@ public function __construct(protected string $provider, protected string $databa
|
||||
|
||||
public function file(): string
|
||||
{
|
||||
return File::get(resource_path(sprintf("commands/database/%s/restore.sh", $this->provider)));
|
||||
return File::get(resource_path(sprintf('commands/database/%s/restore.sh', $this->provider)));
|
||||
}
|
||||
|
||||
public function content(): string
|
||||
|
@ -16,7 +16,7 @@ public function __construct(
|
||||
|
||||
public function file(): string
|
||||
{
|
||||
return File::get(resource_path(sprintf("commands/database/%s/unlink.sh", $this->provider)));
|
||||
return File::get(resource_path(sprintf('commands/database/%s/unlink.sh', $this->provider)));
|
||||
}
|
||||
|
||||
public function content(): string
|
||||
|
@ -21,6 +21,6 @@ public function __construct(
|
||||
|
||||
public function file(): string
|
||||
{
|
||||
return File::get(resource_path(sprintf("commands/firewall/%s/add-rule.sh", $this->provider)));
|
||||
return File::get(resource_path(sprintf('commands/firewall/%s/add-rule.sh', $this->provider)));
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,6 @@ public function __construct(
|
||||
|
||||
public function file(): string
|
||||
{
|
||||
return File::get(resource_path(sprintf("commands/firewall/%s/remove-rule.sh", $this->provider)));
|
||||
return File::get(resource_path(sprintf('commands/firewall/%s/remove-rule.sh', $this->provider)));
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
use App\SSHCommands\Command;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class InstallNginxCommand extends Command
|
||||
{
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
use App\SSHCommands\Command;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class InstallPHPCommand extends Command
|
||||
{
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
use App\SSHCommands\Command;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class UninstallPHPCommand extends Command
|
||||
{
|
||||
|
@ -5,7 +5,7 @@
|
||||
use App\SSHCommands\Command;
|
||||
use Illuminate\Support\Facades\File;
|
||||
|
||||
class DeleteNginxPHPMyAdminVHost extends Command
|
||||
class DeleteNginxPHPMyAdminVHostCommand extends Command
|
||||
{
|
||||
public function __construct(protected string $path)
|
||||
{
|
@ -17,6 +17,6 @@ public function file(): string
|
||||
|
||||
public function content(): string
|
||||
{
|
||||
return 'sudo rm -rf '.$this->path.'*'."\n";
|
||||
return 'sudo rm -rf '.$this->path.'*';
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
use App\SSHCommands\Command;
|
||||
use Illuminate\Support\Facades\File;
|
||||
|
||||
class RunScript extends Command
|
||||
class RunScriptCommand extends Command
|
||||
{
|
||||
public function __construct(protected string $path, protected string $script)
|
||||
{
|
||||
@ -20,7 +20,7 @@ public function content(): string
|
||||
{
|
||||
return str($this->file())
|
||||
->replace('__path__', $this->path)
|
||||
->replace('__script__', make_bash_script($this->script))
|
||||
->replace('__script__', $this->script)
|
||||
->toString();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user