Skip to content

Commit 7543ef0

Browse files
committed
Format files
1 parent 26e4ff1 commit 7543ef0

File tree

193 files changed

+624
-602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+624
-602
lines changed

.php_cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ return PhpCsFixer\Config::create()
3939
'ordered_imports' => [
4040
'sortAlgorithm' => 'length',
4141
],
42-
'phpdoc_align' => ['tags' => ['param']],
42+
'phpdoc_align' => false,
4343
'phpdoc_separation' => false,
4444
'protected_to_private' => false,
4545
'psr0' => ['dir' => 'app'],

app/Console/Commands/Environment/AppSettingsCommand.php

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class AppSettingsCommand extends Command
7979
* AppSettingsCommand constructor.
8080
*
8181
* @param \Illuminate\Contracts\Config\Repository $config
82-
* @param \Illuminate\Contracts\Console\Kernel $command
82+
* @param \Illuminate\Contracts\Console\Kernel $command
8383
*/
8484
public function __construct(ConfigRepository $config, Kernel $command)
8585
{
@@ -102,41 +102,41 @@ public function handle()
102102

103103
$this->output->comment(trans('command/messages.environment.app.author_help'));
104104
$this->variables['APP_SERVICE_AUTHOR'] = $this->option('author') ?? $this->ask(
105-
trans('command/messages.environment.app.author'), $this->config->get('pterodactyl.service.author', 'unknown@unknown.com')
106-
);
105+
trans('command/messages.environment.app.author'), $this->config->get('pterodactyl.service.author', 'unknown@unknown.com')
106+
);
107107

108108
$this->output->comment(trans('command/messages.environment.app.app_url_help'));
109109
$this->variables['APP_URL'] = $this->option('url') ?? $this->ask(
110-
trans('command/messages.environment.app.app_url'), $this->config->get('app.url', 'http://example.org')
111-
);
110+
trans('command/messages.environment.app.app_url'), $this->config->get('app.url', 'http://example.org')
111+
);
112112

113113
$this->output->comment(trans('command/messages.environment.app.timezone_help'));
114114
$this->variables['APP_TIMEZONE'] = $this->option('timezone') ?? $this->anticipate(
115-
trans('command/messages.environment.app.timezone'),
116-
DateTimeZone::listIdentifiers(DateTimeZone::ALL),
117-
$this->config->get('app.timezone')
118-
);
115+
trans('command/messages.environment.app.timezone'),
116+
DateTimeZone::listIdentifiers(DateTimeZone::ALL),
117+
$this->config->get('app.timezone')
118+
);
119119

120120
$selected = $this->config->get('cache.default', 'redis');
121121
$this->variables['CACHE_DRIVER'] = $this->option('cache') ?? $this->choice(
122-
trans('command/messages.environment.app.cache_driver'),
123-
self::ALLOWED_CACHE_DRIVERS,
124-
array_key_exists($selected, self::ALLOWED_CACHE_DRIVERS) ? $selected : null
125-
);
122+
trans('command/messages.environment.app.cache_driver'),
123+
self::ALLOWED_CACHE_DRIVERS,
124+
array_key_exists($selected, self::ALLOWED_CACHE_DRIVERS) ? $selected : null
125+
);
126126

127127
$selected = $this->config->get('session.driver', 'redis');
128128
$this->variables['SESSION_DRIVER'] = $this->option('session') ?? $this->choice(
129-
trans('command/messages.environment.app.session_driver'),
130-
self::ALLOWED_SESSION_DRIVERS,
131-
array_key_exists($selected, self::ALLOWED_SESSION_DRIVERS) ? $selected : null
132-
);
129+
trans('command/messages.environment.app.session_driver'),
130+
self::ALLOWED_SESSION_DRIVERS,
131+
array_key_exists($selected, self::ALLOWED_SESSION_DRIVERS) ? $selected : null
132+
);
133133

