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

@ -39,7 +39,7 @@ return PhpCsFixer\Config::create()
'ordered_imports' => [
'sortAlgorithm' => 'length',
],
'phpdoc_align' => ['tags' => ['param']],
'phpdoc_align' => false,
'phpdoc_separation' => false,
'protected_to_private' => false,
'psr0' => ['dir' => 'app'],

View file

@ -79,7 +79,7 @@ class AppSettingsCommand extends Command
* AppSettingsCommand constructor.
*
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Contracts\Console\Kernel $command
* @param \Illuminate\Contracts\Console\Kernel $command
*/
public function __construct(ConfigRepository $config, Kernel $command)
{
@ -102,41 +102,41 @@ class AppSettingsCommand extends Command
$this->output->comment(trans('command/messages.environment.app.author_help'));
$this->variables['APP_SERVICE_AUTHOR'] = $this->option('author') ?? $this->ask(
trans('command/messages.environment.app.author'), $this->config->get('pterodactyl.service.author', 'unknown@unknown.com')
);
trans('command/messages.environment.app.author'), $this->config->get('pterodactyl.service.author', 'unknown@unknown.com')
);
$this->output->comment(trans('command/messages.environment.app.app_url_help'));
$this->variables['APP_URL'] = $this->option('url') ?? $this->ask(
trans('command/messages.environment.app.app_url'), $this->config->get('app.url', 'http://example.org')
);
trans('command/messages.environment.app.app_url'), $this->config->get('app.url', 'http://example.org')
);
$this->output->comment(trans('command/messages.environment.app.timezone_help'));
$this->variables['APP_TIMEZONE'] = $this->option('timezone') ?? $this->anticipate(
trans('command/messages.environment.app.timezone'),
DateTimeZone::listIdentifiers(DateTimeZone::ALL),
$this->config->get('app.timezone')
);
trans('command/messages.environment.app.timezone'),
DateTimeZone::listIdentifiers(DateTimeZone::ALL),
$this->config->get('app.timezone')
);
$selected = $this->config->get('cache.default', 'redis');
$this->variables['CACHE_DRIVER'] = $this->option('cache') ?? $this->choice(
trans('command/messages.environment.app.cache_driver'),
self::ALLOWED_CACHE_DRIVERS,
array_key_exists($selected, self::ALLOWED_CACHE_DRIVERS) ? $selected : null
);
trans('command/messages.environment.app.cache_driver'),
self::ALLOWED_CACHE_DRIVERS,
array_key_exists($selected, self::ALLOWED_CACHE_DRIVERS) ? $selected : null
);
$selected = $this->config->get('session.driver', 'redis');
$this->variables['SESSION_DRIVER'] = $this->option('session') ?? $this->choice(
trans('command/messages.environment.app.session_driver'),
self::ALLOWED_SESSION_DRIVERS,
array_key_exists($selected, self::ALLOWED_SESSION_DRIVERS) ? $selected : null
);
trans('command/messages.environment.app.session_driver'),
self::ALLOWED_SESSION_DRIVERS,
array_key_exists($selected, self::ALLOWED_SESSION_DRIVERS) ? $selected : null
);
$selected = $this->config->get('queue.default', 'redis');
$this->variables['QUEUE_CONNECTION'] = $this->option('queue') ?? $this->choice(
trans('command/messages.environment.app.queue_driver'),
self::ALLOWED_QUEUE_DRIVERS,
array_key_exists($selected, self::ALLOWED_QUEUE_DRIVERS) ? $selected : null
);
trans('command/messages.environment.app.queue_driver'),
self::ALLOWED_QUEUE_DRIVERS,
array_key_exists($selected, self::ALLOWED_QUEUE_DRIVERS) ? $selected : null
);
if (! is_null($this->option('settings-ui'))) {
$this->variables['APP_ENVIRONMENT_ONLY'] = $this->option('settings-ui') == 'true' ? 'false' : 'true';
@ -166,8 +166,8 @@ class AppSettingsCommand extends Command
$this->output->note(trans('command/messages.environment.app.using_redis'));
$this->variables['REDIS_HOST'] = $this->option('redis-host') ?? $this->ask(
trans('command/messages.environment.app.redis_host'), $this->config->get('database.redis.default.host')
);
trans('command/messages.environment.app.redis_host'), $this->config->get('database.redis.default.host')
);
$askForRedisPassword = true;
if (! empty($this->config->get('database.redis.default.password'))) {
@ -178,8 +178,8 @@ class AppSettingsCommand extends Command
if ($askForRedisPassword) {
$this->output->comment(trans('command/messages.environment.app.redis_pass_help'));
$this->variables['REDIS_PASSWORD'] = $this->option('redis-pass') ?? $this->output->askHidden(
trans('command/messages.environment.app.redis_password')
);
trans('command/messages.environment.app.redis_password')
);
}
if (empty($this->variables['REDIS_PASSWORD'])) {
@ -187,7 +187,7 @@ class AppSettingsCommand extends Command
}
$this->variables['REDIS_PORT'] = $this->option('redis-port') ?? $this->ask(
trans('command/messages.environment.app.redis_port'), $this->config->get('database.redis.default.port')
);
trans('command/messages.environment.app.redis_port'), $this->config->get('database.redis.default.port')
);
}
}

View file

