Passed
Push — master ( b060c3...4a77b9 )
by Darko
06:51
created
app/Livewire/Forms/LoginForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     {
31 31
         $this->ensureIsNotRateLimited();
32 32
 
33
-        if (! Auth::attempt($this->only(['email', 'password']), $this->remember)) {
33
+        if (!Auth::attempt($this->only(['email', 'password']), $this->remember)) {
34 34
             RateLimiter::hit($this->throttleKey());
35 35
 
36 36
             throw ValidationException::withMessages([
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     protected function ensureIsNotRateLimited(): void
48 48
     {
49
-        if (! RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
49
+        if (!RateLimiter::tooManyAttempts($this->throttleKey(), 5)) {
50 50
             return;
51 51
         }
52 52
 
Please login to merge, or discard this patch.
Blacklight/ElasticSearchSiteSearch.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -277,8 +277,8 @@
 block discarded – undo
277 277
 
278 278
             // Execute a Scroll request and repeat
279 279
             $results = Elasticsearch::scroll([
280
-                'scroll_id' => $scroll_id,  //...using our previously obtained _scroll_id
281
-                'scroll' => '30s',        // and the same timeout window
280
+                'scroll_id' => $scroll_id, //...using our previously obtained _scroll_id
281
+                'scroll' => '30s', // and the same timeout window
282 282
             ]
283 283
             );
284 284
         }
Please login to merge, or discard this patch.
app/Http/Controllers/SearchController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             foreach ($releases->getBrowseOrdering() as $orderType) {
66 66
                 $this->smarty->assign(
67 67
                     'orderby'.$orderType,
68
-                    url('/search?search='.htmlentities($searchString['searchname'], ENT_QUOTES | ENT_HTML5).'&t='.implode(',', $categoryID).'&ob='.$orderType));
68
+                    url('/search?search='.htmlentities($searchString['searchname'], ENT_QUOTES|ENT_HTML5).'&t='.implode(',', $categoryID).'&ob='.$orderType));
69 69
             }
70 70
 
71 71
             $rslt = $releases->search(
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         if ($searchType !== 'basic' && $request->missing('id') && $request->missing('subject') && $request->anyFilled(['searchadvr', 'searchadvsubject', 'searchadvfilename', 'searchadvposter'])) {
124 124
             $orderByString = '';
125 125
             foreach ($searchVars as $searchVarKey => $searchVar) {
126
-                $orderByString .= "&$searchVarKey=".htmlentities($searchVar, ENT_QUOTES | ENT_HTML5);
126
+                $orderByString .= "&$searchVarKey=".htmlentities($searchVar, ENT_QUOTES|ENT_HTML5);
127 127
             }
128 128
             $orderByString = ltrim($orderByString, '&');
129 129
 
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'));
@@ -140,9 +140,9 @@  discard block
 block discarded – undo
140 140
                 $catArr = [];
141 141
                 foreach ($shows as $showk => $show) {
142 142
                     $showcats = explode('|', $show['categories']);
143
-                    if (\is_array($showcats) && ! empty($showcats)) {
143
+                    if (\is_array($showcats) && !empty($showcats)) {
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/processing/tv/TVDB.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                 }
130 130
 
131 131
                 if ((int) $videoId > 0 && (int) $tvDbId > 0) {
132
-                    if (! empty($tvdbShow['poster'])) { // Use TVDB poster if available
132
+                    if (!empty($tvdbShow['poster'])) { // Use TVDB poster if available
133 133
                         $this->getPoster($videoId);
134 134
                     } else { // Check Fanart.tv for poster
135 135
                         $poster = $this->fanart->getTVFanArt($tvDbId);
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
                         }
140 140
                     }
141 141
 
142
-                    $seasonNo = (! empty($release['season']) ? preg_replace('/^S0*/i', '', $release['season']) : '');
143
-                    $episodeNo = (! empty($release['episode']) ? preg_replace('/^E0*/i', '', $release['episode']) : '');
142
+                    $seasonNo = (!empty($release['season']) ? preg_replace('/^S0*/i', '', $release['season']) : '');
143
+                    $episodeNo = (!empty($release['episode']) ? preg_replace('/^E0*/i', '', $release['episode']) : '');
144 144
 
145 145
                     if ($episodeNo === 'all') {
146 146
                         // Set the video ID and leave episode 0
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
                     }
152 152
 
153 153
                     // Download all episodes if new show to reduce API/bandwidth usage
154
-                    if (! $this->countEpsByVideoID($videoId)) {
154
+                    if (!$this->countEpsByVideoID($videoId)) {
155 155
                         $this->getEpisodeInfo($tvDbId, -1, -1, $videoId);
156 156
                     }
157 157
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
                     }
252 252
 
253 253
                     // Check for show aliases and try match those too
254
-                    if (! empty($show->aliases)) {
254
+                    if (!empty($show->aliases)) {
255 255
                         foreach ($show->aliases as $key => $name) {
256 256
                             $matchPercent = $this->checkMatch(strtolower($name), strtolower($name), $matchPercent);
257 257
                             if ($matchPercent > $highestMatch) {
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
                     }
263 263
                 }
264 264
             }
265
-            if (! empty($highest)) {
265
+            if (!empty($highest)) {
266 266
                 $return = $this->formatShowInfo($highest);
267 267
             }
268 268
         }
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     {
299 299
         $return = $response = false;
300 300
 
301
-        if (! $this->local) {
301
+        if (!$this->local) {
302 302
             if ($videoId > 0) {
303 303
                 try {
304 304
                     $response = $this->client->series()->allEpisodes($tvDbId);
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             $poster = $this->client->series()->artworks($show->tvdb_id);
357 357
             // Grab the image with the highest score where type == 2
358 358
             $poster = collect($poster)->where('type', 2)->sortByDesc('score')->first();
359
-            $this->posterUrl = ! empty($poster->image) ? $poster->image : '';
359
+            $this->posterUrl = !empty($poster->image) ? $poster->image : '';
360 360
         } catch (ResourceNotFoundException $e) {
361 361
             $this->colorCli->climate()->error('Poster image not found on TVDB');
362 362
         } catch (UnauthorizedException $error) {
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
             'tvrage' => 0,
397 397
             'tvmaze' => 0,
398 398
             'tmdb' => 0,
399
-            'aliases' => ! empty($show->aliases) ? $show->aliases : '',
399
+            'aliases' => !empty($show->aliases) ? $show->aliases : '',
400 400
             'localzone' => "''",
401 401
         ];
402 402
     }
Please login to merge, or discard this patch.
app/Models/Settings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         // If there's an override and no mutator has been explicitly defined on
122 122
         // the model then use the override value
123
-        if ($override && ! $this->hasGetMutator($key)) {
123
+        if ($override && !$this->hasGetMutator($key)) {
124 124
             return $override->value;
125 125
         }
126 126
 
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
         $results = self::cursor()->remember();
142 142
 
143 143
         $tree = [];
144
-        if (! empty($results)) {
144
+        if (!empty($results)) {
145 145
             foreach ($results as $result) {
146
-                if (! $excludeUnsectioned || ! empty($result->section)) {
146
+                if (!$excludeUnsectioned || !empty($result->section)) {
147 147
                     $tree[$result->section][$result->subsection][$result->name] =
148 148
                         ['value' => $result->value, 'hint' => $result->hint];
149 149
                 }
Please login to merge, or discard this patch.
misc/testing/Dev/clean_nzbs.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,14 +14,14 @@  discard block
 block discarded – undo
14 14
 $dir = resource_path().'/movednzbs/';
15 15
 $colorCli = new ColorCLI;
16 16
 
17
-if (! isset($argv[1]) || ! in_array($argv[1], ['true', 'move'])) {
17
+if (!isset($argv[1]) || !in_array($argv[1], ['true', 'move'])) {
18 18
     $colorCli->error("This script can remove all nzbs not found in the db and all releases with no nzbs found. It can also move invalid nzbs.\n\n"
19 19
         ."php $argv[0] true     ...: For a dry run, to see how many would be moved.\n"
20 20
         ."php $argv[0] move     ...: Move NZBs that are possibly bad or have no release. They are moved into this folder: $dir");
21 21
     exit();
22 22
 }
23 23
 
24
-if (! File::isDirectory($dir) && ! File::makeDirectory($dir)) {
24
+if (!File::isDirectory($dir) && !File::makeDirectory($dir)) {
25 25
     exit("ERROR: Could not create folder [$dir].".PHP_EOL);
26 26
 }
27 27
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     if (File::isFile($filePath) && $guid) {
45 45
         $nzbfile = Utility::unzipGzipFile($filePath);
46 46
         $nzbContents = $nzb->nzbFileList($nzbfile, ['no-file-key' => false, 'strip-count' => true]);
47
-        if (! $nzbfile || ! @simplexml_load_string($nzbfile) || count($nzbContents) === 0) {
47
+        if (!$nzbfile || !@simplexml_load_string($nzbfile) || count($nzbContents) === 0) {
48 48
             if ($argv[1] === 'move') {
49 49
                 rename($filePath, $dir.$guid.'.nzb.gz');
50 50
             }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 $res = Release::query()->select(['id', 'guid', 'nzbstatus'])->get();
66 66
 foreach ($res as $row) {
67 67
     $nzbpath = $nzb->getNZBPath($row->guid);
68
-    if (! File::isFile($nzbpath)) {
68
+    if (!File::isFile($nzbpath)) {
69 69
         $deleted++;
70 70
         $releases->deleteSingle(['g' => $row->guid, 'i' => $row->id], $nzb, $releaseImage);
71 71
     } elseif ($row->nzbstatus !== 1) {
Please login to merge, or discard this patch.
misc/testing/Releases/recategorize.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 $colorCli = new ColorCLI;
12 12
 
13
-if (! (isset($argv[1]) && ($argv[1] === 'all' || $argv[1] === 'misc' || preg_match('/\([\d, ]+\)/', $argv[1]) || is_numeric($argv[1])))) {
13
+if (!(isset($argv[1]) && ($argv[1] === 'all' || $argv[1] === 'misc' || preg_match('/\([\d, ]+\)/', $argv[1]) || is_numeric($argv[1])))) {
14 14
     $colorCli->error(
15 15
         "\nThis script will attempt to re-categorize releases and is useful if changes have been made to Category.php.\n"
16 16
         ."No updates will be done unless the category changes\n"
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     $timeStart = now();
41 41
     $chgCount = categorizeRelease($argv, true);
42 42
     $time = now()->diffInSeconds($timeStart, true);
43
-    if (! isset($argv[2])) {
43
+    if (!isset($argv[2])) {
44 44
         $colorCli->header('Finished re-categorizing '.number_format($chgCount).' releases in '.$time.' seconds, using the searchname.').PHP_EOL;
45 45
     } else {
46 46
         $colorCli->header('Finished re-categorizing in '.$time.' seconds , using the searchname.'.PHP_EOL
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     $consoleTools = new ConsoleTools;
69 69
     $relCount = $chgCount = 0;
70 70
     if ($total > 0) {
71
-        $query->chunk('100', function ($results) use ($update, $relCount, $chgCount) {
71
+        $query->chunk('100', function($results) use ($update, $relCount, $chgCount) {
72 72
             $cat = new Categorize;
73 73
             foreach ($results as $result) {
74 74
                 $catId = $cat->determineCategory($result->groups_id, $result->searchname, $result->fromname);
Please login to merge, or discard this patch.
misc/testing/Tests/test_trakt_API.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 $c = new Blacklight\ColorCLI;
8 8
 $trakt = new TraktTv;
9 9
 
10
-if (! empty($argv[1]) && is_numeric($argv[2]) && is_numeric($argv[3])) {
10
+if (!empty($argv[1]) && is_numeric($argv[2]) && is_numeric($argv[3])) {
11 11
     // Test if your Trakt API key and configuration are working
12 12
     // If it works you should get a printed array of the show/season/episode entered
13 13
 
Please login to merge, or discard this patch.