Passed
Push — master ( d76bbf...79d65d )
by Darko
15:35 queued 05:29
created
app/Jobs/RemoveInactiveAccounts.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,17 +31,17 @@
 block discarded – undo
31 31
         $purgeDays = (int) config('nntmux.purge_inactive_users_days');
32 32
         $threshold = now()->subDays($purgeDays);
33 33
 
34
-        User::query()->where('roles_id', 1)->where(function ($q) use ($threshold) {
35
-            $q->where(function ($qq) use ($threshold) {
34
+        User::query()->where('roles_id', 1)->where(function($q) use ($threshold) {
35
+            $q->where(function($qq) use ($threshold) {
36 36
                 $qq->whereNotNull('lastlogin')->where('lastlogin', '<', $threshold);
37
-            })->orWhere(function ($qq) use ($threshold) {
37
+            })->orWhere(function($qq) use ($threshold) {
38 38
                 // Only treat null lastlogin as inactive if the account is older than threshold
39 39
                 $qq->whereNull('lastlogin')->where('created_at', '<', $threshold);
40 40
             });
41
-        })->where(function ($q) use ($threshold) {
42
-            $q->where(function ($qq) use ($threshold) {
41
+        })->where(function($q) use ($threshold) {
42
+            $q->where(function($qq) use ($threshold) {
43 43
                 $qq->whereNotNull('apiaccess')->where('apiaccess', '<', $threshold);
44
-            })->orWhere(function ($qq) use ($threshold) {
44
+            })->orWhere(function($qq) use ($threshold) {
45 45
                 $qq->whereNull('apiaccess')->where('created_at', '<', $threshold);
46 46
             });
47 47
         });
Please login to merge, or discard this patch.
app/Http/Controllers/Api/RSS.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             Category::TV_ROOT,
106 106
             Category::TV_OTHER,
107 107
             $this->releases->showPasswords(),
108
-            ! empty($limit) ? sprintf(' LIMIT %d OFFSET 0', min($limit, 100)) : ''
108
+            !empty($limit) ? sprintf(' LIMIT %d OFFSET 0', min($limit, 100)) : ''
109 109
         );
110 110
 
111 111
         $expiresAt = now()->addMinutes(config('nntmux.cache_expiry_medium'));
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             Category::MOVIE_ROOT,
134 134
             Category::MOVIE_OTHER,
135 135
             $this->releases->showPasswords(),
136
-            ! empty($limit) ? sprintf(' LIMIT %d OFFSET 0', min($limit, 100)) : ''
136
+            !empty($limit) ? sprintf(' LIMIT %d OFFSET 0', min($limit, 100)) : ''
137 137
         );
138 138
 
139 139
         $expiresAt = now()->addMinutes(config('nntmux.cache_expiry_medium'));
Please login to merge, or discard this patch.
app/Console/Commands/ProcessAdditionalGuid.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $guid = '';
38 38
 
39 39
         if ($idOpt !== null && $idOpt !== '') {
40
-            if (! ctype_digit((string) $idOpt)) {
40
+            if (!ctype_digit((string) $idOpt)) {
41 41
                 $this->error('Release ID must be numeric.');
42 42
 
43 43
                 return 5; // invalid id format
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $processor = new ProcessAdditional;
84 84
         $ok = $processor->processSingleGuid($guid);
85 85
 
86
-        if (! $ok) {
86
+        if (!$ok) {
87 87
             $this->error('Processing failed or nothing processed for '.($idOpt ? 'ID '.$idOpt : 'GUID '.$guid).'.');
88 88
 
89 89
             return 3;
Please login to merge, or discard this patch.
app/Console/Commands/DeleteReleases.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
         // Add any advanced criteria
71 71
         $advancedCriteria = $this->argument('criteria');
72
-        if (! empty($advancedCriteria)) {
72
+        if (!empty($advancedCriteria)) {
73 73
             $criteria = array_merge($criteria, $advancedCriteria);
74 74
         }
75 75
 
@@ -90,14 +90,14 @@  discard block
 block discarded – undo
90 90
         }
91 91
 
92 92
         // Show confirmation unless force flag is set
93
-        if (! $force) {
93
+        if (!$force) {
94 94
             $this->warn('You are about to delete releases matching the following criteria:');
95 95
             foreach ($criteria as $criterion) {
96 96
                 $this->line("  - {$criterion}");
97 97
             }
98 98
             $this->newLine();
99 99
 
100
-            if (! $this->confirm('Are you sure you want to proceed with the deletion?')) {
100
+            if (!$this->confirm('Are you sure you want to proceed with the deletion?')) {
101 101
                 $this->info('Operation cancelled.');
102 102
 
103 103
                 return 0;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
             // Build the query to find releases to delete
111 111
             $query = $this->buildQueryFromCriteria($criteria);
112
-            if (! $query) {
112
+            if (!$query) {
113 113
                 $this->error('Could not build query from criteria.');
114 114
 
115 115
                 return 1;
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
             // Get the query that would be executed
190 190
             $query = $this->buildQueryFromCriteria($criteria);
191 191
 
192
-            if (! $query) {
192
+            if (!$query) {
193 193
                 $this->error('Could not build query from criteria.');
194 194
 
195 195
                 return 1;
@@ -348,13 +348,13 @@  discard block
 block discarded – undo
348 348
                 switch ($modifier) {
349 349
                     case 'equals':
350 350
                         $group = DB::select('SELECT id FROM usenet_groups WHERE name = ?', [$value]);
351
-                        if (! empty($group)) {
351
+                        if (!empty($group)) {
352 352
                             return " AND groups_id = {$group[0]->id}";
353 353
                         }
354 354
                         break;
355 355
                     case 'like':
356 356
                         $groups = DB::select('SELECT id FROM usenet_groups WHERE name LIKE ?', ['%'.str_replace(' ', '%', $value).'%']);
357
-                        if (! empty($groups)) {
357
+                        if (!empty($groups)) {
358 358
                             $ids = array_column($groups, 'id');
359 359
 
360 360
                             return ' AND groups_id IN ('.implode(',', $ids).')';
Please login to merge, or discard this patch.
app/Console/Commands/FetchSamples.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 
99 99
         $query = clone $baseQuery;
100 100
 
101
-        $query->chunkById($chunkSize, function ($releases) use (&$processed, &$failed, &$remaining, $bar, $showOutput) {
101
+        $query->chunkById($chunkSize, function($releases) use (&$processed, &$failed, &$remaining, $bar, $showOutput) {
102 102
             foreach ($releases as $release) {
103 103
                 if ($remaining <= 0) {
104 104
                     return false; // stop chunking
Please login to merge, or discard this patch.
app/Policies/ThreadPolicy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     public function reply($user, Thread $thread): bool
22 22
     {
23 23
         // Admins can reply even if locked; otherwise respect lock state
24
-        return $user->hasRole('Admin') || (! $thread->locked);
24
+        return $user->hasRole('Admin') || (!$thread->locked);
25 25
     }
26 26
 
27 27
     public function delete($user, Thread $thread): bool
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
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         // Share global data with all views using View Composer
23 23
         view()->composer('*', \App\View\Composers\GlobalDataComposer::class);
24 24
 
25
-        Gate::define('viewPulse', function (User $user) {
25
+        Gate::define('viewPulse', function(User $user) {
26 26
             return $user->hasRole('Admin');
27 27
         });
28 28
         Event::listen(Login::class, LoginViaRemember::class);
Please login to merge, or discard this patch.
app/Services/UserStatsService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
             ->groupBy('roles.id', 'roles.name')
23 23
             ->get();
24 24
 
25
-        return $usersByRole->map(function ($item) {
25
+        return $usersByRole->map(function($item) {
26 26
             return [
27 27
                 'role' => $item->role_name,
28 28
                 'count' => $item->count,
Please login to merge, or discard this patch.
app/Http/Controllers/BooksController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $results = $this->paginate($rslt ?? [], $rslt[0]->_totalcount ?? 0, config('nntmux.items_per_cover_page'), $page, $request->url(), $request->query());
49 49
         $maxwords = 50;
50 50
         foreach ($results as $result) {
51
-            if (! empty($result->overview)) {
51
+            if (!empty($result->overview)) {
52 52
                 $words = explode(' ', $result->overview);
53 53
                 if (\count($words) > $maxwords) {
54 54
                     $newwords = \array_slice($words, 0, $maxwords);
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
             $books[] = $result;
59 59
         }
60 60
 
61
-        $author = ($request->has('author') && ! empty($request->input('author'))) ? stripslashes($request->input('author')) : '';
61
+        $author = ($request->has('author') && !empty($request->input('author'))) ? stripslashes($request->input('author')) : '';
62 62
 
63
-        $title = ($request->has('title') && ! empty($request->input('title'))) ? stripslashes($request->input('title')) : '';
63
+        $title = ($request->has('title') && !empty($request->input('title'))) ? stripslashes($request->input('title')) : '';
64 64
 
65 65
         $browseby_link = '&title='.$title.'&author='.$author;
66 66
 
Please login to merge, or discard this patch.