Use more standardized phpcs
This commit is contained in:
parent
a043071e3c
commit
c449ca5155
493 changed files with 1116 additions and 3903 deletions
|
@ -13,7 +13,7 @@ class AddArkServiceOptionFixed extends Migration
|
|||
$service = DB::table('services')->select('id')->where('author', 'ptrdctyl-v040-11e6-8b77-86f30ca893d3')->where('name', 'Source Engine')->first();
|
||||
|
||||
// No SRCDS Service, Skipping
|
||||
if (! $service) {
|
||||
if (!$service) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ class MigrateToNewServiceSystem extends Migration
|
|||
{
|
||||
DB::transaction(function () {
|
||||
$service = DB::table('services')->where('author', config('pterodactyl.service.core'))->where('folder', 'srcds')->first();
|
||||
if (! $service) {
|
||||
if (!$service) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ class UpdateOldPermissionsToPointToNewScheduleSystem extends Migration
|
|||
$permissions = DB::table('permissions')->where('permission', 'like', '%-task%')->get();
|
||||
foreach ($permissions as $record) {
|
||||
$parts = explode('-', $record->permission);
|
||||
if (! in_array(array_get($parts, 1), ['tasks', 'task']) || count($parts) !== 2) {
|
||||
if (!in_array(array_get($parts, 1), ['tasks', 'task']) || count($parts) !== 2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ class UpdateOldPermissionsToPointToNewScheduleSystem extends Migration
|
|||
$permissions = DB::table('permissions')->where('permission', 'like', '%-schedule%')->get();
|
||||
foreach ($permissions as $record) {
|
||||
$parts = explode('-', $record->permission);
|
||||
if (! in_array(array_get($parts, 1), ['schedules', 'schedule']) || count($parts) !== 2) {
|
||||
if (!in_array(array_get($parts, 1), ['schedules', 'schedule']) || count($parts) !== 2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ class SetupTableForKeyEncryption extends Migration
|
|||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws \Throwable
|
||||
*/
|
||||
|
@ -29,6 +30,7 @@ class SetupTableForKeyEncryption extends Migration
|
|||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Exception
|
||||
* @throws \Throwable
|
||||
*/
|
||||
|
|
|
@ -83,7 +83,7 @@ class MergePermissionsTableIntoSubusers extends Migration
|
|||
->map(function ($value) {
|
||||
return self::$permissionsMap[$value] ?? null;
|
||||
})->filter(function ($value) {
|
||||
return ! is_null($value) && $value !== Permission::ACTION_WEBSOCKET_CONNECT;
|
||||
return !is_null($value) && $value !== Permission::ACTION_WEBSOCKET_CONNECT;
|
||||
})
|
||||
// All subusers get this permission, so make sure it gets pushed into the array.
|
||||
->merge([Permission::ACTION_WEBSOCKET_CONNECT])
|
||||
|
@ -109,13 +109,13 @@ class MergePermissionsTableIntoSubusers extends Migration
|
|||
$values = [];
|
||||
foreach (json_decode($datum->permissions, true) as $permission) {
|
||||
$v = $flipped[$permission] ?? null;
|
||||
if (! empty($v)) {
|
||||
if (!empty($v)) {
|
||||
$values[] = $datum->id;
|
||||
$values[] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
|
|
@ -14,6 +14,7 @@ class StoreNodeTokensAsEncryptedValue extends Migration
|
|||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function up()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue