From 18c148588a3d376dcf060d21c5fe5614d2c7c55a Mon Sep 17 00:00:00 2001 From: DariusIII Date: Sat, 20 Jan 2018 22:52:16 +0000 Subject: [PATCH] Apply fixes from StyleCI [ci skip] [skip ci] --- _install/install_nntmux.php | 17 ++++++++--------- app/Models/Settings.php | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/_install/install_nntmux.php b/_install/install_nntmux.php index ea6cfa779..18b81590a 100644 --- a/_install/install_nntmux.php +++ b/_install/install_nntmux.php @@ -5,13 +5,13 @@ if (! defined('NN_INSTALLER')) { } require_once dirname(__DIR__).DIRECTORY_SEPARATOR.'bootstrap/autoload.php'; -use App\Models\Settings; use App\Models\Tmux; use App\Models\User; -use Illuminate\Support\Facades\DB; use nntmux\ColorCLI; +use App\Models\Settings; use nntmux\config\Configure; use App\Extensions\util\Versions; +use Illuminate\Support\Facades\DB; $config = new Configure('install'); @@ -68,7 +68,6 @@ if (! $error) { User::add(env('ADMIN_USER'), env('ADMIN_PASS'), env('ADMIN_EMAIL'), 2, '', '', '', ''); - if (! $error) { // Check one of the standard tables was created and has data. $dbInstallWorked = false; @@ -78,9 +77,9 @@ if (! $error) { $error = true; ColorCLI::doEcho(ColorCLI::warningOver('Could not select data from your database, check that tables and data are properly created/inserted.')); } else { - if ($reschk > 0) { - $dbInstallWorked = true; - } + if ($reschk > 0) { + $dbInstallWorked = true; + } } $ver = new Versions(); $patch = $ver->getSQLPatchFromFile(); @@ -153,9 +152,9 @@ if (! $error) { } if (! $error) { - $sql1 = Settings::query()->where('setting', '=','nzbpath')->update(['value' => $nzb_path]); - $sql2 = Settings::query()->where('setting', '=','tmpunrarpath')->update(['value' => $unrar_path]); - $sql3 = Settings::query()->where('setting', '=','coverspath')->update(['value' => $covers_path]); + $sql1 = Settings::query()->where('setting', '=', 'nzbpath')->update(['value' => $nzb_path]); + $sql2 = Settings::query()->where('setting', '=', 'tmpunrarpath')->update(['value' => $unrar_path]); + $sql3 = Settings::query()->where('setting', '=', 'coverspath')->update(['value' => $covers_path]); if ($sql1 === null || $sql2 === null || $sql3 === null) { $error = true; } else { diff --git a/app/Models/Settings.php b/app/Models/Settings.php index 2fa734743..54a342eb0 100644 --- a/app/Models/Settings.php +++ b/app/Models/Settings.php @@ -20,9 +20,9 @@ namespace App\Models; -use Illuminate\Support\Facades\DB; use nntmux\utility\Utility; use Illuminate\Console\Command; +use Illuminate\Support\Facades\DB; use Illuminate\Database\Eloquent\Model; /**