mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-19 23:24: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->old_allocation = $server->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->save();
|
||||
|
@ -12,7 +12,7 @@ use Illuminate\Validation\ValidationException;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Exceptions\Model\DataValidationException;
|
||||
use Illuminate\Database\Eloquent\Model as IlluminateModel;
|
||||
use Illuminate\Contracts\Validation\Factory as ValidationFactory;
|
||||
use Illuminate\Validation\Factory as ValidationFactory;
|
||||
use Illuminate\Validation\Validator;
|
||||
|
||||
abstract class Model extends IlluminateModel
|
||||
|
@ -19,6 +19,6 @@ class AllocationDeletionService
|
||||
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'));
|
||||
}
|
||||
|
||||
return $host->delete();
|
||||
return (int) $host->delete();
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,6 @@ class EggDeletionService
|
||||
|
||||
$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'));
|
||||
}
|
||||
|
||||
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.
|
||||
*/
|
||||
public static function fromRequest(Request $request): BaseTransformer
|
||||
public static function fromRequest(Request $request): static
|
||||
{
|
||||
return app(static::class)->setRequest($request);
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ parameters:
|
||||
- app/
|
||||
|
||||
# Level 9 is the highest level
|
||||
level: 2
|
||||
level: 3
|
||||
|
||||
ignoreErrors:
|
||||
# Prologue\Alerts defines its methods from its configuration file dynamically
|
||||
|
Loading…
x
Reference in New Issue
Block a user