@ -59,8 +59,8 @@ class DatabaseSettingsCommand extends Command
* DatabaseSettingsCommand constructor.
*
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Database\DatabaseManager $database
* @param \Illuminate\Contracts\Console\Kernel $console
* @param \Illuminate\Database\DatabaseManager $database
* @param \Illuminate\Contracts\Console\Kernel $console
*/
public function __construct(ConfigRepository $config, DatabaseManager $database, Kernel $console)
{
@ -82,21 +82,21 @@ class DatabaseSettingsCommand extends Command
{
$this->output->note(trans('command/messages.environment.database.host_warning'));
$this->variables['DB_HOST'] = $this->option('host') ?? $this->ask(
trans('command/messages.environment.database.host'), $this->config->get('database.connections.mysql.host', '127.0.0.1')
);
trans('command/messages.environment.database.host'), $this->config->get('database.connections.mysql.host', '127.0.0.1')
);
$this->variables['DB_PORT'] = $this->option('port') ?? $this->ask(
trans('command/messages.environment.database.port'), $this->config->get('database.connections.mysql.port', 3306)
);
trans('command/messages.environment.database.port'), $this->config->get('database.connections.mysql.port', 3306)
);
$this->variables['DB_DATABASE'] = $this->option('database') ?? $this->ask(
trans('command/messages.environment.database.database'), $this->config->get('database.connections.mysql.database', 'panel')
);
trans('command/messages.environment.database.database'), $this->config->get('database.connections.mysql.database', 'panel')
);
$this->output->note(trans('command/messages.environment.database.username_warning'));
$this->variables['DB_USERNAME'] = $this->option('username') ?? $this->ask(
trans('command/messages.environment.database.username'), $this->config->get('database.connections.mysql.username', 'pterodactyl')
);
trans('command/messages.environment.database.username'), $this->config->get('database.connections.mysql.username', 'pterodactyl')
);
$askForMySQLPassword = true;
if (! empty($this->config->get('database.connections.mysql.password')) && $this->input->isInteractive()) {
@ -136,15 +136,15 @@ class DatabaseSettingsCommand extends Command
private function testMySQLConnection()
{
$this->config->set('database.connections._pterodactyl_command_test', [
'driver' => 'mysql',
'host' => $this->variables['DB_HOST'],
'port' => $this->variables['DB_PORT'],
'database' => $this->variables['DB_DATABASE'],
'username' => $this->variables['DB_USERNAME'],
'password' => $this->variables['DB_PASSWORD'],
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'strict' => true,
'driver' => 'mysql',
'host' => $this->variables['DB_HOST'],
'port' => $this->variables['DB_PORT'],
'database' => $this->variables['DB_DATABASE'],
'username' => $this->variables['DB_USERNAME'],
'password' => $this->variables['DB_PASSWORD'],
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'strict' => true,
]);
$this->database->connection('_pterodactyl_command_test')->getPdo();

View file

@ -59,19 +59,20 @@ class EmailSettingsCommand extends Command
/**
* Handle command execution.
*
* @throws \Pterodactyl\Exceptions\PterodactylException
*/
public function handle()
{
$this->variables['MAIL_DRIVER'] = $this->option('driver') ?? $this->choice(
trans('command/messages.environment.mail.ask_driver'), [
trans('command/messages.environment.mail.ask_driver'), [
'smtp' => 'SMTP Server',
'mail' => 'PHP\'s Internal Mail Function',
'mailgun' => 'Mailgun Transactional Email',
'mandrill' => 'Mandrill Transactional Email',
'postmark' => 'Postmarkapp Transactional Email',
], $this->config->get('mail.driver', 'smtp')
);
);
$method = 'setup' . studly_case($this->variables['MAIL_DRIVER']) . 'DriverVariables';
if (method_exists($this, $method)) {
@ -79,16 +80,16 @@ class EmailSettingsCommand extends Command
}
$this->variables['MAIL_FROM'] = $this->option('email') ?? $this->ask(
trans('command/messages.environment.mail.ask_mail_from'), $this->config->get('mail.from.address')
);
trans('command/messages.environment.mail.ask_mail_from'), $this->config->get('mail.from.address')
);
$this->variables['MAIL_FROM_NAME'] = $this->option('from') ?? $this->ask(
trans('command/messages.environment.mail.ask_mail_name'), $this->config->get('mail.from.name')
);
trans('command/messages.environment.mail.ask_mail_name'), $this->config->get('mail.from.name')
);
$this->variables['MAIL_ENCRYPTION'] = $this->option('encryption') ?? $this->choice(
trans('command/messages.environment.mail.ask_encryption'), ['tls' => 'TLS', 'ssl' => 'SSL', '' => 'None'], $this->config->get('mail.encryption', 'tls')
);
trans('command/messages.environment.mail.ask_encryption'), ['tls' => 'TLS', 'ssl' => 'SSL', '' => 'None'], $this->config->get('mail.encryption', 'tls')
);
$this->writeToEnvironment($this->variables);
@ -102,20 +103,20 @@ class EmailSettingsCommand extends Command
private function setupSmtpDriverVariables()
{
$this->variables['MAIL_HOST'] = $this->option('host') ?? $this->ask(
trans('command/messages.environment.mail.ask_smtp_host'), $this->config->get('mail.host')
);
trans('command/messages.environment.mail.ask_smtp_host'), $this->config->get('mail.host')
);
$this->variables['MAIL_PORT'] = $this->option('port') ?? $this->ask(
trans('command/messages.environment.mail.ask_smtp_port'), $this->config->get('mail.port')
);
trans('command/messages.environment.mail.ask_smtp_port'), $this->config->get('mail.port')
);
$this->variables['MAIL_USERNAME'] = $this->option('username') ?? $this->ask(
trans('command/messages.environment.mail.ask_smtp_username'), $this->config->get('mail.username')
);
trans('command/messages.environment.mail.ask_smtp_username'), $this->config->get('mail.username')
);
$this->variables['MAIL_PASSWORD'] = $this->option('password') ?? $this->secret(
trans('command/messages.environment.mail.ask_smtp_password')
);
trans('command/messages.environment.mail.ask_smtp_password')
);
}
/**
@ -124,12 +125,12 @@ class EmailSettingsCommand extends Command
private function setupMailgunDriverVariables()
{
$this->variables['MAILGUN_DOMAIN'] = $this->option('host') ?? $this->ask(
trans('command/messages.environment.mail.ask_mailgun_domain'), $this->config->get('services.mailgun.domain')
);
trans('command/messages.environment.mail.ask_mailgun_domain'), $this->config->get('services.mailgun.domain')
);
$this->variables['MAILGUN_SECRET'] = $this->option('password') ?? $this->ask(
trans('command/messages.environment.mail.ask_mailgun_secret'), $this->config->get('services.mailgun.secret')
);
trans('command/messages.environment.mail.ask_mailgun_secret'), $this->config->get('services.mailgun.secret')
);
}
/**
@ -138,8 +139,8 @@ class EmailSettingsCommand extends Command
private function setupMandrillDriverVariables()
{
$this->variables['MANDRILL_SECRET'] = $this->option('password') ?? $this->ask(
trans('command/messages.environment.mail.ask_mandrill_secret'), $this->config->get('services.mandrill.secret')
);
trans('command/messages.environment.mail.ask_mandrill_secret'), $this->config->get('services.mandrill.secret')
);
}
/**
@ -151,7 +152,7 @@ class EmailSettingsCommand extends Command
$this->variables['MAIL_HOST'] = 'smtp.postmarkapp.com';
$this->variables['MAIL_PORT'] = 587;
$this->variables['MAIL_USERNAME'] = $this->variables['MAIL_PASSWORD'] = $this->option('username') ?? $this->ask(
trans('command/messages.environment.mail.ask_postmark_username'), $this->config->get('mail.username')
);
trans('command/messages.environment.mail.ask_postmark_username'), $this->config->get('mail.username')
);
}
}

View file

@ -38,7 +38,7 @@ class InfoCommand extends Command
/**
* VersionCommand constructor.
*
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Pterodactyl\Services\Helpers\SoftwareVersionService $versionService
*/
public function __construct(ConfigRepository $config, SoftwareVersionService $versionService)

View file

