Add phpstan level 7(#544)

This commit is contained in:
Saeed Vaziry
2025-03-12 13:31:10 +01:00
committed by GitHub
parent c22bb1fa80
commit 493cbb0849
437 changed files with 4505 additions and 2193 deletions

View File

@ -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' => [