Format files

This commit is contained in:
Dane Everitt 2019-09-05 21:32:57 -07:00
parent 26e4ff1f62
commit 7543ef085d
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
193 changed files with 624 additions and 602 deletions

View file

@ -24,7 +24,7 @@ class AllocationRepository extends EloquentRepository implements AllocationRepos
* Set an array of allocation IDs to be assigned to a specific server.
*
* @param int|null $server
* @param array $ids
* @param array $ids
* @return int
*/
public function assignAllocationsToServer(int $server = null, array $ids): int
@ -129,7 +129,7 @@ class AllocationRepository extends EloquentRepository implements AllocationRepos
*
* @param array $nodes
* @param array $ports
* @param bool $dedicated
* @param bool $dedicated
* @return \Pterodactyl\Models\Allocation|null
*/
public function getRandomAllocation(array $nodes, array $ports, bool $dedicated = false)

View file

@ -49,7 +49,7 @@ class ApiKeyRepository extends EloquentRepository implements ApiKeyRepositoryInt
* Delete an account API key from the panel for a specific user.
*
* @param \Pterodactyl\Models\User $user
* @param string $identifier
* @param string $identifier
* @return int
*/
public function deleteAccountKey(User $user, string $identifier): int
@ -64,7 +64,7 @@ class ApiKeyRepository extends EloquentRepository implements ApiKeyRepositoryInt
* Delete an application API key from the panel for a specific user.
*
* @param \Pterodactyl\Models\User $user
* @param string $identifier
* @param string $identifier
* @return int
*/
public function deleteApplicationKey(User $user, string $identifier): int

View file

@ -26,7 +26,7 @@ class DaemonKeyRepository extends EloquentRepository implements DaemonKeyReposit
* Load the server and user relations onto a key model.
*
* @param \Pterodactyl\Models\DaemonKey $key
* @param bool $refresh
* @param bool $refresh
* @return \Pterodactyl\Models\DaemonKey
*/
public function loadServerAndUserRelations(DaemonKey $key, bool $refresh = false): DaemonKey

View file

@ -25,7 +25,7 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor
/**
* DatabaseRepository constructor.
*
* @param \Illuminate\Foundation\Application $application
* @param \Illuminate\Foundation\Application $application
* @param \Illuminate\Database\DatabaseManager $database
*/
public function __construct(Application $application, DatabaseManager $database)

View file

@ -52,7 +52,7 @@ class EggRepository extends EloquentRepository implements EggRepositoryInterface
* Return an egg with the scriptFrom and configFrom relations loaded onto the model.
*
* @param int|string $value
* @param string $column
* @param string $column
* @return \Pterodactyl\Models\Egg
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException

View file

@ -40,8 +40,8 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf
* Create a new record in the database and return the associated model.
*
* @param array $fields
* @param bool $validate
* @param bool $force
* @param bool $validate
* @param bool $force
* @return \Illuminate\Database\Eloquent\Model|bool
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
@ -121,7 +121,7 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf
/**
* Delete a given record from the database.
*
* @param int $id
* @param int $id
* @param bool $destroy
* @return int
*/
@ -134,7 +134,7 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf
* Delete records matching the given attributes.
*
* @param array $attributes
* @param bool $force
* @param bool $force
* @return int
*/
public function deleteWhere(array $attributes, bool $force = false): int
@ -147,10 +147,10 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf
/**
* Update a given ID with the passed array of fields.
*
* @param int $id
* @param int $id
* @param array $fields
* @param bool $validate
* @param bool $force
* @param bool $validate
* @param bool $force
* @return \Illuminate\Database\Eloquent\Model|bool
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
@ -182,8 +182,8 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf
* This does not perform any model data validation.
*
* @param string $column
* @param array $values
* @param array $fields
* @param array $values
* @param array $fields
* @return int
*/
public function updateWhereIn(string $column, array $values, array $fields): int
@ -198,8 +198,8 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf
*
* @param array $where
* @param array $fields
* @param bool $validate
* @param bool $force
* @param bool $validate
* @param bool $force
* @return \Illuminate\Database\Eloquent\Model
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException

View file

@ -101,7 +101,7 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa
* Return a single node with location and server information.
*
* @param \Pterodactyl\Models\Node $node
* @param bool $refresh
* @param bool $refresh
* @return \Pterodactyl\Models\Node
*/
public function loadLocationAndServerCount(Node $node, bool $refresh = false): Node
@ -126,7 +126,7 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa
* any servers that are also attached to those allocations.
*
* @param \Pterodactyl\Models\Node $node
* @param bool $refresh
* @param bool $refresh
* @return \Pterodactyl\Models\Node
*/
public function loadNodeAllocations(Node $node, bool $refresh = false): Node
@ -170,8 +170,8 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa
* available to support the additional disk and memory provided.
*
* @param array $locations
* @param int $disk
* @param int $memory
* @param int $disk
* @param int $memory
* @return \Illuminate\Support\LazyCollection
*/
public function getNodesWithResourceUse(array $locations, int $disk, int $memory): LazyCollection

View file

