mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 22:46:16 +00:00
Add phpstan level 7(#544)
This commit is contained in:
@ -9,12 +9,7 @@
|
||||
|
||||
abstract class AbstractType implements ServerType
|
||||
{
|
||||
protected Server $server;
|
||||
|
||||
public function __construct(Server $server)
|
||||
{
|
||||
$this->server = $server;
|
||||
}
|
||||
public function __construct(protected Server $server) {}
|
||||
|
||||
/**
|
||||
* @throws SSHError
|
||||
@ -58,7 +53,7 @@ protected function createUser(): void
|
||||
$this->server->save();
|
||||
}
|
||||
|
||||
protected function progress(int $percentage, ?string $step = null): void
|
||||
protected function progress(int|float $percentage, ?string $step = null): void
|
||||
{
|
||||
$this->server->progress = $percentage;
|
||||
$this->server->progress_step = $step;
|
||||
@ -67,7 +62,7 @@ protected function progress(int $percentage, ?string $step = null): void
|
||||
|
||||
protected function addWebserver(string $service): void
|
||||
{
|
||||
if ($service != 'none') {
|
||||
if ($service !== 'none') {
|
||||
$this->server->services()->create([
|
||||
'type' => 'webserver',
|
||||
'name' => $service,
|
||||
@ -78,7 +73,7 @@ protected function addWebserver(string $service): void
|
||||
|
||||
protected function addDatabase(string $service): void
|
||||
{
|
||||
if ($service != 'none') {
|
||||
if ($service !== 'none') {
|
||||
$this->server->services()->create([
|
||||
'type' => 'database',
|
||||
'name' => config('core.databases_name.'.$service),
|
||||
@ -89,7 +84,7 @@ protected function addDatabase(string $service): void
|
||||
|
||||
protected function addPHP(string $version): void
|
||||
{
|
||||
if ($version != 'none') {
|
||||
if ($version !== 'none') {
|
||||
$this->server->services()->create([
|
||||
'type' => 'php',
|
||||
'type_data' => [
|
||||
|
Reference in New Issue
Block a user