Run composer update and update model phpdocs (#2275)

This commit is contained in:
Boy132
2026-03-17 09:09:01 +01:00
committed by GitHub
parent 64bcdb514b
commit 612041e1f8
97 changed files with 1369 additions and 967 deletions

View File

@@ -65,7 +65,7 @@ function something()
* is assumed that the user is actually a subuser of the server.
*
* @param string[] $permissions
* @return array{\App\Models\User, \App\Models\Server}
* @return array{User, Server}
*/
/**
@@ -82,19 +82,19 @@ function createServerModel(array $attributes = []): Server
}
if (!isset($attributes['owner_id'])) {
/** @var \App\Models\User $user */
/** @var User $user */
$user = User::factory()->create();
$attributes['owner_id'] = $user->id;
}
if (!isset($attributes['node_id'])) {
/** @var \App\Models\Node $node */
/** @var Node $node */
$node = Node::factory()->create();
$attributes['node_id'] = $node->id;
}
if (!isset($attributes['allocation_id'])) {
/** @var \App\Models\Allocation $allocation */
/** @var Allocation $allocation */
$allocation = Allocation::factory()->create(['node_id' => $attributes['node_id']]);
$attributes['allocation_id'] = $allocation->id;
}
@@ -107,7 +107,7 @@ function createServerModel(array $attributes = []): Server
unset($attributes['user_id']);
/** @var \App\Models\Server $server */
/** @var Server $server */
$server = Server::factory()->create($attributes);
Allocation::query()->where('id', $server->allocation_id)->update(['server_id' => $server->id]);
@@ -122,11 +122,11 @@ function createServerModel(array $attributes = []): Server
* is assumed that the user is actually a subuser of the server.
*
* @param string[] $permissions
* @return array{\App\Models\User, \App\Models\Server}
* @return array{User, Server}
*/
function generateTestAccount(array $permissions = []): array
{
/** @var \App\Models\User $user */
/** @var User $user */
$user = User::factory()->create();
if (empty($permissions)) {
@@ -154,7 +154,7 @@ function cloneEggAndVariables(Egg $egg): Egg
$model->uuid = Uuid::uuid4()->toString();
$model->push();
/** @var \App\Models\Egg $model */
/** @var Egg $model */
$model = $model->fresh();
foreach ($egg->variables as $variable) {
@@ -170,7 +170,7 @@ function cloneEggAndVariables(Egg $egg): Egg
*/
function getBungeecordEgg(): Egg
{
/** @var \App\Models\Egg $egg */
/** @var Egg $egg */
$egg = Egg::query()->where('author', 'panel@example.com')->where('name', 'Bungeecord')->firstOrFail();
return $egg;