mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 05:14:46 +02:00
More static analysis
This commit is contained in:
parent
3cea8ca979
commit
861aeb0c5c
@ -91,7 +91,7 @@ class ServerTransferController extends Controller
|
|||||||
$transfer->new_node = $node_id;
|
$transfer->new_node = $node_id;
|
||||||
$transfer->old_allocation = $server->allocation_id;
|
$transfer->old_allocation = $server->allocation_id;
|
||||||
$transfer->new_allocation = $allocation_id;
|
$transfer->new_allocation = $allocation_id;
|
||||||
$transfer->old_additional_allocations = $server->allocations->where('id', '!=', $server->allocation_id)->pluck('id');
|
$transfer->old_additional_allocations = $server->allocations->where('id', '!=', $server->allocation_id)->pluck('id')->all();
|
||||||
$transfer->new_additional_allocations = $additional_allocations;
|
$transfer->new_additional_allocations = $additional_allocations;
|
||||||
|
|
||||||
$transfer->save();
|
$transfer->save();
|
||||||
|
@ -12,7 +12,7 @@ use Illuminate\Validation\ValidationException;
|
|||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use App\Exceptions\Model\DataValidationException;
|
use App\Exceptions\Model\DataValidationException;
|
||||||
use Illuminate\Database\Eloquent\Model as IlluminateModel;
|
use Illuminate\Database\Eloquent\Model as IlluminateModel;
|
||||||
use Illuminate\Contracts\Validation\Factory as ValidationFactory;
|
use Illuminate\Validation\Factory as ValidationFactory;
|
||||||
use Illuminate\Validation\Validator;
|
use Illuminate\Validation\Validator;
|
||||||
|
|
||||||
abstract class Model extends IlluminateModel
|
abstract class Model extends IlluminateModel
|
||||||
|
@ -19,6 +19,6 @@ class AllocationDeletionService
|
|||||||
throw new ServerUsingAllocationException(trans('exceptions.allocations.server_using'));
|
throw new ServerUsingAllocationException(trans('exceptions.allocations.server_using'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $allocation->delete();
|
return (int) $allocation->delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,6 @@ class HostDeletionService
|
|||||||
throw new HasActiveServersException(trans('exceptions.databases.delete_has_databases'));
|
throw new HasActiveServersException(trans('exceptions.databases.delete_has_databases'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $host->delete();
|
return (int) $host->delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,6 @@ class EggDeletionService
|
|||||||
|
|
||||||
$egg = Egg::query()->findOrFail($egg);
|
$egg = Egg::query()->findOrFail($egg);
|
||||||
|
|
||||||
return $egg->delete();
|
return (int) $egg->delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,6 @@ class NodeDeletionService
|
|||||||
throw new HasActiveServersException($this->translator->get('exceptions.node.servers_attached'));
|
throw new HasActiveServersException($this->translator->get('exceptions.node.servers_attached'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $node->delete();
|
return (int) $node->delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ abstract class BaseTransformer extends TransformerAbstract
|
|||||||
/**
|
/**
|
||||||
* Returns a new transformer instance with the request set on the instance.
|
* Returns a new transformer instance with the request set on the instance.
|
||||||
*/
|
*/
|
||||||
public static function fromRequest(Request $request): BaseTransformer
|
public static function fromRequest(Request $request): static
|
||||||
{
|
{
|
||||||
return app(static::class)->setRequest($request);
|
return app(static::class)->setRequest($request);
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ parameters:
|
|||||||
- app/
|
- app/
|
||||||
|
|
||||||
# Level 9 is the highest level
|
# Level 9 is the highest level
|
||||||
level: 2
|
level: 3
|
||||||
|
|
||||||
ignoreErrors:
|
ignoreErrors:
|
||||||
# Prologue\Alerts defines its methods from its configuration file dynamically
|
# Prologue\Alerts defines its methods from its configuration file dynamically
|
||||||
|
Loading…
x
Reference in New Issue
Block a user