Passed
Pull Request — master (#1550)
by
unknown
17:28 queued 11:40
created
app/Http/Controllers/AjaxController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
         if ($request->has('action') && (int) $request->input('action') === 1 && $request->has('emailto')) {
17 17
             $emailTo = $request->input('emailto');
18 18
             $ret = User::sendInvite(url('/'), $this->userdata->id, $emailTo);
19
-            if (! $ret) {
19
+            if (!$ret) {
20 20
                 echo 'Invite not sent.';
21 21
             } else {
22 22
                 echo 'Invite sent. Alternatively paste them following link to register - '.$ret;
Please login to merge, or discard this patch.
app/Http/Controllers/SeriesController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
 
39 39
             $show = Video::getByVideoID($id);
40 40
 
41
-            if (! $show) {
41
+            if (!$show) {
42 42
                 $this->smarty->assign('nodata', 'No video information for this series.');
43
-            } elseif (! $rel) {
43
+            } elseif (!$rel) {
44 44
                 $this->smarty->assign('nodata', 'No releases for this series.');
45 45
             } else {
46 46
                 $myshows = UserSerie::getShow($this->userdata->id, $show['id']);
@@ -67,11 +67,11 @@  discard block
 block discarded – undo
67 67
                 $seriestitles = $seriessummary = $seriescountry = [];
68 68
                 $seriestitles[] = $show['title'];
69 69
 
70
-                if (! empty($show['summary'])) {
70
+                if (!empty($show['summary'])) {
71 71
                     $seriessummary[] = $show['summary'];
72 72
                 }
73 73
 
74
-                if (! empty($show['countries_id'])) {
74
+                if (!empty($show['countries_id'])) {
75 75
                     $seriescountry[] = $show['countries_id'];
76 76
                 }
77 77
 
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
         } else {
106 106
             $letter = ($id && preg_match('/^(0\-9|[A-Z])$/i', $id)) ? $id : '0-9';
107 107
 
108
-            $showname = ($request->has('title') && ! empty($request->input('title'))) ? $request->input('title') : '';
108
+            $showname = ($request->has('title') && !empty($request->input('title'))) ? $request->input('title') : '';
109 109
 
110
-            if ($showname !== '' && ! $id) {
110
+            if ($showname !== '' && !$id) {
111 111
                 $letter = '';
112 112
             }
113 113
 
Please login to merge, or discard this patch.
app/Http/Controllers/GetNzbController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             }
35 35
 
36 36
             $res = User::getByRssToken($request->input('r'));
37
-            if (! $res) {
37
+            if (!$res) {
38 38
                 return Utility::showApiError(100);
39 39
             }
40 40
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             return Utility::showApiError(501);
53 53
         }
54 54
 
55
-        if (! $request->input('id')) {
55
+        if (!$request->input('id')) {
56 56
             return Utility::showApiError(200, 'Parameter id is required');
57 57
         }
58 58
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
         $nzbPath = (new NZB())->getNZBPath($request->input('id'));
88 88
 
89
-        if (! File::exists($nzbPath)) {
89
+        if (!File::exists($nzbPath)) {
90 90
             return Utility::showApiError(300, 'NZB file not found!');
91 91
         }
92 92
 
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
             'X-DNZB-Details' => url('/').'/details/'.$request->input('id'),
113 113
         ];
114 114
 
115
-        if (! empty($relData['imdbid']) && $relData['imdbid'] > 0) {
115
+        if (!empty($relData['imdbid']) && $relData['imdbid'] > 0) {
116 116
             $headers += ['X-DNZB-MoreInfo' => 'http://www.imdb.com/title/tt'.$relData['imdbid']];
117
-        } elseif (! empty($relData['tvdb']) && $relData['tvdb'] > 0) {
117
+        } elseif (!empty($relData['tvdb']) && $relData['tvdb'] > 0) {
118 118
             $headers += ['X-DNZB-MoreInfo' => 'http://www.thetvdb.com/?tab=series&id='.$relData['tvdb']];
119 119
         }
120 120
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         $headers += ['X-DNZB-RCode' => '200',
126 126
             'X-DNZB-RText' => 'OK, NZB content follows.', ];
127 127
 
128
-        return response()->streamDownload(function () use ($nzbPath) {
128
+        return response()->streamDownload(function() use ($nzbPath) {
129 129
             readgzfile($nzbPath);
130 130
         }, $cleanName.'.nzb', $headers);
131 131
     }
Please login to merge, or discard this patch.
app/Http/Controllers/MyShowsController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         switch ($action) {
32 32
             case 'delete':
33 33
                 $show = UserSerie::getShow($this->userdata->id, $videoId);
34
-                if (! $show) {
34
+                if (!$show) {
35 35
                     return redirect()->back();
36 36
                 }
37 37
 
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
                 }
52 52
 
53 53
                 $show = Video::getByVideoID($videoId);
54
-                if (! $show) {
54
+                if (!$show) {
55 55
                     return redirect()->to('myshows');
56 56
                 }
57 57
 
58 58
                 if ($action === 'doadd') {
59
-                    $category = ($request->has('category') && \is_array($request->input('category')) && ! empty($request->input('category'))) ? $request->input('category') : [];
59
+                    $category = ($request->has('category') && \is_array($request->input('category')) && !empty($request->input('category'))) ? $request->input('category') : [];
60 60
                     UserSerie::addShow($this->userdata->id, $videoId, $category);
61 61
                     if ($request->has('from')) {
62 62
                         return redirect()->to($request->input('from'));
@@ -90,12 +90,12 @@  discard block
 block discarded – undo
90 90
             case 'doedit':
91 91
                 $show = UserSerie::getShow($this->userdata->id, $videoId);
92 92
 
93
-                if (! $show) {
93
+                if (!$show) {
94 94
                     return redirect()->to('myshows');
95 95
                 }
96 96
 
97 97
                 if ($action === 'doedit') {
98
-                    $category = ($request->has('category') && \is_array($request->input('category')) && ! empty($request->input('category'))) ? $request->input('category') : [];
98
+                    $category = ($request->has('category') && \is_array($request->input('category')) && !empty($request->input('category'))) ? $request->input('category') : [];
99 99
                     UserSerie::updateShow($this->userdata->id, $videoId, $category);
100 100
                     if ($request->has('from')) {
101 101
                         return redirect()->to($request->input('from'));
@@ -139,10 +139,10 @@  discard block
 block discarded – undo
139 139
                 $results = [];
140 140
                 foreach ($shows as $showk => $show) {
141 141
                     $showcats = explode('|', $show['categories']);
142
-                    if (\is_array($showcats) && ! empty($showcats)) {
142
+                    if (\is_array($showcats) && !empty($showcats)) {
143 143
                         $catarr = [];
144 144
                         foreach ($showcats as $scat) {
145
-                            if (! empty($scat)) {
145
+                            if (!empty($scat)) {
146 146
                                 $catarr[] = $categories[$scat];
147 147
                             }
148 148
                         }
Please login to merge, or discard this patch.
Blacklight/AniDB.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      */
56 56
     public function deleteTitle(int $anidbID): void
57 57
     {
58
-        DB::transaction(function () use ($anidbID) {
58
+        DB::transaction(function() use ($anidbID) {
59 59
             DB::delete(
60 60
                 sprintf(
61 61
                     '
Please login to merge, or discard this patch.
Blacklight/Genres.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     private function getListQuery(string $type = '', bool $activeOnly = false): string
59 59
     {
60
-        if (! empty($type)) {
60
+        if (!empty($type)) {
61 61
             $typesql = sprintf(' AND g.type = %d', $type);
62 62
         } else {
63 63
             $typesql = '';
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
     public function getCount(string $type = '', bool $activeOnly = false): mixed
105 105
     {
106
-        if (! empty($type)) {
106
+        if (!empty($type)) {
107 107
             $typesql = sprintf(' AND g.type = %d', $type);
108 108
         } else {
109 109
             $typesql = '';
Please login to merge, or discard this patch.
Blacklight/NZBContents.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                     $foundNFO = true;
140 140
                 }
141 141
 
142
-                if ($foundNFO === false && $hiddenNFO === false && preg_match('/\(1\/1\)$/i', $subject) && ! preg_match('/\.(apk|bat|bmp|cbr|cbz|cfg|css|csv|cue|db|dll|doc|epub|exe|gif|htm|ico|idx|ini'.'|jpg|lit|log|m3u|mid|mobi|mp3|nib|nzb|odt|opf|otf|par|par2|pdf|psd|pps|png|ppt|r\d{2,4}'.'|rar|sfv|srr|sub|srt|sql|rom|rtf|tif|torrent|ttf|txt|vb|vol\d+\+\d+|wps|xml|zip)/i', $subject)) {
142
+                if ($foundNFO === false && $hiddenNFO === false && preg_match('/\(1\/1\)$/i', $subject) && !preg_match('/\.(apk|bat|bmp|cbr|cbz|cfg|css|csv|cue|db|dll|doc|epub|exe|gif|htm|ico|idx|ini'.'|jpg|lit|log|m3u|mid|mobi|mp3|nib|nzb|odt|opf|otf|par|par2|pdf|psd|pps|png|ppt|r\d{2,4}'.'|rar|sfv|srr|sub|srt|sql|rom|rtf|tif|torrent|ttf|txt|vb|vol\d+\+\d+|wps|xml|zip)/i', $subject)) {
143 143
                     $hiddenID = (string) $nzbcontents->segments->segment;
144 144
                     $hiddenNFO = true;
145 145
                 }
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
             return false;
185 185
         }
186 186
         $nzbContents = Utility::unzipGzipFile($nzbPath);
187
-        if (! $nzbContents) {
187
+        if (!$nzbContents) {
188 188
             if ($this->echooutput) {
189 189
                 echo PHP_EOL.
190 190
                     'Unable to decompress: '.
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         }
200 200
 
201 201
         $nzbFile = @simplexml_load_string($nzbContents);
202
-        if (! $nzbFile) {
202
+        if (!$nzbFile) {
203 203
             if ($this->echooutput) {
204 204
                 echo PHP_EOL."Unable to load NZB: $guid appears to be an invalid NZB, skipping.".PHP_EOL;
205 205
             }
Please login to merge, or discard this patch.
Blacklight/libraries/TraktAPI.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $url = self::API_URL."shows/{$id}/seasons/{$season}/episodes/{$ep}";
58 58
 
59 59
         $array = $this->getJsonArray($url, $extended);
60
-        if (! \is_array($array)) {
60
+        if (!\is_array($array)) {
61 61
             return false;
62 62
         }
63 63
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $array = $this->getJsonArray(
73 73
             self::API_URL.'movies/boxoffice'
74 74
         );
75
-        if (! $array) {
75
+        if (!$array) {
76 76
             return false;
77 77
         }
78 78
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $array = $this->getJsonArray(
88 88
             self::API_URL.'calendars/all/shows/'.$start.'/'.$days
89 89
         );
90
-        if (! $array) {
90
+        if (!$array) {
91 91
             return false;
92 92
         }
93 93
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             $extendedString = '?extended='.$extended;
108 108
         }
109 109
 
110
-        if (! empty($this->requestHeaders)) {
110
+        if (!empty($this->requestHeaders)) {
111 111
             try {
112 112
                 $json = $this->client->get(
113 113
                     $URI.$extendedString,
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
                 return false;
122 122
             }
123 123
 
124
-            if (! empty($json)) {
124
+            if (!empty($json)) {
125 125
                 $json = json_decode($json, true);
126
-                if (! \is_array($json) || (isset($json['status']) && $json['status'] === 'failure')) {
126
+                if (!\is_array($json) || (isset($json['status']) && $json['status'] === 'failure')) {
127 127
                     return false;
128 128
                 }
129 129
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             default => 'min',
147 147
         };
148 148
         $array = $this->getJsonArray(self::API_URL.'movies/'.Str::slug($movie), $extended);
149
-        if (! $array) {
149
+        if (!$array) {
150 150
             return false;
151 151
         }
152 152
         if ($type === 'imdbid' && isset($array['ids']['imdb'])) {
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      */
164 164
     public function searchId(int|string $id, string $site = 'trakt', int|string $type = 0)
165 165
     {
166
-        if (! \in_array($site, self::$types, false) || ! ctype_digit($id)) {
166
+        if (!\in_array($site, self::$types, false) || !ctype_digit($id)) {
167 167
             return;
168 168
         }
169 169
         if ($site === 'imdb') {
Please login to merge, or discard this patch.
Blacklight/libraries/Geary.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
  * Updated for NNTmux by DariusIII
17 17
  */
18 18
 
19
-if (! \function_exists('getAllHeaders')) {
19
+if (!\function_exists('getAllHeaders')) {
20 20
     function getAllHeaders()
21 21
     {
22
-        if (! \is_array($_SERVER)) {
22
+        if (!\is_array($_SERVER)) {
23 23
             return [];
24 24
         }
25 25
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
     private function prepare_header(array $data): array
278 278
     {
279 279
         $params = $data['params'];
280
-        $params_query = ! \is_array($params) ? "/$params" : '?'.http_build_query($params);
280
+        $params_query = !\is_array($params) ? "/$params" : '?'.http_build_query($params);
281 281
 
282 282
         $nonce = (int) round(microtime(true) * 1000);
283 283
         $body = '';
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 
320 320
         curl_setopt_array($ch, $curl_data);
321 321
 
322
-        if (! $result = curl_exec($ch)) {
322
+        if (!$result = curl_exec($ch)) {
323 323
             return $this->curl_error($ch);
324 324
         }
325 325
 
Please login to merge, or discard this patch.