@ -25,7 +25,7 @@ class PackRepository extends EloquentRepository implements PackRepositoryInterfa
* Return a pack with the associated server models attached to it.
*
* @param \Pterodactyl\Models\Pack $pack
* @param bool $refresh
* @param bool $refresh
* @return \Pterodactyl\Models\Pack
*/
public function loadServerData(Pack $pack, bool $refresh = false): Pack

View file

@ -36,7 +36,7 @@ class ScheduleRepository extends EloquentRepository implements ScheduleRepositor
* already present.
*
* @param \Pterodactyl\Models\Schedule $schedule
* @param bool $refresh
* @param bool $refresh
* @return \Pterodactyl\Models\Schedule
*/
public function loadTasks(Schedule $schedule, bool $refresh = false): Schedule

View file

@ -2,7 +2,6 @@
namespace Pterodactyl\Repositories\Eloquent;
use Pterodactyl\Models\Node;
use Pterodactyl\Models\User;
use Webmozart\Assert\Assert;
use Pterodactyl\Models\Server;
@ -44,7 +43,7 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt
* Load the egg relations onto the server model.
*
* @param \Pterodactyl\Models\Server $server
* @param bool $refresh
* @param bool $refresh
* @return \Pterodactyl\Models\Server
*/
public function loadEggRelations(Server $server, bool $refresh = false): Server
@ -121,7 +120,7 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt
* return the server from the database.
*
* @param \Pterodactyl\Models\Server $server
* @param bool $refresh
* @param bool $refresh
* @return \Pterodactyl\Models\Server
*/
public function getPrimaryAllocation(Server $server, bool $refresh = false): Server
@ -137,7 +136,7 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt
* Return all of the server variables possible and default to the variable
* default if there is no value defined for the specific server requested.
*
* @param int $id
* @param int $id
* @param bool $returnAsObject
* @return array|object
*
@ -172,7 +171,7 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt
* Return enough data to be used for the creation of a server via the daemon.
*
* @param \Pterodactyl\Models\Server $server
* @param bool $refresh
* @param bool $refresh
* @return \Pterodactyl\Models\Server
*/
public function getDataForCreation(Server $server, bool $refresh = false): Server
@ -190,7 +189,7 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt
* Load associated databases onto the server model.
*
* @param \Pterodactyl\Models\Server $server
* @param bool $refresh
* @param bool $refresh
* @return \Pterodactyl\Models\Server
*/
public function loadDatabaseRelations(Server $server, bool $refresh = false): Server
@ -208,7 +207,7 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt
* if they are missing, or refresh is set to true.
*
* @param \Pterodactyl\Models\Server $server
* @param bool $refresh
* @param bool $refresh
* @return array
*/
public function getDaemonServiceData(Server $server, bool $refresh = false): array
@ -231,8 +230,8 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt
* Return a paginated list of servers that a user can access at a given level.
*
* @param \Pterodactyl\Models\User $user
* @param int $level
* @param bool|int $paginate
* @param int $level
* @param bool|int $paginate
* @return \Illuminate\Contracts\Pagination\LengthAwarePaginator|\Illuminate\Database\Eloquent\Collection
*/
public function filterUserAccessServers(User $user, int $level, $paginate = 25)
@ -290,7 +289,7 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt
*
* @param int[] $servers
* @param int[] $nodes
* @param bool $returnCount
* @param bool $returnCount
* @return int|\Illuminate\Support\LazyCollection
*/
public function getServersForPowerAction(array $servers = [], array $nodes = [], bool $returnCount = false)

View file

@ -32,7 +32,7 @@ class SessionRepository extends EloquentRepository implements SessionRepositoryI
/**
* Delete a session for a given user.
*
* @param int $user
* @param int $user
* @param string $session
* @return null|int
*/

View file

@ -30,7 +30,7 @@ class SettingsRepository extends EloquentRepository implements SettingsRepositor
/**
* Store a new persistent setting in the database.
*
* @param string $key
* @param string $key
* @param string|null $value
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
@ -49,7 +49,7 @@ class SettingsRepository extends EloquentRepository implements SettingsRepositor
* Retrieve a persistent setting from the database.
*
* @param string $key
* @param mixed $default
* @param mixed $default
* @return mixed
*/
public function get(string $key, $default = null)

View file

@ -22,7 +22,7 @@ class SubuserRepository extends EloquentRepository implements SubuserRepositoryI
* Return a subuser with the associated server relationship.
*
* @param \Pterodactyl\Models\Subuser $subuser
* @param bool $refresh
* @param bool $refresh
* @return \Pterodactyl\Models\Subuser
*/
public function loadServerAndUserRelations(Subuser $subuser, bool $refresh = false): Subuser
@ -42,7 +42,7 @@ class SubuserRepository extends EloquentRepository implements SubuserRepositoryI
* Return a subuser with the associated permissions relationship.
*
* @param \Pterodactyl\Models\Subuser $subuser
* @param bool $refresh
* @param bool $refresh
* @return \Pterodactyl\Models\Subuser
*/
public function getWithPermissions(Subuser $subuser, bool $refresh = false): Subuser