@ -44,7 +44,7 @@ class DeleteLocationCommand extends Command
* DeleteLocationCommand constructor.
*
* @param \Pterodactyl\Contracts\Repository\LocationRepositoryInterface $repository
* @param \Pterodactyl\Services\Locations\LocationDeletionService $deletionService
* @param \Pterodactyl\Services\Locations\LocationDeletionService $deletionService
*/
public function __construct(
LocationDeletionService $deletionService,
@ -66,8 +66,8 @@ class DeleteLocationCommand extends Command
{
$this->locations = $this->locations ?? $this->repository->all();
$short = $this->option('short') ?? $this->anticipate(
trans('command/messages.location.ask_short'), $this->locations->pluck('short')->toArray()
);
trans('command/messages.location.ask_short'), $this->locations->pluck('short')->toArray()
);
$location = $this->locations->where('short', $short)->first();
if (is_null($location)) {

View file

@ -40,7 +40,7 @@ class ProcessRunnableCommand extends Command
/**
* ProcessRunnableCommand constructor.
*
* @param \Pterodactyl\Services\Schedules\ProcessScheduleService $processScheduleService
* @param \Pterodactyl\Services\Schedules\ProcessScheduleService $processScheduleService
* @param \Pterodactyl\Contracts\Repository\ScheduleRepositoryInterface $repository
*/
public function __construct(ProcessScheduleService $processScheduleService, ScheduleRepositoryInterface $repository)

View file

@ -43,8 +43,8 @@ class BulkPowerActionCommand extends Command
* BulkPowerActionCommand constructor.
*
* @param \Pterodactyl\Contracts\Repository\Daemon\PowerRepositoryInterface $powerRepository
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
* @param \Illuminate\Validation\Factory $validator
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
* @param \Illuminate\Validation\Factory $validator
*/
public function __construct(
PowerRepositoryInterface $powerRepository,

View file

@ -48,9 +48,9 @@ class BulkReinstallActionCommand extends Command
/**
* BulkReinstallActionCommand constructor.
*
* @param \Pterodactyl\Repositories\Wings\DaemonServerRepository $daemonRepository
* @param \Pterodactyl\Repositories\Wings\DaemonServerRepository $daemonRepository
* @param \Pterodactyl\Services\Servers\ServerConfigurationStructureService $configurationStructureService
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
*/
public function __construct(
DaemonServerRepository $daemonRepository,

View file

@ -48,9 +48,9 @@ class RebuildServerCommand extends Command
/**
* RebuildServerCommand constructor.
*
* @param \Pterodactyl\Repositories\Wings\DaemonServerRepository $daemonRepository
* @param \Pterodactyl\Repositories\Wings\DaemonServerRepository $daemonRepository
* @param \Pterodactyl\Services\Servers\ServerConfigurationStructureService $configurationStructureService
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
*/
public function __construct(
DaemonServerRepository $daemonRepository,

View file

@ -39,7 +39,7 @@ class DeleteUserCommand extends Command
/**
* DeleteUserCommand constructor.
*
* @param \Pterodactyl\Services\Users\UserDeletionService $deletionService
* @param \Pterodactyl\Services\Users\UserDeletionService $deletionService
* @param \Pterodactyl\Contracts\Repository\UserRepositoryInterface $repository
*/
public function __construct(

View file

@ -16,7 +16,7 @@ interface CriteriaInterface
/**
* Apply selected criteria to a repository call.
*
* @param \Illuminate\Database\Eloquent\Model $model
* @param \Illuminate\Database\Eloquent\Model $model
* @param \Pterodactyl\Repositories\Repository $repository
* @return mixed
*/

View file

@ -17,7 +17,7 @@ interface HashidsInterface extends VendorHashidsInterface
* Decode an encoded hashid and return the first result.
*
* @param string $encoded
* @param null $default
* @param null $default
* @return mixed
*
* @throws \InvalidArgumentException

View file

@ -11,7 +11,7 @@ interface AllocationRepositoryInterface extends RepositoryInterface
* 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;
@ -76,7 +76,7 @@ interface AllocationRepositoryInterface extends RepositoryInterface
*
* @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

@ -27,7 +27,7 @@ interface ApiKeyRepositoryInterface extends RepositoryInterface
* 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;
@ -36,7 +36,7 @@ interface ApiKeyRepositoryInterface extends RepositoryInterface
* 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

@ -23,7 +23,7 @@ interface FileRepositoryInterface extends BaseRepositoryInterface
/**
* Return the contents of a given file if it can be edited in the Panel.
*
* @param string $path
* @param string $path
* @param int|null $notLargerThan
* @return string
*/

View file

@ -17,7 +17,7 @@ interface DaemonKeyRepositoryInterface extends RepositoryInterface
* 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

@ -35,7 +35,7 @@ interface EggRepositoryInterface extends RepositoryInterface
* 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
*/
public function getWithCopyAttributes($value, string $column = 'id'): Egg;

View file

@ -40,7 +40,7 @@ interface NodeRepositoryInterface extends RepositoryInterface, SearchableInterfa
* 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;
@ -50,7 +50,7 @@ interface NodeRepositoryInterface extends RepositoryInterface, SearchableInterfa
* 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;
@ -67,8 +67,8 @@ interface NodeRepositoryInterface extends RepositoryInterface, SearchableInterfa
* 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

@ -12,7 +12,7 @@ interface PackRepositoryInterface extends RepositoryInterface, SearchableInterfa
* 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

@ -71,8 +71,8 @@ interface RepositoryInterface
* Create a new model instance and persist it to the database.
*
* @param array $fields
* @param bool $validate
* @param bool $force
* @param bool $validate
* @param bool $force
* @return mixed
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
@ -134,10 +134,10 @@ interface RepositoryInterface
/**
* 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 mixed
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
@ -150,8 +150,8 @@ interface RepositoryInterface
* 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;
@ -161,8 +161,8 @@ interface RepositoryInterface
*
* @param array $where
* @param array $fields
* @param bool $validate
* @param bool $force
* @param bool $validate
* @param bool $force
* @return mixed
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException

View file

@ -20,7 +20,7 @@ interface ScheduleRepositoryInterface extends RepositoryInterface
* 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

@ -22,7 +22,7 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
* 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;
@ -61,7 +61,7 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
* 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;
@ -70,7 +70,7 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
* 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
*
@ -82,7 +82,7 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
* 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;
@ -91,7 +91,7 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
* 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;
@ -102,7 +102,7 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
* 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;
@ -111,8 +111,8 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
* 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\Pagination\LengthAwarePaginator|\Illuminate\Database\Eloquent\Collection
*/
public function filterUserAccessServers(User $user, int $level, $paginate = 25);
@ -132,7 +132,7 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
*
* @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

@ -17,7 +17,7 @@ interface SessionRepositoryInterface extends RepositoryInterface
/**
* Delete a session for a given user.
*
* @param int $user
* @param int $user
* @param string $session
* @return null|int
*/

View file

@ -7,7 +7,7 @@ interface SettingsRepositoryInterface extends RepositoryInterface
/**
* Store a new persistent setting in the database.
*
* @param string $key
* @param string $key
* @param string|null $value
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
@ -19,7 +19,7 @@ interface SettingsRepositoryInterface extends RepositoryInterface
* Retrieve a persistent setting from the database.
*
* @param string $key
* @param mixed $default
* @param mixed $default
* @return mixed
*/
public function get(string $key, $default);

View file

@ -10,7 +10,7 @@ interface SubuserRepositoryInterface extends RepositoryInterface
* 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;
@ -19,7 +19,7 @@ interface SubuserRepositoryInterface extends RepositoryInterface
* 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;

View file

@ -9,6 +9,8 @@
namespace Pterodactyl\Exceptions;
class AccountNotFoundException extends \Exception
use Exception;
class AccountNotFoundException extends Exception
{
}

View file

@ -9,6 +9,8 @@
namespace Pterodactyl\Exceptions;
class AutoDeploymentException extends \Exception
use Exception;
class AutoDeploymentException extends Exception
{
}

View file

@ -24,10 +24,10 @@ class DisplayException extends PterodactylException
/**
* Exception constructor.
*
* @param string $message
* @param string $message
* @param Throwable|null $previous
* @param string $level
* @param int $code
* @param string $level
* @param int $code
*/
public function __construct($message, Throwable $previous = null, $level = self::LEVEL_ERROR, $code = 0)
{

View file

@ -131,7 +131,7 @@ class Handler extends ExceptionHandler
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @param \Exception $exception
* @return \Symfony\Component\HttpFoundation\Response
*
* @throws \Exception
@ -160,7 +160,7 @@ class Handler extends ExceptionHandler
* Transform a validation exception into a consistent format to be returned for
* calls to the API.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Validation\ValidationException $exception
* @return \Illuminate\Http\JsonResponse
*/
@ -199,7 +199,7 @@ class Handler extends ExceptionHandler
* Return the exception as a JSONAPI representation for use on API requests.
*
* @param \Exception $exception
* @param array $override
* @param array $override
* @return array
*/
public static function convertToArray(Exception $exception, array $override = []): array
@ -240,7 +240,7 @@ class Handler extends ExceptionHandler
/**
* Convert an authentication exception into an unauthenticated response.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @return \Illuminate\Http\Response
*/

View file

@ -17,7 +17,7 @@ class DaemonConnectionException extends DisplayException
* Throw a displayable exception caused by a daemon connection error.
*
* @param \GuzzleHttp\Exception\GuzzleException $previous
* @param bool $useStatusCode
* @param bool $useStatusCode
*/
public function __construct(GuzzleException $previous, bool $useStatusCode = false)
{

View file

@ -2,6 +2,8 @@
namespace Pterodactyl\Exceptions;
class PterodactylException extends \Exception
use Exception;
class PterodactylException extends Exception
{
}

View file

@ -9,6 +9,8 @@
namespace Pterodactyl\Exceptions\Service\Helper;
class CdnVersionFetchingException extends \Exception
use Exception;
class CdnVersionFetchingException extends Exception
{
}

View file

@ -9,6 +9,8 @@
namespace Pterodactyl\Exceptions\Service\Pack;
class ZipArchiveCreationException extends \Exception
use Exception;
class ZipArchiveCreationException extends Exception
{
}

View file

@ -9,6 +9,8 @@
namespace Pterodactyl\Exceptions\Service\User;
class TwoFactorAuthenticationTokenInvalid extends \Exception
use Exception;
class TwoFactorAuthenticationTokenInvalid extends Exception
{
}

View file

@ -38,9 +38,9 @@ class DynamicDatabaseConnection
/**
* DynamicDatabaseConnection constructor.
*
* @param \Illuminate\Config\Repository $config
* @param \Illuminate\Config\Repository $config
* @param \Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface $repository
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
*/
public function __construct(
ConfigRepository $config,
@ -55,9 +55,9 @@ class DynamicDatabaseConnection
/**
* Adds a dynamic database connection entry to the runtime config.
*
* @param string $connection
* @param string $connection
* @param \Pterodactyl\Models\DatabaseHost|int $host
* @param string $database
* @param string $database
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/

View file

@ -10,7 +10,7 @@ class PterodactylSerializer extends ArraySerializer
* Serialize an item.
*
* @param string $resourceKey
* @param array $data
* @param array $data
* @return array
*/
public function item($resourceKey, array $data)
@ -25,7 +25,7 @@ class PterodactylSerializer extends ArraySerializer
* Serialize a collection.
*
* @param string $resourceKey
* @param array $data
* @param array $data
* @return array
*/
public function collection($resourceKey, array $data)

View file

@ -34,9 +34,9 @@ class ApiController extends Controller
/**
* ApplicationApiController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Contracts\Repository\ApiKeyRepositoryInterface $repository
* @param \Pterodactyl\Services\Api\KeyCreationService $keyCreationService
* @param \Pterodactyl\Services\Api\KeyCreationService $keyCreationService
*/
public function __construct(
AlertsMessageBag $alert,
@ -106,7 +106,7 @@ class ApiController extends Controller
* Delete an application API key from the database.
*
* @param \Illuminate\Http\Request $request
* @param string $identifier
* @param string $identifier
* @return \Illuminate\Http\Response
*/
public function delete(Request $request, string $identifier): Response

View file

@ -57,13 +57,13 @@ class DatabaseController extends Controller
/**
* DatabaseController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface $repository
* @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $databaseRepository
* @param \Pterodactyl\Services\Databases\Hosts\HostCreationService $creationService
* @param \Pterodactyl\Services\Databases\Hosts\HostDeletionService $deletionService
* @param \Pterodactyl\Services\Databases\Hosts\HostUpdateService $updateService
* @param \Pterodactyl\Contracts\Repository\LocationRepositoryInterface $locationRepository
* @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $databaseRepository
* @param \Pterodactyl\Services\Databases\Hosts\HostCreationService $creationService
* @param \Pterodactyl\Services\Databases\Hosts\HostDeletionService $deletionService
* @param \Pterodactyl\Services\Databases\Hosts\HostUpdateService $updateService
* @param \Pterodactyl\Contracts\Repository\LocationRepositoryInterface $locationRepository
*/
public function __construct(
AlertsMessageBag $alert,
@ -146,7 +146,7 @@ class DatabaseController extends Controller
* Handle updating database host.
*
* @param \Pterodactyl\Http\Requests\Admin\DatabaseHostFormRequest $request
* @param \Pterodactyl\Models\DatabaseHost $host
* @param \Pterodactyl\Models\DatabaseHost $host
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Throwable

View file

@ -49,11 +49,11 @@ class LocationController extends Controller
/**
* LocationController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Services\Locations\LocationCreationService $creationService
* @param \Pterodactyl\Services\Locations\LocationDeletionService $deletionService
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Services\Locations\LocationCreationService $creationService
* @param \Pterodactyl\Services\Locations\LocationDeletionService $deletionService
* @param \Pterodactyl\Contracts\Repository\LocationRepositoryInterface $repository
* @param \Pterodactyl\Services\Locations\LocationUpdateService $updateService
* @param \Pterodactyl\Services\Locations\LocationUpdateService $updateService
*/
public function __construct(
AlertsMessageBag $alert,
@ -116,7 +116,7 @@ class LocationController extends Controller
* Handle request to update or delete location.
*
* @param \Pterodactyl\Http\Requests\Admin\LocationFormRequest $request
* @param \Pterodactyl\Models\Location $location
* @param \Pterodactyl\Models\Location $location
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Throwable

View file

@ -25,10 +25,15 @@ use Pterodactyl\Contracts\Repository\NestRepositoryInterface;
class EggController extends Controller
{
protected $alert;
protected $creationService;
protected $deletionService;
protected $nestRepository;
protected $repository;
protected $updateService;
public function __construct(
@ -94,7 +99,7 @@ class EggController extends Controller
* Handle request to update an Egg.
*
* @param \Pterodactyl\Http\Requests\Admin\Egg\EggFormRequest $request
* @param \Pterodactyl\Models\Egg $egg
* @param \Pterodactyl\Models\Egg $egg
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException

View file

@ -37,9 +37,9 @@ class EggScriptController extends Controller
/**
* EggScriptController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Contracts\Repository\EggRepositoryInterface $repository
* @param \Pterodactyl\Services\Eggs\Scripts\InstallScriptService $installScriptService
* @param \Pterodactyl\Services\Eggs\Scripts\InstallScriptService $installScriptService
*/
public function __construct(
AlertsMessageBag $alert,
@ -81,7 +81,7 @@ class EggScriptController extends Controller
* Handle a request to update the installation script for an Egg.
*
* @param \Pterodactyl\Http\Requests\Admin\Egg\EggScriptFormRequest $request
* @param int $egg
* @param int $egg
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException

View file

@ -44,9 +44,9 @@ class EggShareController extends Controller
/**
* OptionShareController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Services\Eggs\Sharing\EggExporterService $exporterService
* @param \Pterodactyl\Services\Eggs\Sharing\EggImporterService $importerService
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Services\Eggs\Sharing\EggExporterService $exporterService
* @param \Pterodactyl\Services\Eggs\Sharing\EggImporterService $importerService
* @param \Pterodactyl\Services\Eggs\Sharing\EggUpdateImporterService $updateImporterService
*/
public function __construct(
@ -102,7 +102,7 @@ class EggShareController extends Controller
* Update an existing Egg using a new imported file.
*
* @param \Pterodactyl\Http\Requests\Admin\Egg\EggImportFormRequest $request
* @param int $egg
* @param int $egg
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException

View file

@ -51,10 +51,10 @@ class EggVariableController extends Controller
/**
* EggVariableController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Services\Eggs\Variables\VariableCreationService $creationService
* @param \Pterodactyl\Services\Eggs\Variables\VariableUpdateService $updateService
* @param \Pterodactyl\Contracts\Repository\EggRepositoryInterface $repository
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Services\Eggs\Variables\VariableCreationService $creationService
* @param \Pterodactyl\Services\Eggs\Variables\VariableUpdateService $updateService
* @param \Pterodactyl\Contracts\Repository\EggRepositoryInterface $repository
* @param \Pterodactyl\Contracts\Repository\EggVariableRepositoryInterface $variableRepository
*/
public function __construct(
@ -109,8 +109,8 @@ class EggVariableController extends Controller
* Handle a request to update an existing Egg variable.
*
* @param \Pterodactyl\Http\Requests\Admin\Egg\EggVariableFormRequest $request
* @param \Pterodactyl\Models\Egg $egg
* @param \Pterodactyl\Models\EggVariable $variable
* @param \Pterodactyl\Models\Egg $egg
* @param \Pterodactyl\Models\EggVariable $variable
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Pterodactyl\Exceptions\DisplayException
@ -131,7 +131,7 @@ class EggVariableController extends Controller
/**
* Handle a request to delete an existing Egg variable from the Panel.
*
* @param int $egg
* @param int $egg
* @param \Pterodactyl\Models\EggVariable $variable
* @return \Illuminate\Http\RedirectResponse
*/

View file

@ -49,11 +49,11 @@ class NestController extends Controller
/**
* NestController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Services\Nests\NestCreationService $nestCreationService
* @param \Pterodactyl\Services\Nests\NestDeletionService $nestDeletionService
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Services\Nests\NestCreationService $nestCreationService
* @param \Pterodactyl\Services\Nests\NestDeletionService $nestDeletionService
* @param \Pterodactyl\Contracts\Repository\NestRepositoryInterface $repository
* @param \Pterodactyl\Services\Nests\NestUpdateService $nestUpdateService
* @param \Pterodactyl\Services\Nests\NestUpdateService $nestUpdateService
*/
public function __construct(
AlertsMessageBag $alert,
@ -128,7 +128,7 @@ class NestController extends Controller
* Handle request to update a nest.
*
* @param \Pterodactyl\Http\Requests\Admin\Nest\StoreNestFormRequest $request
* @param int $nest
* @param int $nest
*
* @return \Illuminate\Http\RedirectResponse
* @throws \Pterodactyl\Exceptions\Model\DataValidationException

View file

@ -97,18 +97,18 @@ class NodesController extends Controller
/**
* NodesController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Services\Allocations\AllocationDeletionService $allocationDeletionService
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Services\Allocations\AllocationDeletionService $allocationDeletionService
* @param \Pterodactyl\Contracts\Repository\AllocationRepositoryInterface $allocationRepository
* @param \Pterodactyl\Services\Allocations\AssignmentService $assignmentService
* @param \Illuminate\Cache\Repository $cache
* @param \Pterodactyl\Services\Nodes\NodeCreationService $creationService
* @param \Pterodactyl\Services\Nodes\NodeDeletionService $deletionService
* @param \Pterodactyl\Contracts\Repository\LocationRepositoryInterface $locationRepository
* @param \Pterodactyl\Contracts\Repository\NodeRepositoryInterface $repository
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $serverRepository
* @param \Pterodactyl\Services\Nodes\NodeUpdateService $updateService
* @param \Pterodactyl\Services\Helpers\SoftwareVersionService $versionService
* @param \Pterodactyl\Services\Allocations\AssignmentService $assignmentService
* @param \Illuminate\Cache\Repository $cache
* @param \Pterodactyl\Services\Nodes\NodeCreationService $creationService
* @param \Pterodactyl\Services\Nodes\NodeDeletionService $deletionService
* @param \Pterodactyl\Contracts\Repository\LocationRepositoryInterface $locationRepository
* @param \Pterodactyl\Contracts\Repository\NodeRepositoryInterface $repository
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $serverRepository
* @param \Pterodactyl\Services\Nodes\NodeUpdateService $updateService
* @param \Pterodactyl\Services\Helpers\SoftwareVersionService $versionService
*/
public function __construct(
AlertsMessageBag $alert,
@ -261,7 +261,7 @@ class NodesController extends Controller
* Updates settings for a node.
*
* @param \Pterodactyl\Http\Requests\Admin\Node\NodeFormRequest $request
* @param \Pterodactyl\Models\Node $node
* @param \Pterodactyl\Models\Node $node
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Pterodactyl\Exceptions\DisplayException
@ -279,7 +279,7 @@ class NodesController extends Controller
/**
* Removes a single allocation from a node.
*
* @param int $node
* @param int $node
* @param \Pterodactyl\Models\Allocation $allocation
* @return \Illuminate\Http\Response
*
@ -296,7 +296,7 @@ class NodesController extends Controller
* Removes multiple individual allocations from a node.
*
* @param \Illuminate\Http\Request $request
* @param int $node
* @param int $node
* @return \Illuminate\Http\Response
*
* @throws \Pterodactyl\Exceptions\Service\Allocation\ServerUsingAllocationException
@ -317,7 +317,7 @@ class NodesController extends Controller
* Remove all allocations for a specific IP at once on a node.
*
* @param \Illuminate\Http\Request $request
* @param int $node
* @param int $node
* @return \Illuminate\Http\RedirectResponse
*/
public function allocationRemoveBlock(Request $request, $node)
@ -356,7 +356,7 @@ class NodesController extends Controller
* Creates new allocations on a node.
*
* @param \Pterodactyl\Http\Requests\Admin\Node\AllocationFormRequest $request
* @param int|\Pterodactyl\Models\Node $node
* @param int|\Pterodactyl\Models\Node $node
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Pterodactyl\Exceptions\Service\Allocation\CidrOutOfRangeException

View file

@ -73,15 +73,15 @@ class PackController extends Controller
/**
* PackController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Pterodactyl\Services\Packs\ExportPackService $exportService
* @param \Pterodactyl\Services\Packs\PackCreationService $creationService
* @param \Pterodactyl\Services\Packs\PackDeletionService $deletionService
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Pterodactyl\Services\Packs\ExportPackService $exportService
* @param \Pterodactyl\Services\Packs\PackCreationService $creationService
* @param \Pterodactyl\Services\Packs\PackDeletionService $deletionService
* @param \Pterodactyl\Contracts\Repository\PackRepositoryInterface $repository
* @param \Pterodactyl\Services\Packs\PackUpdateService $updateService
* @param \Pterodactyl\Services\Packs\PackUpdateService $updateService
* @param \Pterodactyl\Contracts\Repository\NestRepositoryInterface $serviceRepository
* @param \Pterodactyl\Services\Packs\TemplateUploadService $templateUploadService
* @param \Pterodactyl\Services\Packs\TemplateUploadService $templateUploadService
*/
public function __construct(
AlertsMessageBag $alert,
@ -191,7 +191,7 @@ class PackController extends Controller
* Handle updating or deleting pack information.
*
* @param \Pterodactyl\Http\Requests\Admin\PackFormRequest $request
* @param \Pterodactyl\Models\Pack $pack
* @param \Pterodactyl\Models\Pack $pack
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
@ -229,7 +229,7 @@ class PackController extends Controller
* Creates an archive of the pack and downloads it to the browser.
*
* @param \Pterodactyl\Models\Pack $pack
* @param bool|string $files
* @param bool|string $files
* @return \Symfony\Component\HttpFoundation\Response
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException

View file

@ -137,25 +137,25 @@ class ServersController extends Controller
/**
* ServersController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Contracts\Repository\AllocationRepositoryInterface $allocationRepository
* @param \Pterodactyl\Services\Servers\BuildModificationService $buildModificationService
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Pterodactyl\Services\Servers\ContainerRebuildService $containerRebuildService
* @param \Pterodactyl\Services\Servers\ServerCreationService $service
* @param \Pterodactyl\Services\Databases\DatabaseManagementService $databaseManagementService
* @param \Pterodactyl\Services\Databases\DatabasePasswordService $databasePasswordService
* @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $databaseRepository
* @param \Pterodactyl\Repositories\Eloquent\DatabaseHostRepository $databaseHostRepository
* @param \Pterodactyl\Services\Servers\ServerDeletionService $deletionService
* @param \Pterodactyl\Services\Servers\DetailsModificationService $detailsModificationService
* @param \Pterodactyl\Contracts\Repository\LocationRepositoryInterface $locationRepository
* @param \Pterodactyl\Contracts\Repository\NodeRepositoryInterface $nodeRepository
* @param \Pterodactyl\Services\Servers\ReinstallServerService $reinstallService
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
* @param \Pterodactyl\Contracts\Repository\NestRepositoryInterface $nestRepository
* @param \Pterodactyl\Services\Servers\StartupModificationService $startupModificationService
* @param \Pterodactyl\Services\Servers\SuspensionService $suspensionService
* @param \Pterodactyl\Services\Servers\BuildModificationService $buildModificationService
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Pterodactyl\Services\Servers\ContainerRebuildService $containerRebuildService
* @param \Pterodactyl\Services\Servers\ServerCreationService $service
* @param \Pterodactyl\Services\Databases\DatabaseManagementService $databaseManagementService
* @param \Pterodactyl\Services\Databases\DatabasePasswordService $databasePasswordService
* @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $databaseRepository
* @param \Pterodactyl\Repositories\Eloquent\DatabaseHostRepository $databaseHostRepository
* @param \Pterodactyl\Services\Servers\ServerDeletionService $deletionService
* @param \Pterodactyl\Services\Servers\DetailsModificationService $detailsModificationService
* @param \Pterodactyl\Contracts\Repository\LocationRepositoryInterface $locationRepository
* @param \Pterodactyl\Contracts\Repository\NodeRepositoryInterface $nodeRepository
* @param \Pterodactyl\Services\Servers\ReinstallServerService $reinstallService
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
* @param \Pterodactyl\Contracts\Repository\NestRepositoryInterface $nestRepository
* @param \Pterodactyl\Services\Servers\StartupModificationService $startupModificationService
* @param \Pterodactyl\Services\Servers\SuspensionService $suspensionService
*/
public function __construct(
AlertsMessageBag $alert,
@ -402,7 +402,7 @@ class ServersController extends Controller
/**
* Update the details for a server.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Request $request
* @param \Pterodactyl\Models\Server $server
* @return \Illuminate\Http\RedirectResponse
*
@ -482,7 +482,7 @@ class ServersController extends Controller
/**
* Manage the suspension status for a server.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Request $request
* @param \Pterodactyl\Models\Server $server
* @return \Illuminate\Http\RedirectResponse
*
@ -503,7 +503,7 @@ class ServersController extends Controller
/**
* Update the build configuration for a server.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Request $request
* @param \Pterodactyl\Models\Server $server
* @return \Illuminate\Http\RedirectResponse
*
@ -526,7 +526,7 @@ class ServersController extends Controller
/**
* Start the server deletion process.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Request $request
* @param \Pterodactyl\Models\Server $server
* @return \Illuminate\Http\RedirectResponse
*
@ -544,7 +544,7 @@ class ServersController extends Controller
/**
* Update the startup command as well as variables.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Request $request
* @param \Pterodactyl\Models\Server $server
* @return \Illuminate\Http\RedirectResponse
*
@ -566,7 +566,7 @@ class ServersController extends Controller
* Creates a new database assigned to a specific server.
*
* @param \Pterodactyl\Http\Requests\Admin\Servers\Databases\StoreServerDatabaseRequest $request
* @param int $server
* @param int $server
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Exception
@ -586,7 +586,7 @@ class ServersController extends Controller
* Resets the database password for a specific database on this server.
*
* @param \Illuminate\Http\Request $request
* @param int $server
* @param int $server
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Throwable

View file

@ -36,9 +36,9 @@ class AdvancedController extends Controller
/**
* AdvancedController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Contracts\Console\Kernel $kernel
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Contracts\Console\Kernel $kernel
* @param \Pterodactyl\Contracts\Repository\SettingsRepositoryInterface $settings
*/
public function __construct(

View file

@ -39,10 +39,10 @@ class IndexController extends Controller
/**
* IndexController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Illuminate\Contracts\Console\Kernel $kernel
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Illuminate\Contracts\Console\Kernel $kernel
* @param \Pterodactyl\Contracts\Repository\SettingsRepositoryInterface $settings
* @param \Pterodactyl\Services\Helpers\SoftwareVersionService $versionService
* @param \Pterodactyl\Services\Helpers\SoftwareVersionService $versionService
*/
public function __construct(
AlertsMessageBag $alert,

View file

@ -48,10 +48,10 @@ class MailController extends Controller
/**
* MailController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
* @param \Illuminate\Contracts\Console\Kernel $kernel
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
* @param \Illuminate\Contracts\Console\Kernel $kernel
* @param \Pterodactyl\Contracts\Repository\SettingsRepositoryInterface $settings
*/
public function __construct(

View file

@ -52,11 +52,11 @@ class UserController extends Controller
/**
* UserController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Services\Users\UserCreationService $creationService
* @param \Pterodactyl\Services\Users\UserDeletionService $deletionService
* @param \Illuminate\Contracts\Translation\Translator $translator
* @param \Pterodactyl\Services\Users\UserUpdateService $updateService
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Services\Users\UserCreationService $creationService
* @param \Pterodactyl\Services\Users\UserDeletionService $deletionService
* @param \Illuminate\Contracts\Translation\Translator $translator
* @param \Pterodactyl\Services\Users\UserUpdateService $updateService
* @param \Pterodactyl\Contracts\Repository\UserRepositoryInterface $repository
*/
public function __construct(
@ -156,7 +156,7 @@ class UserController extends Controller
* Update a user on the system.
*
* @param \Pterodactyl\Http\Requests\Admin\UserFormRequest $request
* @param \Pterodactyl\Models\User $user
* @param \Pterodactyl\Models\User $user
* @return \Illuminate\Http\RedirectResponse
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException

View file

@ -47,7 +47,7 @@ abstract class ApplicationApiController extends Controller
* without littering the constructors of classes that extend this abstract.
*
* @param \Pterodactyl\Extensions\Spatie\Fractalistic\Fractal $fractal
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Request $request
*/
public function loadDependencies(Fractal $fractal, Request $request)
{

View file

@ -42,10 +42,10 @@ class LocationController extends ApplicationApiController
/**
* LocationController constructor.
*
* @param \Pterodactyl\Services\Locations\LocationCreationService $creationService
* @param \Pterodactyl\Services\Locations\LocationDeletionService $deletionService
* @param \Pterodactyl\Services\Locations\LocationCreationService $creationService
* @param \Pterodactyl\Services\Locations\LocationDeletionService $deletionService
* @param \Pterodactyl\Contracts\Repository\LocationRepositoryInterface $repository
* @param \Pterodactyl\Services\Locations\LocationUpdateService $updateService
* @param \Pterodactyl\Services\Locations\LocationUpdateService $updateService
*/
public function __construct(
LocationCreationService $creationService,

View file

@ -34,8 +34,8 @@ class AllocationController extends ApplicationApiController
/**
* AllocationController constructor.
*
* @param \Pterodactyl\Services\Allocations\AssignmentService $assignmentService
* @param \Pterodactyl\Services\Allocations\AllocationDeletionService $deletionService
* @param \Pterodactyl\Services\Allocations\AssignmentService $assignmentService
* @param \Pterodactyl\Services\Allocations\AllocationDeletionService $deletionService
* @param \Pterodactyl\Contracts\Repository\AllocationRepositoryInterface $repository
*/
public function __construct(

View file

@ -42,9 +42,9 @@ class NodeController extends ApplicationApiController
/**
* NodeController constructor.
*
* @param \Pterodactyl\Services\Nodes\NodeCreationService $creationService
* @param \Pterodactyl\Services\Nodes\NodeDeletionService $deletionService
* @param \Pterodactyl\Services\Nodes\NodeUpdateService $updateService
* @param \Pterodactyl\Services\Nodes\NodeCreationService $creationService
* @param \Pterodactyl\Services\Nodes\NodeDeletionService $deletionService
* @param \Pterodactyl\Services\Nodes\NodeUpdateService $updateService
* @param \Pterodactyl\Contracts\Repository\NodeRepositoryInterface $repository
*/
public function __construct(

View file

@ -36,8 +36,8 @@ class DatabaseController extends ApplicationApiController
/**
* DatabaseController constructor.
*
* @param \Pterodactyl\Services\Databases\DatabaseManagementService $databaseManagementService
* @param \Pterodactyl\Services\Databases\DatabasePasswordService $databasePasswordService
* @param \Pterodactyl\Services\Databases\DatabaseManagementService $databaseManagementService
* @param \Pterodactyl\Services\Databases\DatabasePasswordService $databasePasswordService
* @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $repository
*/
public function __construct(

View file

@ -35,8 +35,8 @@ class ServerController extends ApplicationApiController
/**
* ServerController constructor.
*
* @param \Pterodactyl\Services\Servers\ServerCreationService $creationService
* @param \Pterodactyl\Services\Servers\ServerDeletionService $deletionService
* @param \Pterodactyl\Services\Servers\ServerCreationService $creationService
* @param \Pterodactyl\Services\Servers\ServerDeletionService $deletionService
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
*/
public function __construct(
@ -104,8 +104,8 @@ class ServerController extends ApplicationApiController
/**
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\ServerWriteRequest $request
* @param \Pterodactyl\Models\Server $server
* @param string $force
* @param \Pterodactyl\Models\Server $server
* @param string $force
* @return \Illuminate\Http\Response
*
* @throws \Pterodactyl\Exceptions\DisplayException

View file

@ -25,7 +25,7 @@ class ServerDetailsController extends ApplicationApiController
/**
* ServerDetailsController constructor.
*
* @param \Pterodactyl\Services\Servers\BuildModificationService $buildModificationService
* @param \Pterodactyl\Services\Servers\BuildModificationService $buildModificationService
* @param \Pterodactyl\Services\Servers\DetailsModificationService $detailsModificationService
*/
public function __construct(

View file

@ -31,8 +31,8 @@ class ServerManagementController extends ApplicationApiController
* SuspensionController constructor.
*
* @param \Pterodactyl\Services\Servers\ContainerRebuildService $rebuildService
* @param \Pterodactyl\Services\Servers\ReinstallServerService $reinstallServerService
* @param \Pterodactyl\Services\Servers\SuspensionService $suspensionService
* @param \Pterodactyl\Services\Servers\ReinstallServerService $reinstallServerService
* @param \Pterodactyl\Services\Servers\SuspensionService $suspensionService
*/
public function __construct(
ContainerRebuildService $rebuildService,

View file

@ -42,9 +42,9 @@ class UserController extends ApplicationApiController
* UserController constructor.
*
* @param \Pterodactyl\Contracts\Repository\UserRepositoryInterface $repository
* @param \Pterodactyl\Services\Users\UserCreationService $creationService
* @param \Pterodactyl\Services\Users\UserDeletionService $deletionService
* @param \Pterodactyl\Services\Users\UserUpdateService $updateService
* @param \Pterodactyl\Services\Users\UserCreationService $creationService
* @param \Pterodactyl\Services\Users\UserDeletionService $deletionService
* @param \Pterodactyl\Services\Users\UserUpdateService $updateService
*/
public function __construct(
UserRepositoryInterface $repository,

View file

@ -36,7 +36,7 @@ class CommandController extends ClientApiController
* Send a command to a running server.
*
* @param \Pterodactyl\Http\Requests\Api\Client\Servers\SendCommandRequest $request
* @param \Pterodactyl\Models\Server $server
* @param \Pterodactyl\Models\Server $server
* @return \Illuminate\Http\Response
*
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException

View file

@ -43,9 +43,9 @@ class FileController extends ClientApiController
/**
* FileController constructor.
*
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Pterodactyl\Contracts\Repository\Daemon\FileRepositoryInterface $fileRepository
* @param \Illuminate\Contracts\Cache\Repository $cache
* @param \Illuminate\Contracts\Cache\Repository $cache
*/
public function __construct(ConfigRepository $config, FileRepositoryInterface $fileRepository, CacheRepository $cache)
{

View file

@ -23,7 +23,7 @@ class EggInstallController extends Controller
/**
* EggInstallController constructor.
*
* @param \Pterodactyl\Services\Servers\EnvironmentService $environment
* @param \Pterodactyl\Services\Servers\EnvironmentService $environment
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
*/
public function __construct(EnvironmentService $environment, ServerRepositoryInterface $repository)
@ -37,7 +37,7 @@ class EggInstallController extends Controller
* that is being created on the node.
*
* @param \Illuminate\Http\Request $request
* @param string $uuid
* @param string $uuid
* @return \Illuminate\Http\JsonResponse
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException

View file

@ -30,7 +30,7 @@ class EggRetrievalController extends Controller
* OptionUpdateController constructor.
*
* @param \Pterodactyl\Contracts\Repository\EggRepositoryInterface $repository
* @param \Pterodactyl\Services\Eggs\EggConfigurationService $configurationFileService
* @param \Pterodactyl\Services\Eggs\EggConfigurationService $configurationFileService
*/
public function __construct(
EggRepositoryInterface $repository,

View file

@ -55,9 +55,9 @@ class ValidateKeyController extends Controller
/**
* ValidateKeyController constructor.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @param \Illuminate\Contracts\Foundation\Application $app
* @param \Pterodactyl\Contracts\Repository\DaemonKeyRepositoryInterface $daemonKeyRepository
* @param \Spatie\Fractal\Fractal $fractal
* @param \Spatie\Fractal\Fractal $fractal
*/
public function __construct(
Application $app,

View file

@ -51,7 +51,7 @@ abstract class AbstractLoginController extends Controller
/**
* LoginController constructor.
*
* @param \Illuminate\Auth\AuthManager $auth
* @param \Illuminate\Auth\AuthManager $auth
* @param \Illuminate\Contracts\Config\Repository $config
*/
public function __construct(AuthManager $auth, Repository $config)
@ -66,7 +66,7 @@ abstract class AbstractLoginController extends Controller
/**
* Get the failed login response instance.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Contracts\Auth\Authenticatable|null $user
*
* @throws \Pterodactyl\Exceptions\DisplayException
@ -123,7 +123,7 @@ abstract class AbstractLoginController extends Controller
* Fire a failed login event.
*
* @param \Illuminate\Contracts\Auth\Authenticatable|null $user
* @param array $credentials
* @param array $credentials
*/
protected function fireFailedLoginEvent(Authenticatable $user = null, array $credentials = [])
{

View file

@ -16,7 +16,7 @@ class ForgotPasswordController extends Controller
/**
* Get the response for a failed password reset link.
*
* @param \Illuminate\Http\Request
* @param \Illuminate\Http\Request
* @param string $response
* @return \Illuminate\Http\JsonResponse
*/
@ -34,7 +34,7 @@ class ForgotPasswordController extends Controller
* Get the response for a successful password reset link.
*
* @param \Illuminate\Http\Request $request
* @param string $response
* @param string $response
* @return \Illuminate\Http\JsonResponse
*/
protected function sendResetLinkResponse(Request $request, $response): JsonResponse

View file

@ -37,11 +37,11 @@ class LoginCheckpointController extends AbstractLoginController
/**
* LoginCheckpointController constructor.
*
* @param \Illuminate\Auth\AuthManager $auth
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
* @param \PragmaRX\Google2FA\Google2FA $google2FA
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Contracts\Cache\Repository $cache
* @param \Illuminate\Auth\AuthManager $auth
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
* @param \PragmaRX\Google2FA\Google2FA $google2FA
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Contracts\Cache\Repository $cache
* @param \Pterodactyl\Contracts\Repository\UserRepositoryInterface $repository
*/
public function __construct(

View file

@ -34,11 +34,11 @@ class LoginController extends AbstractLoginController
/**
* LoginController constructor.
*
* @param \Illuminate\Auth\AuthManager $auth
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Contracts\Cache\Repository $cache
* @param \Illuminate\Auth\AuthManager $auth
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Contracts\Cache\Repository $cache
* @param \Pterodactyl\Contracts\Repository\UserRepositoryInterface $repository
* @param \Illuminate\Contracts\View\Factory $view
* @param \Illuminate\Contracts\View\Factory $view
*/
public function __construct(
AuthManager $auth,

View file

@ -48,8 +48,8 @@ class ResetPasswordController extends Controller
/**
* ResetPasswordController constructor.
*
* @param \Illuminate\Contracts\Events\Dispatcher $dispatcher
* @param \Illuminate\Contracts\Hashing\Hasher $hasher
* @param \Illuminate\Contracts\Events\Dispatcher $dispatcher
* @param \Illuminate\Contracts\Hashing\Hasher $hasher
* @param \Pterodactyl\Contracts\Repository\UserRepositoryInterface $userRepository
*/
public function __construct(Dispatcher $dispatcher, Hasher $hasher, UserRepositoryInterface $userRepository)
@ -94,7 +94,7 @@ class ResetPasswordController extends Controller
* form with a note telling them their password was changed and to log back in.
*
* @param \Illuminate\Contracts\Auth\CanResetPassword|\Pterodactyl\Models\User $user
* @param string $password
* @param string $password
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException

View file

@ -32,9 +32,9 @@ class AccountKeyController extends Controller
/**
* APIController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Contracts\Repository\ApiKeyRepositoryInterface $repository
* @param \Pterodactyl\Services\Api\KeyCreationService $keyService
* @param \Pterodactyl\Services\Api\KeyCreationService $keyService
*/
public function __construct(
AlertsMessageBag $alert,
@ -95,7 +95,7 @@ class AccountKeyController extends Controller
* Delete an account API key from the Panel via an AJAX request.
*
* @param \Illuminate\Http\Request $request
* @param string $identifier
* @param string $identifier
* @return \Illuminate\Http\Response
*/
public function revoke(Request $request, string $identifier): Response

View file

@ -33,9 +33,9 @@ class ClientApiController extends Controller
/**
* ClientApiController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Contracts\Repository\ApiKeyRepositoryInterface $repository
* @param \Pterodactyl\Services\Api\KeyCreationService $creationService
* @param \Pterodactyl\Services\Api\KeyCreationService $creationService
*/
public function __construct(AlertsMessageBag $alert, ApiKeyRepositoryInterface $repository, KeyCreationService $creationService)
{

View file

@ -42,11 +42,11 @@ class SecurityController extends Controller
/**
* SecurityController constructor.
*
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Pterodactyl\Contracts\Repository\SessionRepositoryInterface $repository
* @param \Pterodactyl\Services\Users\ToggleTwoFactorService $toggleTwoFactorService
* @param \Pterodactyl\Services\Users\TwoFactorSetupService $twoFactorSetupService
* @param \Pterodactyl\Services\Users\ToggleTwoFactorService $toggleTwoFactorService
* @param \Pterodactyl\Services\Users\TwoFactorSetupService $twoFactorSetupService
*/
public function __construct(
AlertsMessageBag $alert,

View file

@ -6,7 +6,6 @@ use Cache;
use Illuminate\Http\Request;
use Pterodactyl\Models\Node;
use Illuminate\Http\Response;
use Pterodactyl\Models\Server;
use Illuminate\Http\JsonResponse;
use Pterodactyl\Http\Controllers\Controller;
use Pterodactyl\Repositories\Eloquent\ServerRepository;
@ -20,6 +19,7 @@ class ActionController extends Controller
* @var \Illuminate\Contracts\Events\Dispatcher
*/
private $eventDispatcher;
/**
* @var \Pterodactyl\Repositories\Eloquent\ServerRepository
*/
@ -29,7 +29,7 @@ class ActionController extends Controller
* ActionController constructor.
*
* @param \Pterodactyl\Repositories\Eloquent\ServerRepository $repository
* @param \Illuminate\Contracts\Events\Dispatcher $eventDispatcher
* @param \Illuminate\Contracts\Events\Dispatcher $eventDispatcher
*/
public function __construct(ServerRepository $repository, EventDispatcher $eventDispatcher)
{
@ -89,7 +89,7 @@ class ActionController extends Controller
* Handles configuration data request from daemon.
*
* @param \Illuminate\Http\Request $request
* @param string $token
* @param string $token
* @return \Illuminate\Http\JsonResponse|\Illuminate\Http\Response
*/
public function configuration(Request $request, $token)

View file

@ -20,7 +20,7 @@ class PackController extends Controller
* Pulls an install pack archive from the system.
*
* @param \Illuminate\Http\Request $request
* @param string $uuid
* @param string $uuid
* @return \Illuminate\Http\JsonResponse|\Symfony\Component\HttpFoundation\BinaryFileResponse
*/
public function pull(Request $request, $uuid)
@ -42,7 +42,7 @@ class PackController extends Controller
* Returns the hash information for a pack.
*
* @param \Illuminate\Http\Request $request
* @param string $uuid
* @param string $uuid
* @return \Illuminate\Http\JsonResponse
*/
public function hash(Request $request, $uuid)

View file

@ -19,7 +19,7 @@ class AdminAuthenticate
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*
* @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException

View file

@ -42,7 +42,7 @@ class ApiSubstituteBindings extends SubstituteBindings
* a 404 error if a model is not found.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)

View file

@ -13,7 +13,7 @@ class AuthenticateApplicationUser
* and should be allowed to proceed through the application API.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*/
public function handle(Request $request, Closure $next)

View file

@ -14,7 +14,7 @@ class AuthenticateIPAccess
* Determine if a request IP has permission to access the API.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*
* @throws \Exception

View file

@ -35,8 +35,8 @@ class AuthenticateKey
* AuthenticateKey constructor.
*
* @param \Pterodactyl\Contracts\Repository\ApiKeyRepositoryInterface $repository
* @param \Illuminate\Auth\AuthManager $auth
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
* @param \Illuminate\Auth\AuthManager $auth
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
*/
public function __construct(ApiKeyRepositoryInterface $repository, AuthManager $auth, Encrypter $encrypter)
{
@ -50,8 +50,8 @@ class AuthenticateKey
* is in a valid format and exists in the database.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param int $keyType
* @param \Closure $next
* @param int $keyType
* @return mixed
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
@ -86,7 +86,7 @@ class AuthenticateKey
* Authenticate an API key.
*
* @param string $key
* @param int $keyType
* @param int $keyType
* @return \Pterodactyl\Models\ApiKey
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException

View file

@ -31,7 +31,7 @@ class AuthenticateServerAccess
* Authenticate that this server exists and is not suspended or marked as installing.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*/
public function handle(Request $request, Closure $next)

View file

@ -17,7 +17,7 @@ class SubstituteClientApiBindings extends ApiSubstituteBindings
* a 404 error if a model is not found.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)

View file

@ -39,7 +39,7 @@ class DaemonAuthenticate
* Check if a request from the daemon can be properly attributed back to a single node instance.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*
* @throws \Symfony\Component\HttpKernel\Exception\HttpException

View file

@ -27,7 +27,7 @@ class SetSessionDriver
* Set the session for API calls to only last for the one request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*/
public function handle(Request $request, Closure $next)

View file

@ -12,7 +12,7 @@ class Authenticate
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*
* @throws \Illuminate\Auth\AuthenticationException

View file

@ -45,7 +45,7 @@ class DaemonAuthenticate
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException

View file

@ -27,7 +27,7 @@ class LanguageMiddleware
* Handle an incoming request and set the user's preferred language.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*/
public function handle(Request $request, Closure $next)

View file

@ -26,7 +26,7 @@ class MaintenanceMiddleware
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)

View file

@ -27,8 +27,8 @@ class RedirectIfAuthenticated
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @param \Closure $next
* @param string|null $guard
* @return mixed
*/
public function handle(Request $request, Closure $next, string $guard = null)

View file

@ -46,7 +46,7 @@ class RequireTwoFactorAuthentication
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*/
public function handle(Request $request, Closure $next)

View file

@ -31,8 +31,8 @@ class AccessingValidServer
/**
* AccessingValidServer constructor.
*
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Contracts\Routing\ResponseFactory $response
* @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Contracts\Routing\ResponseFactory $response
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
*/
public function __construct(
@ -49,7 +49,7 @@ class AccessingValidServer
* Determine if a given user has permission to access a server.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return \Illuminate\Http\Response|mixed
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException

View file

@ -36,7 +36,7 @@ class AuthenticateAsSubuser
* Determine if a subuser has permissions to access a server, if so set their access token.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException

View file

@ -30,7 +30,7 @@ class DatabaseBelongsToServer
* and set an attribute with the database.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException

View file

@ -23,7 +23,7 @@ class ScheduleBelongsToServer
/**
* TaskAccess constructor.
*
* @param \Pterodactyl\Contracts\Extensions\HashidsInterface $hashids
* @param \Pterodactyl\Contracts\Extensions\HashidsInterface $hashids
* @param \Pterodactyl\Contracts\Repository\ScheduleRepositoryInterface $repository
*/
public function __construct(HashidsInterface $hashids, ScheduleRepositoryInterface $repository)
@ -36,7 +36,7 @@ class ScheduleBelongsToServer
* Determine if a task is assigned to the active server.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException

View file

@ -24,7 +24,7 @@ class SubuserBelongsToServer
/**
* SubuserAccess constructor.
*
* @param \Pterodactyl\Contracts\Extensions\HashidsInterface $hashids
* @param \Pterodactyl\Contracts\Extensions\HashidsInterface $hashids
* @param \Pterodactyl\Contracts\Repository\SubuserRepositoryInterface $repository
*/
public function __construct(HashidsInterface $hashids, SubuserRepositoryInterface $repository)
@ -37,7 +37,7 @@ class SubuserBelongsToServer
* Determine if a user has permission to access and modify subuser.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return mixed
*
* @throws \Pterodactyl\Exceptions\DisplayException

View file

@ -30,7 +30,7 @@ class VerifyReCaptcha
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param \Closure $next
* @return \Illuminate\Http\RedirectResponse|mixed
*/
public function handle($request, Closure $next)
@ -66,7 +66,7 @@ class VerifyReCaptcha
/**
* Determine if the response from the recaptcha servers was valid.
*
* @param stdClass $result
* @param stdClass $result
* @param \Illuminate\Http\Request $request
* @return bool
*/

View file

@ -97,8 +97,8 @@ class UpdateServerBuildConfigurationRequest extends ServerWriteRequest
* call.
*
* @param string $field
* @param array $rules
* @param bool $limits
* @param array $rules
* @param bool $limits
* @return array
*
* @see https://github.com/pterodactyl/panel/issues/1500

View file

@ -47,6 +47,7 @@ class GetExternalUserRequest extends ApplicationApiRequest
/**
* Return the user model for the requested external user.
*
* @return \Pterodactyl\Models\User
*/
public function getUserModel(): User

View file

@ -2,12 +2,13 @@
namespace Pterodactyl\Http\Requests\Api\Client;
use Pterodactyl\Models\User;
use Pterodactyl\Models\Server;
use Pterodactyl\Contracts\Http\ClientPermissionsRequest;
use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
/**
* @method \Pterodactyl\Models\User user($guard = null)
* @method User user($guard = null)
*/
abstract class ClientApiRequest extends ApplicationApiRequest
{

Some files were not shown because too many files have changed in this diff Show more