mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
Use more standardized phpcs
This commit is contained in:
@@ -27,8 +27,6 @@ class BulkPowerActionCommand extends Command
|
||||
/**
|
||||
* Handle the bulk power request.
|
||||
*
|
||||
* @param \Pterodactyl\Repositories\Wings\DaemonPowerRepository $powerRepository
|
||||
* @param \Illuminate\Validation\Factory $validator
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
*/
|
||||
public function handle(DaemonPowerRepository $powerRepository, ValidatorFactory $validator)
|
||||
@@ -58,7 +56,7 @@ class BulkPowerActionCommand extends Command
|
||||
}
|
||||
|
||||
$count = $this->getQueryBuilder($servers, $nodes)->count();
|
||||
if (! $this->confirm(trans('command/messages.server.power.confirm', ['action' => $action, 'count' => $count])) && $this->input->isInteractive()) {
|
||||
if (!$this->confirm(trans('command/messages.server.power.confirm', ['action' => $action, 'count' => $count])) && $this->input->isInteractive()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -87,8 +85,6 @@ class BulkPowerActionCommand extends Command
|
||||
/**
|
||||
* Returns the query builder instance that will return the servers that should be affected.
|
||||
*
|
||||
* @param array $servers
|
||||
* @param array $nodes
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
protected function getQueryBuilder(array $servers, array $nodes)
|
||||
@@ -97,11 +93,11 @@ class BulkPowerActionCommand extends Command
|
||||
->where('suspended', false)
|
||||
->where('installed', Server::STATUS_INSTALLED);
|
||||
|
||||
if (! empty($nodes) && ! empty($servers)) {
|
||||
if (!empty($nodes) && !empty($servers)) {
|
||||
$instance->whereIn('id', $servers)->orWhereIn('node_id', $nodes);
|
||||
} elseif (empty($nodes) && ! empty($servers)) {
|
||||
} elseif (empty($nodes) && !empty($servers)) {
|
||||
$instance->whereIn('id', $servers);
|
||||
} elseif (! empty($nodes) && empty($servers)) {
|
||||
} elseif (!empty($nodes) && empty($servers)) {
|
||||
$instance->whereIn('node_id', $nodes);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user