Passed
Pull Request — master (#1713)
by Darko
07:01
created
app/Console/Commands/InstallNntmux.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
             }
54 54
         }
55 55
 
56
-        if (! $yesMode) {
57
-            if (! $this->confirm('Are you sure you want to install NNTmux? This will wipe your database!!')) {
56
+        if (!$yesMode) {
57
+            if (!$this->confirm('Are you sure you want to install NNTmux? This will wipe your database!!')) {
58 58
                 $this->info('Installation aborted by user.');
59 59
                 exit;
60 60
             }
@@ -97,33 +97,33 @@  discard block
 block discarded – undo
97 97
         $zip_path = config('nntmux_settings.tmp_unzip_path');
98 98
         $unrar_path = config('nntmux.tmp_unrar_path');
99 99
 
100
-        if (! File::isWritable($nzb_path)) {
100
+        if (!File::isWritable($nzb_path)) {
101 101
             $this->warn($nzb_path.' is not writable. Please fix folder permissions');
102 102
 
103 103
             return false;
104 104
         }
105 105
 
106
-        if (! file_exists($unrar_path)) {
106
+        if (!file_exists($unrar_path)) {
107 107
             $this->info('Creating missing '.$unrar_path.' folder');
108
-            if (! @File::makeDirectory($unrar_path) && ! File::isDirectory($unrar_path)) {
108
+            if (!@File::makeDirectory($unrar_path) && !File::isDirectory($unrar_path)) {
109 109
                 throw new \RuntimeException('Unable to create '.$unrar_path.' folder');
110 110
             }
111 111
             $this->info('Folder '.$unrar_path.' successfully created');
112 112
         }
113 113
 
114
-        if (! is_writable($unrar_path)) {
114
+        if (!is_writable($unrar_path)) {
115 115
             $this->warn($unrar_path.' is not writable. Please fix folder permissions');
116 116
 
117 117
             return false;
118 118
         }
119 119
 
120
-        if (! File::isWritable($covers_path)) {
120
+        if (!File::isWritable($covers_path)) {
121 121
             $this->warn($covers_path.' is not writable. Please fix folder permissions');
122 122
 
123 123
             return false;
124 124
         }
125 125
 
126
-        if (! File::isWritable($zip_path)) {
126
+        if (!File::isWritable($zip_path)) {
127 127
             $this->warn($zip_path.' is not writable. Please fix folder permissions');
128 128
 
129 129
             return false;
Please login to merge, or discard this patch.
app/Models/Release.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     public static function updateRelease($id, $name, $searchName, $fromName, $categoryId, $parts, $grabs, $size, $postedDate, $addedDate, $videoId, $episodeId, $imDbId, $aniDbId): void
145 145
     {
146 146
         $movieInfoId = null;
147
-        if (! empty($imDbId)) {
147
+        if (!empty($imDbId)) {
148 148
             $movieInfoId = MovieInfo::whereImdbid($imDbId)->first(['id']);
149 149
         }
150 150
         self::whereId($id)->update(
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 
338 338
         $releases = $query->get();
339 339
 
340
-        $releases->each(function ($release) {
340
+        $releases->each(function($release) {
341 341
             $release->group_name = $release->group->name ?? null;
342 342
             $release->showtitle = $release->video->title ?? null;
343 343
             $release->tvdb = $release->video->tvdb ?? null;
@@ -389,12 +389,12 @@  discard block
 block discarded – undo
389 389
 
390 390
         preg_match('/(^\w+[-_. ].+?\.(\d+p)).+/i', $rel['searchname'], $similar);
391 391
 
392
-        if (! empty($similar)) {
392
+        if (!empty($similar)) {
393 393
             if (config('nntmux.elasticsearch_enabled') === true) {
394 394
                 $searchResult = (new ElasticSearchSiteSearch)->indexSearch($similar[1], 10);
395 395
             } else {
396 396
                 $searchResult = (new ManticoreSearch)->searchIndexes('releases_rt', $similar[1]);
397
-                if (! empty($searchResult)) {
397
+                if (!empty($searchResult)) {
398 398
                     $searchResult = Arr::wrap(Arr::get($searchResult, 'id'));
399 399
                 }
400 400
             }
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/ForgotPasswordController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         if (empty($email) && empty($rssToken)) {
44 44
             app('smarty.view')->assign('error', 'Missing parameter (email and/or apikey) to send password reset');
45 45
         } else {
46
-            if (config('captcha.enabled') === true && (! empty(config('captcha.secret')) && ! empty(config('captcha.sitekey')))) {
46
+            if (config('captcha.enabled') === true && (!empty(config('captcha.secret')) && !empty(config('captcha.sitekey')))) {
47 47
                 $validate = Validator::make($request->all(), [
48 48
                     'g-recaptcha-response' => 'required|captcha',
49 49
                 ]);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             //
55 55
             // Check users exists and send an email
56 56
             //
57
-            $ret = ! empty($rssToken) ? User::getByRssToken($rssToken) : User::getByEmail($email);
57
+            $ret = !empty($rssToken) ? User::getByRssToken($rssToken) : User::getByEmail($email);
58 58
             if ($ret === null) {
59 59
                 app('smarty.view')->assign('error', 'The email or apikey are not recognised.');
60 60
             } else {
Please login to merge, or discard this patch.
app/Http/Controllers/ContactUsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     {
15 15
         $this->setPreferences();
16 16
 
17
-        if (config('captcha.enabled') === true && (! empty(config('captcha.secret')) && ! empty(config('captcha.sitekey')))) {
17
+        if (config('captcha.enabled') === true && (!empty(config('captcha.secret')) && !empty(config('captcha.sitekey')))) {
18 18
             $request->validate([
19 19
                 'g-recaptcha-response' => 'required|captcha',
20 20
             ]);
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
                 }
34 34
             }
35 35
 
36
-            if (! preg_match("/\n/i", $request->input('useremail'))) {
36
+            if (!preg_match("/\n/i", $request->input('useremail'))) {
37 37
                 SendContactUsEmail::dispatch($email, $mailTo, $mailBody)->onQueue('contactemail');
38 38
             }
39 39
             $msg = "<h2 style='text-align:center;'>Thank you for getting in touch with ".config('app.name').'.</h2>';
Please login to merge, or discard this patch.