134134
$selected = $this->config->get('queue.default', 'redis');
135135
$this->variables['QUEUE_CONNECTION'] = $this->option('queue') ?? $this->choice(
136-
trans('command/messages.environment.app.queue_driver'),
137-
self::ALLOWED_QUEUE_DRIVERS,
138-
array_key_exists($selected, self::ALLOWED_QUEUE_DRIVERS) ? $selected : null
139-
);
136+
trans('command/messages.environment.app.queue_driver'),
137+
self::ALLOWED_QUEUE_DRIVERS,
138+
array_key_exists($selected, self::ALLOWED_QUEUE_DRIVERS) ? $selected : null
139+
);
140140

141141
if (! is_null($this->option('settings-ui'))) {
142142
$this->variables['APP_ENVIRONMENT_ONLY'] = $this->option('settings-ui') == 'true' ? 'false' : 'true';
@@ -166,8 +166,8 @@ private function checkForRedis()
166166

167167
$this->output->note(trans('command/messages.environment.app.using_redis'));
168168
$this->variables['REDIS_HOST'] = $this->option('redis-host') ?? $this->ask(
169-
trans('command/messages.environment.app.redis_host'), $this->config->get('database.redis.default.host')
170-
);
169+
trans('command/messages.environment.app.redis_host'), $this->config->get('database.redis.default.host')
170+
);
171171

172172
$askForRedisPassword = true;
173173
if (! empty($this->config->get('database.redis.default.password'))) {
@@ -178,16 +178,16 @@ private function checkForRedis()
178178
if ($askForRedisPassword) {
179179
$this->output->comment(trans('command/messages.environment.app.redis_pass_help'));
180180
$this->variables['REDIS_PASSWORD'] = $this->option('redis-pass') ?? $this->output->askHidden(
181-
trans('command/messages.environment.app.redis_password')
182-
);
181+
trans('command/messages.environment.app.redis_password')
182+
);
183183
}
184184

185185
if (empty($this->variables['REDIS_PASSWORD'])) {
186186
$this->variables['REDIS_PASSWORD'] = 'null';
187187
}
188188

189189
$this->variables['REDIS_PORT'] = $this->option('redis-port') ?? $this->ask(
190-
trans('command/messages.environment.app.redis_port'), $this->config->get('database.redis.default.port')
191-
);
190+
trans('command/messages.environment.app.redis_port'), $this->config->get('database.redis.default.port')
191+
);
192192
}
193193
}

app/Console/Commands/Environment/DatabaseSettingsCommand.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ class DatabaseSettingsCommand extends Command
5959
* DatabaseSettingsCommand constructor.
6060
*
6161
* @param \Illuminate\Contracts\Config\Repository $config
62-
* @param \Illuminate\Database\DatabaseManager $database
63-
* @param \Illuminate\Contracts\Console\Kernel $console
62+
* @param \Illuminate\Database\DatabaseManager $database
63+
* @param \Illuminate\Contracts\Console\Kernel $console
6464
*/
6565
public function __construct(ConfigRepository $config, DatabaseManager $database, Kernel $console)
6666
{
@@ -82,21 +82,21 @@ public function handle()
8282
{
8383
$this->output->note(trans('command/messages.environment.database.host_warning'));
8484
$this->variables['DB_HOST'] = $this->option('host') ?? $this->ask(
85-
trans('command/messages.environment.database.host'), $this->config->get('database.connections.mysql.host', '127.0.0.1')
86-
);
85+
trans('command/messages.environment.database.host'), $this->config->get('database.connections.mysql.host', '127.0.0.1')
86+
);
8787

8888
$this->variables['DB_PORT'] = $this->option('port') ?? $this->ask(
89-
trans('command/messages.environment.database.port'), $this->config->get('database.connections.mysql.port', 3306)
90-
);
89+
trans('command/messages.environment.database.port'), $this->config->get('database.connections.mysql.port', 3306)
90+
);
9191

