Passed
Push — master ( cd7b84...44278c )
by Darko
31:55 queued 21:06
created
app/Models/Predb.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@
 block discarded – undo
196 196
             return $predb;
197 197
         }
198 198
         $sql = self::query()->leftJoin('releases', 'releases.predb_id', '=', 'predb.id')->orderByDesc('predb.predate');
199
-        if (! empty($search)) {
199
+        if (!empty($search)) {
200 200
             if (config('nntmux.elasticsearch_enabled') === true) {
201 201
                 $ids = (new ElasticSearchSiteSearch)->predbIndexSearch($search);
202 202
             } else {
Please login to merge, or discard this patch.
app/Console/Commands/CleanNZB.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function handle(): void
38 38
     {
39 39
         // Check if any options are false
40
-        if (! $this->option('notindb') && ! $this->option('notondisk')) {
40
+        if (!$this->option('notindb') && !$this->option('notondisk')) {
41 41
             $this->error('You must specify at least one option. See: --help');
42 42
             exit();
43 43
         }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             $guid = stristr($filePath->getFilename(), '.nzb.gz', true);
64 64
             if (File::isFile($filePath) && $guid) {
65 65
                 // If NZB file guid is not present in DB delete the file from disk
66
-                if (! $releases->whereGuid($guid)->exists()) {
66
+                if (!$releases->whereGuid($guid)->exists()) {
67 67
                     if ($delete) {
68 68
                         File::delete($filePath);
69 69
                     }
@@ -88,11 +88,11 @@  discard block
 block discarded – undo
88 88
         $total = Release::count();
89 89
         $this->alert("Total releases to check: $total");
90 90
 
91
-        Release::where('nzbstatus', 1)->chunkById((int) $this->option('chunksize'), function (Collection $releases) use ($delete, &$checked, &$deleted, $nzb, $rel) {
91
+        Release::where('nzbstatus', 1)->chunkById((int) $this->option('chunksize'), function(Collection $releases) use ($delete, &$checked, &$deleted, $nzb, $rel) {
92 92
             echo 'Total done: '.$checked."\r";
93 93
             foreach ($releases as $r) {
94 94
 
95
-                if (! $nzb->NZBPath($r->guid)) {
95
+                if (!$nzb->NZBPath($r->guid)) {
96 96
                     if ($delete) {
97 97
                         $rel->deleteSingle(['g' => $r->guid, 'i' => $r->id], $nzb, new ReleaseImage);
98 98
                     }
Please login to merge, or discard this patch.
app/Models/MovieInfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
             return $movie;
83 83
         }
84 84
         $sql = self::query()->select('*');
85
-        if (! empty($search)) {
85
+        if (!empty($search)) {
86 86
             $sql->whereLike('title', '%'.$search.'%');
87 87
         }
88 88
 
Please login to merge, or discard this patch.
app/Providers/AppServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         Paginator::useBootstrapFive();
21 21
         $smarty = app('smarty.view');
22 22
         view()->share('smarty', $smarty);
23
-        Gate::define('viewPulse', function (User $user) {
23
+        Gate::define('viewPulse', function(User $user) {
24 24
             return $user->hasRole('Admin');
25 25
         });
26 26
         Event::listen(Login::class, LoginViaRemember::class);
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/AdminSiteController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         }
150 150
 
151 151
         // convert from a string array to an int array as we want to use int
152
-        $book_reqids_ids = array_map(function ($value) {
152
+        $book_reqids_ids = array_map(function($value) {
153 153
             return (int) $value;
154 154
         }, $book_reqids_ids);
155 155
         $this->smarty->assign('book_reqids_ids', $book_reqids_ids);
@@ -159,14 +159,14 @@  discard block
 block discarded – undo
159 159
         $books_selected = explode(',', Settings::settingValue('book_reqids'));
160 160
 
161 161
         // convert from a string array to an int array
162
-        $books_selected = array_map(function ($value) {
162
+        $books_selected = array_map(function($value) {
163 163
             return (int) $value;
164 164
         }, $books_selected);
165 165
         $this->smarty->assign('book_reqids_selected', $books_selected);
166 166
 
167 167
         $this->smarty->assign('themelist', Utility::getThemesList());
168 168
 
169
-        if (! str_contains(config('settings.nntp_server'), 'astra')) {
169
+        if (!str_contains(config('settings.nntp_server'), 'astra')) {
170 170
             $this->smarty->assign('compress_headers_warning', 'compress_headers_warning');
171 171
         }
172 172
 
Please login to merge, or discard this patch.
app/Http/Controllers/DetailsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
             $re = new ReleaseExtra;
35 35
             $data = Release::getByGuid($guid);
36 36
             $releaseRegex = '';
37
-            if (! empty($data)) {
37
+            if (!empty($data)) {
38 38
                 $releaseRegex = ReleaseRegex::query()->where('releases_id', '=', $data['id'])->first();
39 39
             }
40 40
 
41
-            if (! $data) {
41
+            if (!$data) {
42 42
                 return redirect()->back();
43 43
             }
44 44
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             if ($data['imdbid'] !== '' && $data['imdbid'] !== 0000000) {
65 65
                 $movie = new Movie(['Settings' => $this->settings]);
66 66
                 $mov = $movie->getMovieInfo($data['imdbid']);
67
-                if (! empty($mov['title'])) {
67
+                if (!empty($mov['title'])) {
68 68
                     $mov['title'] = str_replace(['/', '\\'], '', $mov['title']);
69 69
                     $mov['actors'] = makeFieldLinks($mov, 'actors', 'movies');
70 70
                     $mov['genre'] = makeFieldLinks($mov, 'genre', 'movies');
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
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         switch ($action) {
27 27
             case 'delete':
28 28
                 $show = UserSerie::getShow($this->userdata->id, $videoId);
29
-                if (! $show) {
29
+                if (!$show) {
30 30
                     return redirect()->back();
31 31
                 }
32 32
 
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
                 }
47 47
 
48 48
                 $show = Video::getByVideoID($videoId);
49
-                if (! $show) {
49
+                if (!$show) {
50 50
                     return redirect()->to('myshows');
51 51
                 }
52 52
 
53 53
                 if ($action === 'doadd') {
54
-                    $category = ($request->has('category') && \is_array($request->input('category')) && ! empty($request->input('category'))) ? $request->input('category') : [];
54
+                    $category = ($request->has('category') && \is_array($request->input('category')) && !empty($request->input('category'))) ? $request->input('category') : [];
55 55
                     UserSerie::addShow($this->userdata->id, $videoId, $category);
56 56
                     if ($request->has('from')) {
57 57
                         return redirect()->to($request->input('from'));
@@ -85,12 +85,12 @@  discard block
 block discarded – undo
85 85
             case 'doedit':
86 86
                 $show = UserSerie::getShow($this->userdata->id, $videoId);
87 87
 
88
-                if (! $show) {
88
+                if (!$show) {
89 89
                     return redirect()->to('myshows');
90 90
                 }
91 91
 
92 92
                 if ($action === 'doedit') {
93
-                    $category = ($request->has('category') && \is_array($request->input('category')) && ! empty($request->input('category'))) ? $request->input('category') : [];
93
+                    $category = ($request->has('category') && \is_array($request->input('category')) && !empty($request->input('category'))) ? $request->input('category') : [];
94 94
                     UserSerie::updateShow($this->userdata->id, $videoId, $category);
95 95
                     if ($request->has('from')) {
96 96
                         return redirect()->to($request->input('from'));
@@ -136,9 +136,9 @@  discard block
 block discarded – undo
136 136
                 if ($shows !== null) {
137 137
                     foreach ($shows as $showk => $show) {
138 138
                         $showcats = explode('|', $show['categories']);
139
-                        if (\is_array($showcats) && ! empty($showcats)) {
139
+                        if (\is_array($showcats) && !empty($showcats)) {
140 140
                             foreach ($showcats as $scat) {
141
-                                if (! empty($scat)) {
141
+                                if (!empty($scat)) {
142 142
                                     $catArr[] = $categories[$scat];
143 143
                                 }
144 144
                             }
Please login to merge, or discard this patch.
app/Http/Controllers/BtcPaymentController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 
58 58
         if ($payload['type'] === 'InvoiceSettled') {
59 59
             // Check if we have the invoice_id in payments table and if we do, update the user account
60
-            $checkOrder = Payment::query()->where('invoice_id', '=', $payload['invoiceId'])->where('payment_status', '=', 'Settled')->where(function ($query) {
60
+            $checkOrder = Payment::query()->where('invoice_id', '=', $payload['invoiceId'])->where('payment_status', '=', 'Settled')->where(function($query) {
61 61
                 return $query->where('invoice_status', 'Pending')->orWhereNull('invoice_status');
62 62
             })->first();
63 63
             if ($checkOrder !== null) {
Please login to merge, or discard this patch.
app/Http/Controllers/GetNzbController.php 1 patch
Spacing   +8 added lines, -8 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
 
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
             'X-DNZB-Details' => url('/details/'.$request->input('id')),
114 114
         ];
115 115
 
116
-        if (! empty($relData['imdbid']) && $relData['imdbid'] > 0) {
116
+        if (!empty($relData['imdbid']) && $relData['imdbid'] > 0) {
117 117
             $headers['X-DNZB-MoreInfo'] = 'http://www.imdb.com/title/tt'.$relData['imdbid'];
118
-        } elseif (! empty($relData['tvdb']) && $relData['tvdb'] > 0) {
118
+        } elseif (!empty($relData['tvdb']) && $relData['tvdb'] > 0) {
119 119
             $headers['X-DNZB-MoreInfo'] = 'http://www.thetvdb.com/?tab=series&id='.$relData['tvdb'];
120 120
         }
121 121
 
@@ -130,15 +130,15 @@  discard block
 block discarded – undo
130 130
         $cleanName = str_replace([',', ' ', '/', '\\'], '_', $relData['searchname']);
131 131
 
132 132
         // Stream the file content
133
-        return response()->streamDownload(function () use ($nzbPath) {
133
+        return response()->streamDownload(function() use ($nzbPath) {
134 134
             $bufferSize = 1000000; // 1 MB chunks
135 135
             $gz = gzopen($nzbPath, 'rb');
136 136
 
137
-            if (! $gz) {
137
+            if (!$gz) {
138 138
                 throw new RuntimeException('Failed to open gzipped file for streaming.');
139 139
             }
140 140
 
141
-            while (! gzeof($gz)) {
141
+            while (!gzeof($gz)) {
142 142
                 echo gzread($gz, $bufferSize);
143 143
                 flush(); // Ensure chunks are sent immediately
144 144
             }
Please login to merge, or discard this patch.