Passed
Push — master ( 3a106b...562c3a )
by Darko
17:47 queued 07:14
created
app/Providers/HorizonServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      */
28 28
     protected function gate(): void
29 29
     {
30
-        Gate::define('viewHorizon', function ($user) {
30
+        Gate::define('viewHorizon', function($user) {
31 31
             return in_array($user->email, [
32 32
                 config('nntmux.admin_email'),
33 33
             ], true);
Please login to merge, or discard this patch.
app/Extensions/util/PhpYenc.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@  discard block
 block discarded – undo
58 58
         for ($chr = 0; $chr < $encodedLength; $chr++) {
59 59
             $decoded .= (
60 60
                 $encoded[$chr] === '=' ?
61
-                    \chr((\ord($encoded[$chr]) - 42) % 256) :
62
-                    \chr((((\ord($encoded[++$chr]) - 64) % 256) - 42) % 256)
61
+                    \chr((\ord($encoded[$chr]) - 42) % 256) : \chr((((\ord($encoded[++$chr]) - 64) % 256) - 42) % 256)
63 62
             );
64 63
         }
65 64
 
@@ -113,8 +112,7 @@  discard block
 block discarded – undo
113 112
             for ($chr = 0; $chr < $length; $chr++) {
114 113
                 $text .= (
115 114
                     $input[$chr] === '=' ?
116
-                        \chr((((\ord($input[++$chr]) - 64) % 256) - 42) % 256) :
117
-                        \chr((\ord($input[$chr]) - 42) % 256)
115
+                        \chr((((\ord($input[++$chr]) - 64) % 256) - 42) % 256) : \chr((\ord($input[$chr]) - 42) % 256)
118 116
                 );
119 117
             }
120 118
         }
Please login to merge, or discard this patch.
app/Http/Middleware/ClearanceMiddleware.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
     {
19 19
         $user = $request->user();
20 20
 
21
-        if ($user->hasAnyRole(['Admin', 'Moderator']) && ! $request->is(['Admin', 'Admin/*'])) {
21
+        if ($user->hasAnyRole(['Admin', 'Moderator']) && !$request->is(['Admin', 'Admin/*'])) {
22 22
             return $next($request);
23 23
         }
24 24
 
25 25
         if ($request->is(['Movies', 'browse/Movies', 'browse/Movies/*'])) {
26
-            if (! $user->hasDirectPermission('view movies') || ! $user->hasPermissionTo('view movies')) {
26
+            if (!$user->hasDirectPermission('view movies') || !$user->hasPermissionTo('view movies')) {
27 27
                 abort(401);
28 28
             } else {
29 29
                 return $next($request);
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         }
32 32
 
33 33
         if ($request->is(['Console', 'browse/Console', 'browse/Console/*'])) {
34
-            if (! $user->hasDirectPermission('view console') || ! $user->hasPermissionTo('view console')) {
34
+            if (!$user->hasDirectPermission('view console') || !$user->hasPermissionTo('view console')) {
35 35
                 abort(401);
36 36
             } else {
37 37
                 return $next($request);
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         }
40 40
 
41 41
         if ($request->is(['Books', 'browse/Books', 'browse/Books/*'])) {
42
-            if (! $user->hasDirectPermission('view books') || ! $user->hasPermissionTo('view books')) {
42
+            if (!$user->hasDirectPermission('view books') || !$user->hasPermissionTo('view books')) {
43 43
                 abort(401);
44 44
             } else {
45 45
                 return $next($request);
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         }
48 48
 
49 49
         if ($request->is(['Audio', 'browse/Audio', 'browse/Audio/*'])) {
50
-            if (! $user->hasDirectPermission('view audio') || ! $user->hasPermissionTo('view audio')) {
50
+            if (!$user->hasDirectPermission('view audio') || !$user->hasPermissionTo('view audio')) {
51 51
                 abort(401);
52 52
             } else {
53 53
                 return $next($request);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         }
56 56
 
57 57
         if ($request->is(['XXX', 'browse/XXX', 'browse/XXX/*'])) {
58
-            if (! $user->hasDirectPermission('view adult') || ! $user->hasPermissionTo('view adult')) {
58
+            if (!$user->hasDirectPermission('view adult') || !$user->hasPermissionTo('view adult')) {
59 59
                 abort(401);
60 60
             } else {
61 61
                 return $next($request);
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         }
64 64
 
65 65
         if ($request->is(['Games', 'browse/PC', 'browse/PC/*'])) {
66
-            if (! $user->hasDirectPermission('view pc') || ! $user->hasPermissionTo('view pc')) {
66
+            if (!$user->hasDirectPermission('view pc') || !$user->hasPermissionTo('view pc')) {
67 67
                 abort(401);
68 68
             } else {
69 69
                 return $next($request);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         }
72 72
 
73 73
         if ($request->is(['TV', 'browse/TV', 'browse/TV/*'])) {
74
-            if (! $user->hasDirectPermission('view tv') || ! $user->hasPermissionTo('view tv')) {
74
+            if (!$user->hasDirectPermission('view tv') || !$user->hasPermissionTo('view tv')) {
75 75
                 abort(401);
76 76
             } else {
77 77
                 return $next($request);
Please login to merge, or discard this patch.
app/Http/Requests/Auth/LoginLoginRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
      */
12 12
     public function rules(): array
13 13
     {
14
-        if (config('captcha.enabled') === true && (! empty(config('captcha.secret')) && ! empty(config('captcha.sitekey')))) {
14
+        if (config('captcha.enabled') === true && (!empty(config('captcha.secret')) && !empty(config('captcha.sitekey')))) {
15 15
             return [
16 16
                 'g-recaptcha-response' => [
17 17
                     'required',
Please login to merge, or discard this patch.
app/Http/Controllers/RssController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
             return $user;
31 31
         }
32 32
 
33
-        $outputXML = (! ($request->has('o') && $request->input('o') === 'json'));
33
+        $outputXML = (!($request->has('o') && $request->input('o') === 'json'));
34 34
 
35 35
         $userNum = ($request->has('num') && is_numeric($request->input('num')) ? abs($request->input('num')) : 0);
36 36
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         $userAirDate = $request->has('airdate') && is_numeric($request->input('airdate')) ? abs($request->input('airdate')) : -1;
56 56
         $userNum = ($request->has('num') && is_numeric($request->input('num')) ? abs($request->input('num')) : 0);
57 57
         $relData = $rss->getShowsRss($userNum, $user['user_id'], User::getCategoryExclusionById($user['user_id']), $userAirDate);
58
-        $outputXML = (! ($request->has('o') && $request->input('o') === 'json'));
58
+        $outputXML = (!($request->has('o') && $request->input('o') === 'json'));
59 59
 
60 60
         $rss->output($relData, $user['params'], $outputXML, $offset, 'rss');
61 61
     }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         } elseif ($request->has('anidb')) {
83 83
             $userAnidb = ((int) $request->input('anidb') === 0 ? -1 : $request->input('anidb') + 0);
84 84
         }
85
-        $outputXML = (! ($request->has('o') && $request->input('o') === 'json'));
85
+        $outputXML = (!($request->has('o') && $request->input('o') === 'json'));
86 86
         $relData = $rss->getRss(Arr::wrap(0), $userShow, $userAnidb, $user['user_id'], $userAirDate, $userLimit, $userNum);
87 87
         $rss->output($relData, $user['params'], $outputXML, $offset, 'rss');
88 88
     }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         if (is_object($user)) {
144 144
             return $user;
145 145
         }
146
-        $outputXML = (! ($request->has('o') && $request->input('o') === 'json'));
146
+        $outputXML = (!($request->has('o') && $request->input('o') === 'json'));
147 147
         $userAirDate = $request->has('airdate') && is_numeric($request->input('airdate')) ? abs($request->input('airdate')) : -1;
148 148
         $userNum = ($request->has('num') && is_numeric($request->input('num')) ? abs($request->input('num')) : 0);
149 149
         $userLimit = $request->has('limit') && is_numeric($request->input('limit')) ? $request->input('limit') : 100;
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
         } elseif ($request->has('anidb')) {
185 185
             $userAnidb = ((int) $request->input('anidb') === 0 ? -1 : $request->input('anidb') + 0);
186 186
         }
187
-        $outputXML = (! ($request->has('o') && $request->input('o') === 'json'));
187
+        $outputXML = (!($request->has('o') && $request->input('o') === 'json'));
188 188
         $relData = $rss->getRss($categoryId, $userShow, $userAnidb, $user['user_id'], $userAirDate, $userLimit, $userNum);
189 189
         $rss->output($relData, $user['params'], $outputXML, $offset, 'rss');
190 190
     }
Please login to merge, or discard this patch.
app/Http/Controllers/MyMoviesController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         switch ($action) {
34 34
             case 'delete':
35 35
                 $movie = UserMovie::getMovie($this->userdata->id, $imdbid);
36
-                if (! $movie) {
36
+                if (!$movie) {
37 37
                     return redirect()->to('/mymovies');
38 38
                 }
39 39
                 UserMovie::delMovie($this->userdata->id, $imdbid);
@@ -52,12 +52,12 @@  discard block
 block discarded – undo
52 52
                 }
53 53
 
54 54
                 $movie = $mv->getMovieInfo($imdbid);
55
-                if (! $movie) {
55
+                if (!$movie) {
56 56
                     return redirect()->to('/mymovies');
57 57
                 }
58 58
 
59 59
                 if ($action === 'doadd') {
60
-                    $category = ($request->has('category') && \is_array($request->input('category')) && ! empty($request->input('category'))) ? $request->input('category') : [];
60
+                    $category = ($request->has('category') && \is_array($request->input('category')) && !empty($request->input('category'))) ? $request->input('category') : [];
61 61
                     UserMovie::addMovie($this->userdata->id, $imdbid, $category);
62 62
                     if ($request->has('from')) {
63 63
                         return redirect()->to($request->input('from'));
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
             case 'doedit':
90 90
                 $movie = UserMovie::getMovie($this->userdata->id, $imdbid);
91 91
 
92
-                if (! $movie) {
92
+                if (!$movie) {
93 93
                     return redirect()->to('/mymovies');
94 94
                 }
95 95
 
96 96
                 if ($action === 'doedit') {
97
-                    $category = ($request->has('category') && \is_array($request->input('category')) && ! empty($request->input('category'))) ? $request->input('category') : [];
97
+                    $category = ($request->has('category') && \is_array($request->input('category')) && !empty($request->input('category'))) ? $request->input('category') : [];
98 98
                     UserMovie::updateMovie($this->userdata->id, $imdbid, $category);
99 99
                     if ($request->has('from')) {
100 100
                         return redirect()->to($request->input('from'));
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                     if (\is_array($showcats) && \count($showcats) > 0) {
138 138
                         $catarr = [];
139 139
                         foreach ($showcats as $scat) {
140
-                            if (! empty($scat)) {
140
+                            if (!empty($scat)) {
141 141
                                 $catarr[] = $categories[$scat];
142 142
                             }
143 143
                         }
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                     if (\is_array($showcats) && \count($showcats) > 0) {
190 190
                         $catarr = [];
191 191
                         foreach ($showcats as $scat) {
192
-                            if (! empty($scat)) {
192
+                            if (!empty($scat)) {
193 193
                                 $catarr[] = $categories[$scat];
194 194
                             }
195 195
                         }
Please login to merge, or discard this patch.
app/Http/Controllers/FileListController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@
 block discarded – undo
17 17
 
18 18
         if ($guid !== null) {
19 19
             $rel = Release::getByGuid($guid);
20
-            if (! $rel) {
20
+            if (!$rel) {
21 21
                 $this->show404();
22 22
             }
23 23
 
24 24
             $nzbpath = $nzb->NZBPath($guid);
25 25
 
26
-            if (! file_exists($nzbpath)) {
26
+            if (!file_exists($nzbpath)) {
27 27
                 $this->show404();
28 28
             }
29 29
 
Please login to merge, or discard this patch.
app/Http/Controllers/NfoController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         if ($id) {
20 20
             $rel = Release::getByGuid($id);
21 21
 
22
-            if (! $rel) {
22
+            if (!$rel) {
23 23
                 abort(404, 'Release does not exist');
24 24
             }
25 25
 
Please login to merge, or discard this patch.
app/Http/Controllers/Api/XML_Response.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -245,14 +245,14 @@  discard block
 block discarded – undo
245 245
             $this->xml->startElement('category');
246 246
             $this->xml->writeAttribute('id', $this->parameters['id']);
247 247
             $this->xml->writeAttribute('name', html_entity_decode($this->parameters['title']));
248
-            if (! empty($this->parameters['description'])) {
248
+            if (!empty($this->parameters['description'])) {
249 249
                 $this->xml->writeAttribute('description', html_entity_decode($this->parameters['description']));
250 250
             }
251 251
             foreach ($this->parameters['categories'] as $c) {
252 252
                 $this->xml->startElement('subcat');
253 253
                 $this->xml->writeAttribute('id', $c['id']);
254 254
                 $this->xml->writeAttribute('name', html_entity_decode($c['title']));
255
-                if (! empty($c['description'])) {
255
+                if (!empty($c['description'])) {
256 256
                     $this->xml->writeAttribute('description', html_entity_decode($c['description']));
257 257
                 }
258 258
                 $this->xml->endElement();
@@ -353,10 +353,10 @@  discard block
 block discarded – undo
353 353
         $this->xml->writeAttribute('apimax', $this->parameters['apilimit']);
354 354
         $this->xml->writeAttribute('grabcurrent', $this->parameters['grabs']);
355 355
         $this->xml->writeAttribute('grabmax', $this->parameters['downloadlimit']);
356
-        if (! empty($this->parameters['oldestapi'])) {
356
+        if (!empty($this->parameters['oldestapi'])) {
357 357
             $this->xml->writeAttribute('apioldesttime', $this->parameters['oldestapi']);
358 358
         }
359
-        if (! empty($this->parameters['oldestgrab'])) {
359
+        if (!empty($this->parameters['oldestgrab'])) {
360 360
             $this->xml->writeAttribute('graboldesttime', $this->parameters['oldestgrab']);
361 361
         }
362 362
         $this->xml->endElement();
@@ -367,8 +367,8 @@  discard block
 block discarded – undo
367 367
      */
368 368
     public function includeReleases(): void
369 369
     {
370
-        if (! empty($this->releases)) {
371
-            if (! $this->releases instanceof Release) {
370
+        if (!empty($this->releases)) {
371
+            if (!$this->releases instanceof Release) {
372 372
                 foreach ($this->releases as $this->release) {
373 373
                     $this->xml->startElement('item');
374 374
                     $this->includeReleaseMain();
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
         } else {
410 410
             $this->writeRssCdata();
411 411
         }
412
-        if (! isset($this->parameters['dl']) || (isset($this->parameters['dl']) && (int) $this->parameters['dl'] === 1)) {
412
+        if (!isset($this->parameters['dl']) || (isset($this->parameters['dl']) && (int) $this->parameters['dl'] === 1)) {
413 413
             $this->xml->startElement('enclosure');
414 414
             $this->xml->writeAttribute(
415 415
                 'url',
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
     {
431 431
         $this->writeZedAttr('category', $this->release->categories_id);
432 432
         $this->writeZedAttr('size', $this->release->size);
433
-        if (! empty($this->release->coverurl)) {
433
+        if (!empty($this->release->coverurl)) {
434 434
             $this->writeZedAttr(
435 435
                 'coverurl',
436 436
                 $this->server['server']['url']."/covers/{$this->release->coverurl}"
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
             $this->writeZedAttr('comments', $this->release->comments);
466 466
             $this->writeZedAttr('password', $this->release->passwordstatus);
467 467
             $this->writeZedAttr('usenetdate', Carbon::parse($this->release->postdate)->toRssString());
468
-            if (! empty($this->release->group_name)) {
468
+            if (!empty($this->release->group_name)) {
469 469
                 $this->writeZedAttr('group', $this->release->group_name);
470 470
             }
471 471
         }
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
      */
477 477
     protected function setTvAttr(): void
478 478
     {
479
-        if (! empty($this->release->title)) {
479
+        if (!empty($this->release->title)) {
480 480
             $this->writeZedAttr('title', $this->release->title);
481 481
         }
482 482
         if (isset($this->release->series) && $this->release->series > 0) {
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
         if (isset($this->release->episode->episode) && $this->release->episode->episode > 0) {
486 486
             $this->writeZedAttr('episode', $this->release->episode->episode);
487 487
         }
488
-        if (! empty($this->release->firstaired)) {
488
+        if (!empty($this->release->firstaired)) {
489 489
             $this->writeZedAttr('tvairdate', $this->release->firstaired);
490 490
         }
491 491
         if (isset($this->release->tvdb) && $this->release->tvdb > 0) {
@@ -531,19 +531,19 @@  discard block
 block discarded – undo
531 531
     {
532 532
         $this->cdata = "\n\t<div>\n";
533 533
         switch (1) {
534
-            case ! empty($this->release->cover):
534
+            case !empty($this->release->cover):
535 535
                 $dir = 'movies';
536 536
                 $column = 'imdbid';
537 537
                 break;
538
-            case ! empty($this->release->mu_cover):
538
+            case !empty($this->release->mu_cover):
539 539
                 $dir = 'music';
540 540
                 $column = 'musicinfo_id';
541 541
                 break;
542
-            case ! empty($this->release->co_cover):
542
+            case !empty($this->release->co_cover):
543 543
                 $dir = 'console';
544 544
                 $column = 'consoleinfo_id';
545 545
                 break;
546
-            case ! empty($this->release->bo_cover):
546
+            case !empty($this->release->bo_cover):
547 547
                 $dir = 'books';
548 548
                 $column = 'bookinfo_id';
549 549
                 break;
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
         $cData = '';
680 680
 
681 681
         foreach ($columns as $info) {
682
-            if (! empty($this->release->$info)) {
682
+            if (!empty($this->release->$info)) {
683 683
                 if ($info === 'mu_releasedate') {
684 684
                     $ucInfo = 'Released';
685 685
                     $rDate = date('Y-m-d', strtotime($this->release->$info));
Please login to merge, or discard this patch.