9292
$this->variables['DB_DATABASE'] = $this->option('database') ?? $this->ask(
93-
trans('command/messages.environment.database.database'), $this->config->get('database.connections.mysql.database', 'panel')
94-
);
93+
trans('command/messages.environment.database.database'), $this->config->get('database.connections.mysql.database', 'panel')
94+
);
9595

9696
$this->output->note(trans('command/messages.environment.database.username_warning'));
9797
$this->variables['DB_USERNAME'] = $this->option('username') ?? $this->ask(
98-
trans('command/messages.environment.database.username'), $this->config->get('database.connections.mysql.username', 'pterodactyl')
99-
);
98+
trans('command/messages.environment.database.username'), $this->config->get('database.connections.mysql.username', 'pterodactyl')
99+
);
100100

101101
$askForMySQLPassword = true;
102102
if (! empty($this->config->get('database.connections.mysql.password')) && $this->input->isInteractive()) {
@@ -136,15 +136,15 @@ public function handle()
136136
private function testMySQLConnection()
137137
{
138138
$this->config->set('database.connections._pterodactyl_command_test', [
139-
'driver' => 'mysql',
140-
'host' => $this->variables['DB_HOST'],
141-
'port' => $this->variables['DB_PORT'],
142-
'database' => $this->variables['DB_DATABASE'],
143-
'username' => $this->variables['DB_USERNAME'],
144-
'password' => $this->variables['DB_PASSWORD'],
145-
'charset' => 'utf8mb4',
146-
'collation' => 'utf8mb4_unicode_ci',
147-
'strict' => true,
139+
'driver' => 'mysql',
140+
'host' => $this->variables['DB_HOST'],
141+
'port' => $this->variables['DB_PORT'],
142+
'database' => $this->variables['DB_DATABASE'],
143+
'username' => $this->variables['DB_USERNAME'],
144+
'password' => $this->variables['DB_PASSWORD'],
145+
'charset' => 'utf8mb4',
146+
'collation' => 'utf8mb4_unicode_ci',
147+
'strict' => true,
148148
]);
149149

150150
$this->database->connection('_pterodactyl_command_test')->getPdo();

app/Console/Commands/Environment/EmailSettingsCommand.php

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -59,36 +59,37 @@ public function __construct(ConfigRepository $config)
5959

6060
/**
6161
* Handle command execution.
62+
*
6263
* @throws \Pterodactyl\Exceptions\PterodactylException
6364
*/
6465
public function handle()
6566
{
6667
$this->variables['MAIL_DRIVER'] = $this->option('driver') ?? $this->choice(
67-
trans('command/messages.environment.mail.ask_driver'), [
68+
trans('command/messages.environment.mail.ask_driver'), [
6869
'smtp' => 'SMTP Server',
6970
'mail' => 'PHP\'s Internal Mail Function',
7071
'mailgun' => 'Mailgun Transactional Email',
7172
'mandrill' => 'Mandrill Transactional Email',
7273
'postmark' => 'Postmarkapp Transactional Email',
7374
], $this->config->get('mail.driver', 'smtp')
74-
);
75+
);
7576

7677
$method = 'setup' . studly_case($this->variables['MAIL_DRIVER']) . 'DriverVariables';
7778
if (method_exists($this, $method)) {
7879
$this->{$method}();
7980
}
8081

8182
$this->variables['MAIL_FROM'] = $this->option('email') ?? $this->ask(
82-
trans('command/messages.environment.mail.ask_mail_from'), $this->config->get('mail.from.address')
83-
);
83+
trans('command/messages.environment.mail.ask_mail_from'), $this->config->get('mail.from.address')
84+
);
8485

8586
$this->variables['MAIL_FROM_NAME'] = $this->option('from') ?? $this->ask(
86-
trans('command/messages.environment.mail.ask_mail_name'), $this->config->get('mail.from.name')
87-
);
87+
trans('command/messages.environment.mail.ask_mail_name'), $this->config->get('mail.from.name')
88+
);
8889

8990
$this->variables['MAIL_ENCRYPTION'] = $this->option('encryption') ?? $this->choice(
90-
trans('command/messages.environment.mail.ask_encryption'), ['tls' => 'TLS', 'ssl' => 'SSL', '' => 'None'], $this->config->get('mail.encryption', 'tls')
91-
);
91+
trans('command/messages.environment.mail.ask_encryption'), ['tls' => 'TLS', 'ssl' => 'SSL', '' => 'None'], $this->config->get('mail.encryption', 'tls')
92+
);
9293

