StyleCI cleanup
This commit is contained in:
parent
37a723aa58
commit
1897741381
10 changed files with 17 additions and 36 deletions
|
@ -13,7 +13,7 @@ class AddNewServiceOptionsColumns extends Migration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
DB::transaction(function() {
|
||||
DB::transaction(function () {
|
||||
Schema::table('service_options', function (Blueprint $table) {
|
||||
$table->dropColumn('executable');
|
||||
|
||||
|
@ -35,7 +35,7 @@ class AddNewServiceOptionsColumns extends Migration
|
|||
*/
|
||||
public function down()
|
||||
{
|
||||
DB::transaction(function() {
|
||||
DB::transaction(function () {
|
||||
Schema::table('service_options', function (Blueprint $table) {
|
||||
$table->dropForeign('config_from');
|
||||
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
*/
|
||||
use Pterodactyl\Models\Service;
|
||||
use Pterodactyl\Models\ServiceOption;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class MigrateToNewServiceSystem extends Migration
|
||||
|
@ -69,7 +67,7 @@ class MigrateToNewServiceSystem extends Migration
|
|||
DB::transaction(function () use ($service) {
|
||||
$options = ServiceOption::where('service_id', $service->id)->get();
|
||||
$options->each(function ($item) use ($options) {
|
||||
switch($item->tag) {
|
||||
switch ($item->tag) {
|
||||
case 'vanilla':
|
||||
$item->config_startup = '{"done": ")! For help, type ", "userInteraction": [ "Go to eula.txt for more info."]}';
|
||||
$item->config_files = '{"server.properties":{"parser": "properties", "find":{"server-ip": "0.0.0.0", "enable-query": "true", "server-port": "{{server.build.default.port}}", "query.port": "{{server.build.default.port}}"}}}';
|
||||
|
@ -117,13 +115,13 @@ class MigrateToNewServiceSystem extends Migration
|
|||
$options->each(function ($item) use ($options) {
|
||||
if ($item->tag === 'srcds' && $item->name === 'Insurgency') {
|
||||
$item->tag = 'insurgency';
|
||||
} else if ($item->tag === 'srcds' && $item->name === 'Team Fortress 2') {
|
||||
} elseif ($item->tag === 'srcds' && $item->name === 'Team Fortress 2') {
|
||||
$item->tag = 'tf2';
|
||||
} else if ($item->tag === 'srcds' && $item->name === 'Custom Source Engine Game') {
|
||||
} elseif ($item->tag === 'srcds' && $item->name === 'Custom Source Engine Game') {
|
||||
$item->tag = 'source';
|
||||
}
|
||||
|
||||
switch($item->tag) {
|
||||
switch ($item->tag) {
|
||||
case 'source':
|
||||
$item->config_startup = '{"done": "Assigned anonymous gameserver", "userInteraction": []}';
|
||||
$item->config_files = '{}';
|
||||
|
@ -164,7 +162,7 @@ class MigrateToNewServiceSystem extends Migration
|
|||
DB::transaction(function () use ($service) {
|
||||
$options = ServiceOption::where('service_id', $service->id)->get();
|
||||
$options->each(function ($item) use ($options) {
|
||||
switch($item->tag) {
|
||||
switch ($item->tag) {
|
||||
case 'tshock':
|
||||
$item->startup = null;
|
||||
$item->config_startup = '{"done": "Type \'help\' for a list of commands", "userInteraction": []}';
|
||||
|
@ -195,7 +193,7 @@ class MigrateToNewServiceSystem extends Migration
|
|||
DB::transaction(function () use ($service) {
|
||||
$options = ServiceOption::where('service_id', $service->id)->get();
|
||||
$options->each(function ($item) use ($options) {
|
||||
switch($item->tag) {
|
||||
switch ($item->tag) {
|
||||
case 'mumble':
|
||||
$item->startup = './murmur.x86 -fg';
|
||||
$item->config_startup = '{"done": "Server listening on", "userInteraction": [ "Generating new server certificate"]}';
|
||||
|
|
|
@ -19,7 +19,7 @@ class ChangeServiceVariablesValidationRules extends Migration
|
|||
});
|
||||
|
||||
DB::transaction(function () {
|
||||
foreach(ServiceVariable::all() as $variable) {
|
||||
foreach (ServiceVariable::all() as $variable) {
|
||||
$variable->rules = ($variable->required) ? 'required|regex:' . $variable->rules : 'regex:' . $variable->regex;
|
||||
$variable->save();
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ class ChangeServiceVariablesValidationRules extends Migration
|
|||
});
|
||||
|
||||
DB::transaction(function () {
|
||||
foreach(ServiceVariable::all() as $variable) {
|
||||
foreach (ServiceVariable::all() as $variable) {
|
||||
$variable->regex = str_replace(['required|regex:', 'regex:'], '', $variable->regex);
|
||||
$variable->save();
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Migrations\Migration;
|
|||
class MoveFunctionsFromFileToDatabase extends Migration
|
||||
{
|
||||
|
||||
private $default = <<<EOF
|
||||
private $default = <<<'EOF'
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
|
@ -43,7 +43,7 @@ class Service extends Core {}
|
|||
module.exports = Service;
|
||||
EOF;
|
||||
|
||||
private $default_mc = <<<EOF
|
||||
private $default_mc = <<<'EOF'
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue