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' => [ 'ordered_imports' => [
'sortAlgorithm' => 'length', 'sortAlgorithm' => 'length',
], ],
'phpdoc_align' => ['tags' => ['param']], 'phpdoc_align' => false,
'phpdoc_separation' => false, 'phpdoc_separation' => false,
'protected_to_private' => false, 'protected_to_private' => false,
'psr0' => ['dir' => 'app'], 'psr0' => ['dir' => 'app'],

View file

@ -79,7 +79,7 @@ class AppSettingsCommand extends Command
* AppSettingsCommand constructor. * AppSettingsCommand constructor.
* *
* @param \Illuminate\Contracts\Config\Repository $config * @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) 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->output->comment(trans('command/messages.environment.app.author_help'));
$this->variables['APP_SERVICE_AUTHOR'] = $this->option('author') ?? $this->ask( $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->output->comment(trans('command/messages.environment.app.app_url_help'));
$this->variables['APP_URL'] = $this->option('url') ?? $this->ask( $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->output->comment(trans('command/messages.environment.app.timezone_help'));
$this->variables['APP_TIMEZONE'] = $this->option('timezone') ?? $this->anticipate( $this->variables['APP_TIMEZONE'] = $this->option('timezone') ?? $this->anticipate(
trans('command/messages.environment.app.timezone'), trans('command/messages.environment.app.timezone'),
DateTimeZone::listIdentifiers(DateTimeZone::ALL), DateTimeZone::listIdentifiers(DateTimeZone::ALL),
$this->config->get('app.timezone') $this->config->get('app.timezone')
); );
$selected = $this->config->get('cache.default', 'redis'); $selected = $this->config->get('cache.default', 'redis');
$this->variables['CACHE_DRIVER'] = $this->option('cache') ?? $this->choice( $this->variables['CACHE_DRIVER'] = $this->option('cache') ?? $this->choice(
trans('command/messages.environment.app.cache_driver'), trans('command/messages.environment.app.cache_driver'),
self::ALLOWED_CACHE_DRIVERS, self::ALLOWED_CACHE_DRIVERS,
array_key_exists($selected, self::ALLOWED_CACHE_DRIVERS) ? $selected : null array_key_exists($selected, self::ALLOWED_CACHE_DRIVERS) ? $selected : null
); );
$selected = $this->config->get('session.driver', 'redis'); $selected = $this->config->get('session.driver', 'redis');
$this->variables['SESSION_DRIVER'] = $this->option('session') ?? $this->choice( $this->variables['SESSION_DRIVER'] = $this->option('session') ?? $this->choice(
trans('command/messages.environment.app.session_driver'), trans('command/messages.environment.app.session_driver'),
self::ALLOWED_SESSION_DRIVERS, self::ALLOWED_SESSION_DRIVERS,
array_key_exists($selected, self::ALLOWED_SESSION_DRIVERS) ? $selected : null array_key_exists($selected, self::ALLOWED_SESSION_DRIVERS) ? $selected : null
); );
$selected = $this->config->get('queue.default', 'redis'); $selected = $this->config->get('queue.default', 'redis');
$this->variables['QUEUE_CONNECTION'] = $this->option('queue') ?? $this->choice( $this->variables['QUEUE_CONNECTION'] = $this->option('queue') ?? $this->choice(
trans('command/messages.environment.app.queue_driver'), trans('command/messages.environment.app.queue_driver'),
self::ALLOWED_QUEUE_DRIVERS, self::ALLOWED_QUEUE_DRIVERS,
array_key_exists($selected, self::ALLOWED_QUEUE_DRIVERS) ? $selected : null array_key_exists($selected, self::ALLOWED_QUEUE_DRIVERS) ? $selected : null
); );
if (! is_null($this->option('settings-ui'))) { if (! is_null($this->option('settings-ui'))) {
$this->variables['APP_ENVIRONMENT_ONLY'] = $this->option('settings-ui') == 'true' ? 'false' : 'true'; $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->output->note(trans('command/messages.environment.app.using_redis'));
$this->variables['REDIS_HOST'] = $this->option('redis-host') ?? $this->ask( $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; $askForRedisPassword = true;
if (! empty($this->config->get('database.redis.default.password'))) { if (! empty($this->config->get('database.redis.default.password'))) {
@ -178,8 +178,8 @@ class AppSettingsCommand extends Command
if ($askForRedisPassword) { if ($askForRedisPassword) {
$this->output->comment(trans('command/messages.environment.app.redis_pass_help')); $this->output->comment(trans('command/messages.environment.app.redis_pass_help'));
$this->variables['REDIS_PASSWORD'] = $this->option('redis-pass') ?? $this->output->askHidden( $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'])) { if (empty($this->variables['REDIS_PASSWORD'])) {
@ -187,7 +187,7 @@ class AppSettingsCommand extends Command
} }
$this->variables['REDIS_PORT'] = $this->option('redis-port') ?? $this->ask( $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. * DatabaseSettingsCommand constructor.
* *
* @param \Illuminate\Contracts\Config\Repository $config * @param \Illuminate\Contracts\Config\Repository $config
* @param \Illuminate\Database\DatabaseManager $database * @param \Illuminate\Database\DatabaseManager $database
* @param \Illuminate\Contracts\Console\Kernel $console * @param \Illuminate\Contracts\Console\Kernel $console
*/ */
public function __construct(ConfigRepository $config, DatabaseManager $database, 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->output->note(trans('command/messages.environment.database.host_warning'));
$this->variables['DB_HOST'] = $this->option('host') ?? $this->ask( $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( $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( $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->output->note(trans('command/messages.environment.database.username_warning'));
$this->variables['DB_USERNAME'] = $this->option('username') ?? $this->ask( $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; $askForMySQLPassword = true;
if (! empty($this->config->get('database.connections.mysql.password')) && $this->input->isInteractive()) { if (! empty($this->config->get('database.connections.mysql.password')) && $this->input->isInteractive()) {
@ -136,15 +136,15 @@ class DatabaseSettingsCommand extends Command
private function testMySQLConnection() private function testMySQLConnection()
{ {
$this->config->set('database.connections._pterodactyl_command_test', [ $this->config->set('database.connections._pterodactyl_command_test', [
'driver' => 'mysql', 'driver' => 'mysql',
'host' => $this->variables['DB_HOST'], 'host' => $this->variables['DB_HOST'],
'port' => $this->variables['DB_PORT'], 'port' => $this->variables['DB_PORT'],
'database' => $this->variables['DB_DATABASE'], 'database' => $this->variables['DB_DATABASE'],
'username' => $this->variables['DB_USERNAME'], 'username' => $this->variables['DB_USERNAME'],
'password' => $this->variables['DB_PASSWORD'], 'password' => $this->variables['DB_PASSWORD'],
'charset' => 'utf8mb4', 'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci', 'collation' => 'utf8mb4_unicode_ci',
'strict' => true, 'strict' => true,
]); ]);
$this->database->connection('_pterodactyl_command_test')->getPdo(); $this->database->connection('_pterodactyl_command_test')->getPdo();

View file

@ -59,19 +59,20 @@ class EmailSettingsCommand extends Command
/** /**
* Handle command execution. * Handle command execution.
*
* @throws \Pterodactyl\Exceptions\PterodactylException * @throws \Pterodactyl\Exceptions\PterodactylException
*/ */
public function handle() public function handle()
{ {
$this->variables['MAIL_DRIVER'] = $this->option('driver') ?? $this->choice( $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', 'smtp' => 'SMTP Server',
'mail' => 'PHP\'s Internal Mail Function', 'mail' => 'PHP\'s Internal Mail Function',
'mailgun' => 'Mailgun Transactional Email', 'mailgun' => 'Mailgun Transactional Email',
'mandrill' => 'Mandrill Transactional Email', 'mandrill' => 'Mandrill Transactional Email',
'postmark' => 'Postmarkapp Transactional Email', 'postmark' => 'Postmarkapp Transactional Email',
], $this->config->get('mail.driver', 'smtp') ], $this->config->get('mail.driver', 'smtp')
); );
$method = 'setup' . studly_case($this->variables['MAIL_DRIVER']) . 'DriverVariables'; $method = 'setup' . studly_case($this->variables['MAIL_DRIVER']) . 'DriverVariables';
if (method_exists($this, $method)) { if (method_exists($this, $method)) {
@ -79,16 +80,16 @@ class EmailSettingsCommand extends Command
} }
$this->variables['MAIL_FROM'] = $this->option('email') ?? $this->ask( $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( $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( $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); $this->writeToEnvironment($this->variables);
@ -102,20 +103,20 @@ class EmailSettingsCommand extends Command
private function setupSmtpDriverVariables() private function setupSmtpDriverVariables()
{ {
$this->variables['MAIL_HOST'] = $this->option('host') ?? $this->ask( $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( $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( $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( $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() private function setupMailgunDriverVariables()
{ {
$this->variables['MAILGUN_DOMAIN'] = $this->option('host') ?? $this->ask( $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( $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() private function setupMandrillDriverVariables()
{ {
$this->variables['MANDRILL_SECRET'] = $this->option('password') ?? $this->ask( $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_HOST'] = 'smtp.postmarkapp.com';
$this->variables['MAIL_PORT'] = 587; $this->variables['MAIL_PORT'] = 587;
$this->variables['MAIL_USERNAME'] = $this->variables['MAIL_PASSWORD'] = $this->option('username') ?? $this->ask( $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. * VersionCommand constructor.
* *
* @param \Illuminate\Contracts\Config\Repository $config * @param \Illuminate\Contracts\Config\Repository $config
* @param \Pterodactyl\Services\Helpers\SoftwareVersionService $versionService * @param \Pterodactyl\Services\Helpers\SoftwareVersionService $versionService
*/ */
public function __construct(ConfigRepository $config, SoftwareVersionService $versionService) public function __construct(ConfigRepository $config, SoftwareVersionService $versionService)

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -17,7 +17,7 @@ interface HashidsInterface extends VendorHashidsInterface
* Decode an encoded hashid and return the first result. * Decode an encoded hashid and return the first result.
* *
* @param string $encoded * @param string $encoded
* @param null $default * @param null $default
* @return mixed * @return mixed
* *
* @throws \InvalidArgumentException * @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. * Set an array of allocation IDs to be assigned to a specific server.
* *
* @param int|null $server * @param int|null $server
* @param array $ids * @param array $ids
* @return int * @return int
*/ */
public function assignAllocationsToServer(int $server = null, array $ids): int; public function assignAllocationsToServer(int $server = null, array $ids): int;
@ -76,7 +76,7 @@ interface AllocationRepositoryInterface extends RepositoryInterface
* *
* @param array $nodes * @param array $nodes
* @param array $ports * @param array $ports
* @param bool $dedicated * @param bool $dedicated
* @return \Pterodactyl\Models\Allocation|null * @return \Pterodactyl\Models\Allocation|null
*/ */
public function getRandomAllocation(array $nodes, array $ports, bool $dedicated = false); 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. * Delete an account API key from the panel for a specific user.
* *
* @param \Pterodactyl\Models\User $user * @param \Pterodactyl\Models\User $user
* @param string $identifier * @param string $identifier
* @return int * @return int
*/ */
public function deleteAccountKey(User $user, string $identifier): 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. * Delete an application API key from the panel for a specific user.
* *
* @param \Pterodactyl\Models\User $user * @param \Pterodactyl\Models\User $user
* @param string $identifier * @param string $identifier
* @return int * @return int
*/ */
public function deleteApplicationKey(User $user, string $identifier): 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. * 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 * @param int|null $notLargerThan
* @return string * @return string
*/ */

View file

@ -17,7 +17,7 @@ interface DaemonKeyRepositoryInterface extends RepositoryInterface
* Load the server and user relations onto a key model. * Load the server and user relations onto a key model.
* *
* @param \Pterodactyl\Models\DaemonKey $key * @param \Pterodactyl\Models\DaemonKey $key
* @param bool $refresh * @param bool $refresh
* @return \Pterodactyl\Models\DaemonKey * @return \Pterodactyl\Models\DaemonKey
*/ */
public function loadServerAndUserRelations(DaemonKey $key, bool $refresh = false): 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. * Return an egg with the scriptFrom and configFrom relations loaded onto the model.
* *
* @param int|string $value * @param int|string $value
* @param string $column * @param string $column
* @return \Pterodactyl\Models\Egg * @return \Pterodactyl\Models\Egg
*/ */
public function getWithCopyAttributes($value, string $column = 'id'): 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. * Return a single node with location and server information.
* *
* @param \Pterodactyl\Models\Node $node * @param \Pterodactyl\Models\Node $node
* @param bool $refresh * @param bool $refresh
* @return \Pterodactyl\Models\Node * @return \Pterodactyl\Models\Node
*/ */
public function loadLocationAndServerCount(Node $node, bool $refresh = false): 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. * any servers that are also attached to those allocations.
* *
* @param \Pterodactyl\Models\Node $node * @param \Pterodactyl\Models\Node $node
* @param bool $refresh * @param bool $refresh
* @return \Pterodactyl\Models\Node * @return \Pterodactyl\Models\Node
*/ */
public function loadNodeAllocations(Node $node, bool $refresh = false): 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. * available to support the additional disk and memory provided.
* *
* @param array $locations * @param array $locations
* @param int $disk * @param int $disk
* @param int $memory * @param int $memory
* @return \Illuminate\Support\LazyCollection * @return \Illuminate\Support\LazyCollection
*/ */
public function getNodesWithResourceUse(array $locations, int $disk, int $memory): 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. * Return a pack with the associated server models attached to it.
* *
* @param \Pterodactyl\Models\Pack $pack * @param \Pterodactyl\Models\Pack $pack
* @param bool $refresh * @param bool $refresh
* @return \Pterodactyl\Models\Pack * @return \Pterodactyl\Models\Pack
*/ */
public function loadServerData(Pack $pack, bool $refresh = false): 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. * Create a new model instance and persist it to the database.
* *
* @param array $fields * @param array $fields
* @param bool $validate * @param bool $validate
* @param bool $force * @param bool $force
* @return mixed * @return mixed
* *
* @throws \Pterodactyl\Exceptions\Model\DataValidationException * @throws \Pterodactyl\Exceptions\Model\DataValidationException
@ -134,10 +134,10 @@ interface RepositoryInterface
/** /**
* Update a given ID with the passed array of fields. * Update a given ID with the passed array of fields.
* *
* @param int $id * @param int $id
* @param array $fields * @param array $fields
* @param bool $validate * @param bool $validate
* @param bool $force * @param bool $force
* @return mixed * @return mixed
* *
* @throws \Pterodactyl\Exceptions\Model\DataValidationException * @throws \Pterodactyl\Exceptions\Model\DataValidationException
@ -150,8 +150,8 @@ interface RepositoryInterface
* This does not perform any model data validation. * This does not perform any model data validation.
* *
* @param string $column * @param string $column
* @param array $values * @param array $values
* @param array $fields * @param array $fields
* @return int * @return int
*/ */
public function updateWhereIn(string $column, array $values, array $fields): int; public function updateWhereIn(string $column, array $values, array $fields): int;
@ -161,8 +161,8 @@ interface RepositoryInterface
* *
* @param array $where * @param array $where
* @param array $fields * @param array $fields
* @param bool $validate * @param bool $validate
* @param bool $force * @param bool $force
* @return mixed * @return mixed
* *
* @throws \Pterodactyl\Exceptions\Model\DataValidationException * @throws \Pterodactyl\Exceptions\Model\DataValidationException

View file

@ -20,7 +20,7 @@ interface ScheduleRepositoryInterface extends RepositoryInterface
* already present. * already present.
* *
* @param \Pterodactyl\Models\Schedule $schedule * @param \Pterodactyl\Models\Schedule $schedule
* @param bool $refresh * @param bool $refresh
* @return \Pterodactyl\Models\Schedule * @return \Pterodactyl\Models\Schedule
*/ */
public function loadTasks(Schedule $schedule, bool $refresh = false): 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. * Load the egg relations onto the server model.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @param bool $refresh * @param bool $refresh
* @return \Pterodactyl\Models\Server * @return \Pterodactyl\Models\Server
*/ */
public function loadEggRelations(Server $server, bool $refresh = false): 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. * return the server from the database.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @param bool $refresh * @param bool $refresh
* @return \Pterodactyl\Models\Server * @return \Pterodactyl\Models\Server
*/ */
public function getPrimaryAllocation(Server $server, bool $refresh = false): 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 * Return all of the server variables possible and default to the variable
* default if there is no value defined for the specific server requested. * default if there is no value defined for the specific server requested.
* *
* @param int $id * @param int $id
* @param bool $returnAsObject * @param bool $returnAsObject
* @return array|object * @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. * Return enough data to be used for the creation of a server via the daemon.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @param bool $refresh * @param bool $refresh
* @return \Pterodactyl\Models\Server * @return \Pterodactyl\Models\Server
*/ */
public function getDataForCreation(Server $server, bool $refresh = false): 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. * Load associated databases onto the server model.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @param bool $refresh * @param bool $refresh
* @return \Pterodactyl\Models\Server * @return \Pterodactyl\Models\Server
*/ */
public function loadDatabaseRelations(Server $server, bool $refresh = false): 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. * if they are missing, or refresh is set to true.
* *
* @param \Pterodactyl\Models\Server $server * @param \Pterodactyl\Models\Server $server
* @param bool $refresh * @param bool $refresh
* @return array * @return array
*/ */
public function getDaemonServiceData(Server $server, bool $refresh = false): 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. * Return a paginated list of servers that a user can access at a given level.
* *
* @param \Pterodactyl\Models\User $user * @param \Pterodactyl\Models\User $user
* @param int $level * @param int $level
* @param bool|int $paginate * @param bool|int $paginate
* @return \Illuminate\Pagination\LengthAwarePaginator|\Illuminate\Database\Eloquent\Collection * @return \Illuminate\Pagination\LengthAwarePaginator|\Illuminate\Database\Eloquent\Collection
*/ */
public function filterUserAccessServers(User $user, int $level, $paginate = 25); public function filterUserAccessServers(User $user, int $level, $paginate = 25);
@ -132,7 +132,7 @@ interface ServerRepositoryInterface extends RepositoryInterface, SearchableInter
* *
* @param int[] $servers * @param int[] $servers
* @param int[] $nodes * @param int[] $nodes
* @param bool $returnCount * @param bool $returnCount
* @return int|\Illuminate\Support\LazyCollection * @return int|\Illuminate\Support\LazyCollection
*/ */
public function getServersForPowerAction(array $servers = [], array $nodes = [], bool $returnCount = false); 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. * Delete a session for a given user.
* *
* @param int $user * @param int $user
* @param string $session * @param string $session
* @return null|int * @return null|int
*/ */

View file

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

View file

@ -10,7 +10,7 @@ interface SubuserRepositoryInterface extends RepositoryInterface
* Return a subuser with the associated server relationship. * Return a subuser with the associated server relationship.
* *
* @param \Pterodactyl\Models\Subuser $subuser * @param \Pterodactyl\Models\Subuser $subuser
* @param bool $refresh * @param bool $refresh
* @return \Pterodactyl\Models\Subuser * @return \Pterodactyl\Models\Subuser
*/ */
public function loadServerAndUserRelations(Subuser $subuser, bool $refresh = false): 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. * Return a subuser with the associated permissions relationship.
* *
* @param \Pterodactyl\Models\Subuser $subuser * @param \Pterodactyl\Models\Subuser $subuser
* @param bool $refresh * @param bool $refresh
* @return \Pterodactyl\Models\Subuser * @return \Pterodactyl\Models\Subuser
*/ */
public function getWithPermissions(Subuser $subuser, bool $refresh = false): Subuser; public function getWithPermissions(Subuser $subuser, bool $refresh = false): Subuser;

View file

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

View file

@ -9,6 +9,8 @@
namespace Pterodactyl\Exceptions; 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. * Exception constructor.
* *
* @param string $message * @param string $message
* @param Throwable|null $previous * @param Throwable|null $previous
* @param string $level * @param string $level
* @param int $code * @param int $code
*/ */
public function __construct($message, Throwable $previous = null, $level = self::LEVEL_ERROR, $code = 0) 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. * Render an exception into an HTTP response.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Exception $exception * @param \Exception $exception
* @return \Symfony\Component\HttpFoundation\Response * @return \Symfony\Component\HttpFoundation\Response
* *
* @throws \Exception * @throws \Exception
@ -160,7 +160,7 @@ class Handler extends ExceptionHandler
* Transform a validation exception into a consistent format to be returned for * Transform a validation exception into a consistent format to be returned for
* calls to the API. * calls to the API.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Illuminate\Validation\ValidationException $exception * @param \Illuminate\Validation\ValidationException $exception
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
*/ */
@ -199,7 +199,7 @@ class Handler extends ExceptionHandler
* Return the exception as a JSONAPI representation for use on API requests. * Return the exception as a JSONAPI representation for use on API requests.
* *
* @param \Exception $exception * @param \Exception $exception
* @param array $override * @param array $override
* @return array * @return array
*/ */
public static function convertToArray(Exception $exception, array $override = []): 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. * Convert an authentication exception into an unauthenticated response.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception * @param \Illuminate\Auth\AuthenticationException $exception
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */

View file

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

View file

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

View file

@ -9,6 +9,8 @@
namespace Pterodactyl\Exceptions\Service\Helper; 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; 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; 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. * DynamicDatabaseConnection constructor.
* *
* @param \Illuminate\Config\Repository $config * @param \Illuminate\Config\Repository $config
* @param \Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface $repository * @param \Pterodactyl\Contracts\Repository\DatabaseHostRepositoryInterface $repository
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter * @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
*/ */
public function __construct( public function __construct(
ConfigRepository $config, ConfigRepository $config,
@ -55,9 +55,9 @@ class DynamicDatabaseConnection
/** /**
* Adds a dynamic database connection entry to the runtime config. * Adds a dynamic database connection entry to the runtime config.
* *
* @param string $connection * @param string $connection
* @param \Pterodactyl\Models\DatabaseHost|int $host * @param \Pterodactyl\Models\DatabaseHost|int $host
* @param string $database * @param string $database
* *
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/ */

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -52,11 +52,11 @@ class UserController extends Controller
/** /**
* UserController constructor. * UserController constructor.
* *
* @param \Prologue\Alerts\AlertsMessageBag $alert * @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Services\Users\UserCreationService $creationService * @param \Pterodactyl\Services\Users\UserCreationService $creationService
* @param \Pterodactyl\Services\Users\UserDeletionService $deletionService * @param \Pterodactyl\Services\Users\UserDeletionService $deletionService
* @param \Illuminate\Contracts\Translation\Translator $translator * @param \Illuminate\Contracts\Translation\Translator $translator
* @param \Pterodactyl\Services\Users\UserUpdateService $updateService * @param \Pterodactyl\Services\Users\UserUpdateService $updateService
* @param \Pterodactyl\Contracts\Repository\UserRepositoryInterface $repository * @param \Pterodactyl\Contracts\Repository\UserRepositoryInterface $repository
*/ */
public function __construct( public function __construct(
@ -156,7 +156,7 @@ class UserController extends Controller
* Update a user on the system. * Update a user on the system.
* *
* @param \Pterodactyl\Http\Requests\Admin\UserFormRequest $request * @param \Pterodactyl\Http\Requests\Admin\UserFormRequest $request
* @param \Pterodactyl\Models\User $user * @param \Pterodactyl\Models\User $user
* @return \Illuminate\Http\RedirectResponse * @return \Illuminate\Http\RedirectResponse
* *
* @throws \Pterodactyl\Exceptions\Model\DataValidationException * @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. * without littering the constructors of classes that extend this abstract.
* *
* @param \Pterodactyl\Extensions\Spatie\Fractalistic\Fractal $fractal * @param \Pterodactyl\Extensions\Spatie\Fractalistic\Fractal $fractal
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
*/ */
public function loadDependencies(Fractal $fractal, Request $request) public function loadDependencies(Fractal $fractal, Request $request)
{ {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -51,7 +51,7 @@ abstract class AbstractLoginController extends Controller
/** /**
* LoginController constructor. * LoginController constructor.
* *
* @param \Illuminate\Auth\AuthManager $auth * @param \Illuminate\Auth\AuthManager $auth
* @param \Illuminate\Contracts\Config\Repository $config * @param \Illuminate\Contracts\Config\Repository $config
*/ */
public function __construct(AuthManager $auth, Repository $config) public function __construct(AuthManager $auth, Repository $config)
@ -66,7 +66,7 @@ abstract class AbstractLoginController extends Controller
/** /**
* Get the failed login response instance. * Get the failed login response instance.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Illuminate\Contracts\Auth\Authenticatable|null $user * @param \Illuminate\Contracts\Auth\Authenticatable|null $user
* *
* @throws \Pterodactyl\Exceptions\DisplayException * @throws \Pterodactyl\Exceptions\DisplayException
@ -123,7 +123,7 @@ abstract class AbstractLoginController extends Controller
* Fire a failed login event. * Fire a failed login event.
* *
* @param \Illuminate\Contracts\Auth\Authenticatable|null $user * @param \Illuminate\Contracts\Auth\Authenticatable|null $user
* @param array $credentials * @param array $credentials
*/ */
protected function fireFailedLoginEvent(Authenticatable $user = null, 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. * Get the response for a failed password reset link.
* *
* @param \Illuminate\Http\Request * @param \Illuminate\Http\Request
* @param string $response * @param string $response
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
*/ */
@ -34,7 +34,7 @@ class ForgotPasswordController extends Controller
* Get the response for a successful password reset link. * Get the response for a successful password reset link.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param string $response * @param string $response
* @return \Illuminate\Http\JsonResponse * @return \Illuminate\Http\JsonResponse
*/ */
protected function sendResetLinkResponse(Request $request, $response): JsonResponse protected function sendResetLinkResponse(Request $request, $response): JsonResponse

View file

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

View file

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

View file

@ -48,8 +48,8 @@ class ResetPasswordController extends Controller
/** /**
* ResetPasswordController constructor. * ResetPasswordController constructor.
* *
* @param \Illuminate\Contracts\Events\Dispatcher $dispatcher * @param \Illuminate\Contracts\Events\Dispatcher $dispatcher
* @param \Illuminate\Contracts\Hashing\Hasher $hasher * @param \Illuminate\Contracts\Hashing\Hasher $hasher
* @param \Pterodactyl\Contracts\Repository\UserRepositoryInterface $userRepository * @param \Pterodactyl\Contracts\Repository\UserRepositoryInterface $userRepository
*/ */
public function __construct(Dispatcher $dispatcher, Hasher $hasher, 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. * 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 \Illuminate\Contracts\Auth\CanResetPassword|\Pterodactyl\Models\User $user
* @param string $password * @param string $password
* *
* @throws \Pterodactyl\Exceptions\Model\DataValidationException * @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException

View file

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

View file

@ -33,9 +33,9 @@ class ClientApiController extends Controller
/** /**
* ClientApiController constructor. * ClientApiController constructor.
* *
* @param \Prologue\Alerts\AlertsMessageBag $alert * @param \Prologue\Alerts\AlertsMessageBag $alert
* @param \Pterodactyl\Contracts\Repository\ApiKeyRepositoryInterface $repository * @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) public function __construct(AlertsMessageBag $alert, ApiKeyRepositoryInterface $repository, KeyCreationService $creationService)
{ {

View file

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

View file

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

View file

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

View file

@ -19,7 +19,7 @@ class AdminAuthenticate
* Handle an incoming request. * Handle an incoming request.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next
* @return mixed * @return mixed
* *
* @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException * @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. * a 404 error if a model is not found.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next
* @return mixed * @return mixed
*/ */
public function handle($request, Closure $next) public function handle($request, Closure $next)

View file

@ -13,7 +13,7 @@ class AuthenticateApplicationUser
* and should be allowed to proceed through the application API. * and should be allowed to proceed through the application API.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next
* @return mixed * @return mixed
*/ */
public function handle(Request $request, Closure $next) 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. * Determine if a request IP has permission to access the API.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next
* @return mixed * @return mixed
* *
* @throws \Exception * @throws \Exception

View file

@ -35,8 +35,8 @@ class AuthenticateKey
* AuthenticateKey constructor. * AuthenticateKey constructor.
* *
* @param \Pterodactyl\Contracts\Repository\ApiKeyRepositoryInterface $repository * @param \Pterodactyl\Contracts\Repository\ApiKeyRepositoryInterface $repository
* @param \Illuminate\Auth\AuthManager $auth * @param \Illuminate\Auth\AuthManager $auth
* @param \Illuminate\Contracts\Encryption\Encrypter $encrypter * @param \Illuminate\Contracts\Encryption\Encrypter $encrypter
*/ */
public function __construct(ApiKeyRepositoryInterface $repository, AuthManager $auth, 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. * is in a valid format and exists in the database.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next
* @param int $keyType * @param int $keyType
* @return mixed * @return mixed
* *
* @throws \Pterodactyl\Exceptions\Model\DataValidationException * @throws \Pterodactyl\Exceptions\Model\DataValidationException
@ -86,7 +86,7 @@ class AuthenticateKey
* Authenticate an API key. * Authenticate an API key.
* *
* @param string $key * @param string $key
* @param int $keyType * @param int $keyType
* @return \Pterodactyl\Models\ApiKey * @return \Pterodactyl\Models\ApiKey
* *
* @throws \Pterodactyl\Exceptions\Model\DataValidationException * @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. * Authenticate that this server exists and is not suspended or marked as installing.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next
* @return mixed * @return mixed
*/ */
public function handle(Request $request, Closure $next) 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. * a 404 error if a model is not found.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next
* @return mixed * @return mixed
*/ */
public function handle($request, Closure $next) 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. * Check if a request from the daemon can be properly attributed back to a single node instance.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next
* @return mixed * @return mixed
* *
* @throws \Symfony\Component\HttpKernel\Exception\HttpException * @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. * Set the session for API calls to only last for the one request.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next
* @return mixed * @return mixed
*/ */
public function handle(Request $request, Closure $next) public function handle(Request $request, Closure $next)

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -97,8 +97,8 @@ class UpdateServerBuildConfigurationRequest extends ServerWriteRequest
* call. * call.
* *
* @param string $field * @param string $field
* @param array $rules * @param array $rules
* @param bool $limits * @param bool $limits
* @return array * @return array
* *
* @see https://github.com/pterodactyl/panel/issues/1500 * @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 the user model for the requested external user.
*
* @return \Pterodactyl\Models\User * @return \Pterodactyl\Models\User
*/ */
public function getUserModel(): User public function getUserModel(): User

View file

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

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