9394
$this->writeToEnvironment($this->variables);
9495

@@ -102,20 +103,20 @@ public function handle()
102103
private function setupSmtpDriverVariables()
103104
{
104105
$this->variables['MAIL_HOST'] = $this->option('host') ?? $this->ask(
105-
trans('command/messages.environment.mail.ask_smtp_host'), $this->config->get('mail.host')
106-
);
106+
trans('command/messages.environment.mail.ask_smtp_host'), $this->config->get('mail.host')
107+
);
107108

108109
$this->variables['MAIL_PORT'] = $this->option('port') ?? $this->ask(
109-
trans('command/messages.environment.mail.ask_smtp_port'), $this->config->get('mail.port')
110-
);
110+
trans('command/messages.environment.mail.ask_smtp_port'), $this->config->get('mail.port')
111+
);
111112

112113
$this->variables['MAIL_USERNAME'] = $this->option('username') ?? $this->ask(
113-
trans('command/messages.environment.mail.ask_smtp_username'), $this->config->get('mail.username')
114-
);
114+
trans('command/messages.environment.mail.ask_smtp_username'), $this->config->get('mail.username')
115+
);
115116

116117
$this->variables['MAIL_PASSWORD'] = $this->option('password') ?? $this->secret(
117-
trans('command/messages.environment.mail.ask_smtp_password')
118-
);
118+
trans('command/messages.environment.mail.ask_smtp_password')
119+
);
119120
}
120121

121122
/**
@@ -124,12 +125,12 @@ private function setupSmtpDriverVariables()
124125
private function setupMailgunDriverVariables()
125126
{
126127
$this->variables['MAILGUN_DOMAIN'] = $this->option('host') ?? $this->ask(
127-
trans('command/messages.environment.mail.ask_mailgun_domain'), $this->config->get('services.mailgun.domain')
128-
);
128+
trans('command/messages.environment.mail.ask_mailgun_domain'), $this->config->get('services.mailgun.domain')
129+
);
129130

130131
$this->variables['MAILGUN_SECRET'] = $this->option('password') ?? $this->ask(
131-
trans('command/messages.environment.mail.ask_mailgun_secret'), $this->config->get('services.mailgun.secret')
132-
);
132+
trans('command/messages.environment.mail.ask_mailgun_secret'), $this->config->get('services.mailgun.secret')
133+
);
133134
}
134135

135136
/**
@@ -138,8 +139,8 @@ private function setupMailgunDriverVariables()
138139
private function setupMandrillDriverVariables()
139140
{
140141
$this->variables['MANDRILL_SECRET'] = $this->option('password') ?? $this->ask(
141-
trans('command/messages.environment.mail.ask_mandrill_secret'), $this->config->get('services.mandrill.secret')
142-
);
142+
trans('command/messages.environment.mail.ask_mandrill_secret'), $this->config->get('services.mandrill.secret')
143+
);
143144
}
144145

145146
/**
@@ -151,7 +152,7 @@ private function setupPostmarkDriverVariables()
151152
$this->variables['MAIL_HOST'] = 'smtp.postmarkapp.com';
152153
$this->variables['MAIL_PORT'] = 587;
153154
$this->variables['MAIL_USERNAME'] = $this->variables['MAIL_PASSWORD'] = $this->option('username') ?? $this->ask(
154-
trans('command/messages.environment.mail.ask_postmark_username'), $this->config->get('mail.username')
155-
);
155+
trans('command/messages.environment.mail.ask_postmark_username'), $this->config->get('mail.username')
156+
);
156157
}
157158
}

app/Console/Commands/InfoCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class InfoCommand extends Command
3838
/**
3939
* VersionCommand constructor.
4040
*
41-
* @param \Illuminate\Contracts\Config\Repository $config
41+
* @param \Illuminate\Contracts\Config\Repository $config
4242
* @param \Pterodactyl\Services\Helpers\SoftwareVersionService $versionService
4343
*/
4444
public function __construct(ConfigRepository $config, SoftwareVersionService $versionService)

