chore: add phpstan static analysis minimum (#4511)

This commit is contained in:
Lance Pioch 2022-11-28 11:56:03 -05:00 committed by GitHub
parent 3f7e2a565f
commit a1a52754ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
67 changed files with 561 additions and 279 deletions

View file

@ -82,7 +82,7 @@ class ServerCreationService
//
// If that connection fails out we will attempt to perform a cleanup by just
// deleting the server itself from the system.
/** @var \Pterodactyl\Models\Server $server */
/** @var Server $server */
$server = $this->connection->transaction(function () use ($data, $eggVariableData) {
// Create the server and assign any additional allocations to it.
$server = $this->createModel($data);
@ -115,7 +115,7 @@ class ServerCreationService
*/
private function configureDeployment(array $data, DeploymentObject $deployment): Allocation
{
/** @var \Illuminate\Support\Collection $nodes */
/** @var Collection $nodes */
$nodes = $this->findViableNodesService->setLocations($deployment->getLocations())
->setDisk(Arr::get($data, 'disk'))
->setMemory(Arr::get($data, 'memory'))
@ -136,7 +136,7 @@ class ServerCreationService
{
$uuid = $this->generateUniqueUuidCombo();
/** @var \Pterodactyl\Models\Server $model */
/** @var Server $model */
$model = $this->repository->create([
'external_id' => Arr::get($data, 'external_id'),
'uuid' => $uuid,