forked from Alex/Pterodactyl-Panel
Fix all StyleCI errors and probably break everything in the process
This commit is contained in:
parent
b5e50719ac
commit
432e28b6bb
@ -65,14 +65,14 @@ class EmailSettingsCommand extends Command
|
||||
public function handle()
|
||||
{
|
||||
$this->variables['MAIL_DRIVER'] = $this->option('driver') ?? $this->choice(
|
||||
trans('command/messages.environment.mail.ask_driver'), [
|
||||
trans('command/messages.environment.mail.ask_driver'), [
|
||||
'smtp' => 'SMTP Server',
|
||||
'mail' => 'PHP\'s Internal Mail Function',
|
||||
'mailgun' => 'Mailgun Transactional Email',
|
||||
'mandrill' => 'Mandrill Transactional Email',
|
||||
'postmark' => 'Postmarkapp Transactional Email',
|
||||
], $this->config->get('mail.driver', 'smtp')
|
||||
);
|
||||
);
|
||||
|
||||
$method = 'setup' . studly_case($this->variables['MAIL_DRIVER']) . 'DriverVariables';
|
||||
if (method_exists($this, $method)) {
|
||||
|
@ -165,6 +165,7 @@ class DatabaseController extends Controller
|
||||
$this->alert->danger(
|
||||
sprintf('There was an error while trying to connect to the host or while executing a query: "%s"', $exception->getMessage())
|
||||
)->flash();
|
||||
|
||||
return $redirect->withInput($request->normalize());
|
||||
} else {
|
||||
throw $exception;
|
||||
|
@ -86,7 +86,7 @@ class ScheduleTaskController extends ClientApiController
|
||||
}
|
||||
|
||||
$this->repository->update($task->id, [
|
||||
'action' => $request->input('action'),
|
||||
'action' => $request->input('action'),
|
||||
'payload' => $request->input('payload'),
|
||||
'time_offset' => $request->input('time_offset'),
|
||||
]);
|
||||
|
@ -3,8 +3,6 @@
|
||||
namespace Pterodactyl\Http\Controllers\Api\Remote\Servers;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Pterodactyl\Models\Server;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Pterodactyl\Http\Controllers\Controller;
|
||||
use Pterodactyl\Repositories\Eloquent\BackupRepository;
|
||||
|
@ -8,7 +8,6 @@ use GuzzleHttp\Exception\ConnectException;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
use Pterodactyl\Repositories\Daemon\ConfigurationRepository;
|
||||
use Pterodactyl\Contracts\Repository\NodeRepositoryInterface;
|
||||
use Pterodactyl\Repositories\Wings\DaemonConfigurationRepository;
|
||||
use Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException;
|
||||
|
@ -168,8 +168,8 @@ return [
|
||||
| Cast the given "real type" to the given "type".
|
||||
|
|
||||
*/
|
||||
'type_overrides' => [
|
||||
'type_overrides' => [
|
||||
'integer' => 'int',
|
||||
'boolean' => 'bool',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
@ -3,8 +3,8 @@
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Cake\Chronos\Chronos;
|
||||
use Illuminate\Support\Str;
|
||||
use Faker\Generator as Faker;
|
||||
use Pterodactyl\Models\Node;
|
||||
use Faker\Generator as Faker;
|
||||
use Pterodactyl\Models\ApiKey;
|
||||
|
||||
/*
|
||||
|
@ -26,8 +26,8 @@ class ChangeServicesToUseAMoreUniqueIdentifier extends Migration
|
||||
|
||||
DB::table('services')->get(['id', 'author', 'uuid'])->each(function ($service) {
|
||||
DB::table('services')->where('id', $service->id)->update([
|
||||
'author' => ($service->author === 'ptrdctyl-v040-11e6-8b77-86f30ca893d3') ? 'support@pterodactyl.io' : 'unknown@unknown-author.com',
|
||||
'uuid' => Uuid::uuid4()->toString(),
|
||||
'author' => ($service->author === 'ptrdctyl-v040-11e6-8b77-86f30ca893d3') ? 'support@pterodactyl.io' : 'unknown@unknown-author.com',
|
||||
'uuid' => Uuid::uuid4()->toString(),
|
||||
]);
|
||||
});
|
||||
|
||||
|
@ -44,12 +44,12 @@ class MergePermissionsTableIntoSubusers extends Migration
|
||||
{
|
||||
foreach (DB::select('SELECT id, permissions FROM subusers') as $datum) {
|
||||
$values = [];
|
||||
foreach(json_decode($datum->permissions, true) as $permission) {
|
||||
foreach (json_decode($datum->permissions, true) as $permission) {
|
||||
$values[] = $datum->id;
|
||||
$values[] = $permission;
|
||||
}
|
||||
|
||||
if (!empty($values)) {
|
||||
if (! empty($values)) {
|
||||
$string = 'VALUES ' . implode(', ', array_fill(0, count($values) / 2, '(?, ?)'));
|
||||
|
||||
DB::insert('INSERT INTO permissions(`subuser_id`, `permission`) ' . $string, $values);
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateBackupsTable extends Migration
|
||||
{
|
||||
|
@ -3,9 +3,9 @@
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Container\Container;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Contracts\Encryption\Encrypter;
|
||||
|
||||
class StoreNodeTokensAsEncryptedValue extends Migration
|
||||
|
@ -54,11 +54,11 @@ class PackUpdateServiceTest extends TestCase
|
||||
{
|
||||
$model = factory(Pack::class)->make();
|
||||
$this->repository->shouldReceive('withoutFreshModel->update')->with($model->id, [
|
||||
'locked' => false,
|
||||
'visible' => false,
|
||||
'selectable' => false,
|
||||
'test-data' => 'value',
|
||||
])->once()->andReturn(1);
|
||||
'locked' => false,
|
||||
'visible' => false,
|
||||
'selectable' => false,
|
||||
'test-data' => 'value',
|
||||
])->once()->andReturn(1);
|
||||
|
||||
$this->assertEquals(1, $this->service->handle($model, ['test-data' => 'value']));
|
||||
}
|
||||
@ -88,11 +88,11 @@ class PackUpdateServiceTest extends TestCase
|
||||
$this->repository->shouldReceive('setColumns')->with(['id', 'egg_id'])->once()->andReturnSelf()
|
||||
->shouldReceive('find')->with($model->id)->once()->andReturn($model);
|
||||
$this->repository->shouldReceive('withoutFreshModel->update')->with($model->id, [
|
||||
'locked' => false,
|
||||
'visible' => false,
|
||||
'selectable' => false,
|
||||
'test-data' => 'value',
|
||||
])->once()->andReturn(1);
|
||||
'locked' => false,
|
||||
'visible' => false,
|
||||
'selectable' => false,
|
||||
'test-data' => 'value',
|
||||
])->once()->andReturn(1);
|
||||
|
||||
$this->assertEquals(1, $this->service->handle($model->id, ['test-data' => 'value']));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user