app/Console/Commands/Location/DeleteLocationCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class DeleteLocationCommand extends Command
4444
* DeleteLocationCommand constructor.
4545
*
4646
* @param \Pterodactyl\Contracts\Repository\LocationRepositoryInterface $repository
47-
* @param \Pterodactyl\Services\Locations\LocationDeletionService $deletionService
47+
* @param \Pterodactyl\Services\Locations\LocationDeletionService $deletionService
4848
*/
4949
public function __construct(
5050
LocationDeletionService $deletionService,
@@ -66,8 +66,8 @@ public function handle()
6666
{
6767
$this->locations = $this->locations ?? $this->repository->all();
6868
$short = $this->option('short') ?? $this->anticipate(
69-
trans('command/messages.location.ask_short'), $this->locations->pluck('short')->toArray()
70-
);
69+
trans('command/messages.location.ask_short'), $this->locations->pluck('short')->toArray()
70+
);
7171

7272
$location = $this->locations->where('short', $short)->first();
7373
if (is_null($location)) {

app/Console/Commands/Schedule/ProcessRunnableCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class ProcessRunnableCommand extends Command
4040
/**
4141
* ProcessRunnableCommand constructor.
4242
*
43-
* @param \Pterodactyl\Services\Schedules\ProcessScheduleService $processScheduleService
43+
* @param \Pterodactyl\Services\Schedules\ProcessScheduleService $processScheduleService
4444
* @param \Pterodactyl\Contracts\Repository\ScheduleRepositoryInterface $repository
4545
*/
4646
public function __construct(ProcessScheduleService $processScheduleService, ScheduleRepositoryInterface $repository)

app/Console/Commands/Server/BulkPowerActionCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ class BulkPowerActionCommand extends Command
4343
* BulkPowerActionCommand constructor.
4444
*
4545
* @param \Pterodactyl\Contracts\Repository\Daemon\PowerRepositoryInterface $powerRepository
46-
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
47-
* @param \Illuminate\Validation\Factory $validator
46+
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
47+
* @param \Illuminate\Validation\Factory $validator
4848
*/
4949
public function __construct(
5050
PowerRepositoryInterface $powerRepository,

app/Console/Commands/Server/BulkReinstallActionCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ class BulkReinstallActionCommand extends Command
4848
/**
4949
* BulkReinstallActionCommand constructor.
5050
*
51-
* @param \Pterodactyl\Repositories\Wings\DaemonServerRepository $daemonRepository
51+
* @param \Pterodactyl\Repositories\Wings\DaemonServerRepository $daemonRepository
5252
* @param \Pterodactyl\Services\Servers\ServerConfigurationStructureService $configurationStructureService
53-
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
53+
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
5454
*/
5555
public function __construct(
5656
DaemonServerRepository $daemonRepository,

app/Console/Commands/Server/RebuildServerCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ class RebuildServerCommand extends Command
4848
/**
4949
* RebuildServerCommand constructor.
5050
*
51-
* @param \Pterodactyl\Repositories\Wings\DaemonServerRepository $daemonRepository
51+
* @param \Pterodactyl\Repositories\Wings\DaemonServerRepository $daemonRepository
5252
* @param \Pterodactyl\Services\Servers\ServerConfigurationStructureService $configurationStructureService
53-
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
53+
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
5454
*/
5555
public function __construct(
5656
DaemonServerRepository $daemonRepository,

0 commit comments

Comments
 (0)