Passed
Push — master ( e2a43e...f9d209 )
by Darko
09:38
created
app/View/Composers/GlobalDataComposer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
         $viewData = [
26 26
             'serverroot' => url('/'),
27
-            'site' => $siteArray,  // Now it's a proper array, not a Settings model
27
+            'site' => $siteArray, // Now it's a proper array, not a Settings model
28 28
             'theme' => 'Gentele',
29 29
         ];
30 30
 
Please login to merge, or discard this patch.
app/Console/Commands/NntmuxResetPostProcessing.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     {
54 54
 
55 55
         // Allow resetting categories only if environment is local and category is 'misc'
56
-        if (app()->environment() !== 'local' && ((isset($this->option('category')['0']) && $this->option('category')[0] !== 'misc') || ! isset($this->option('category')['0']))) {
56
+        if (app()->environment() !== 'local' && ((isset($this->option('category')['0']) && $this->option('category')[0] !== 'misc') || !isset($this->option('category')['0']))) {
57 57
             $this->error('This command can only be run in local environment');
58 58
 
59 59
             return;
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
             // Validate
102 102
             $invalid = $this->invalidCategories($normalized);
103
-            if (! empty($invalid)) {
103
+            if (!empty($invalid)) {
104 104
                 $this->error('Unknown category option(s): '.implode(', ', $invalid));
105 105
                 $this->line('Allowed: '.implode(', ', self::$allowedCategories).' (or omit --category to reset all).');
106 106
 
@@ -158,12 +158,12 @@  discard block
 block discarded – undo
158 158
     private function normalizeCategories(array $raw): array
159 159
     {
160 160
         $normalized = collect($raw)
161
-            ->flatMap(function ($opt) {
161
+            ->flatMap(function($opt) {
162 162
                 $opt = is_array($opt) ? implode(',', $opt) : (string) $opt;
163 163
 
164 164
                 return preg_split('/[\s,]+/', $opt, -1, PREG_SPLIT_NO_EMPTY);
165 165
             })
166
-            ->map(function ($opt) {
166
+            ->map(function($opt) {
167 167
                 $opt = trim((string) $opt);
168 168
                 // If the token contains '=', take the substring after the last '='
169 169
                 if (str_contains($opt, '=')) {
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
     private function invalidCategories(array $normalized): array
195 195
     {
196 196
         return collect($normalized)
197
-            ->reject(function ($opt) {
197
+            ->reject(function($opt) {
198 198
                 return in_array($opt, self::$allowedCategories, true) || $opt === 'all';
199 199
             })
200 200
             ->values()
Please login to merge, or discard this patch.
app/Console/Commands/FindSizeMismatchedReleases.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $mismatches = $query->get();
60 60
 
61 61
         if ($checkSeasonPack) {
62
-            $mismatches = $mismatches->filter(function ($release) use ($nameFixer) {
62
+            $mismatches = $mismatches->filter(function($release) use ($nameFixer) {
63 63
                 return $nameFixer->isSeasonPack($release->name);
64 64
             });
65 65
         }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
         // Regular table output for non-rename mode
87 87
         $headers = ['Release ID', 'Searchname', 'Release Size', 'Files Total', 'Difference', 'Diff %'];
88
-        $rows = $mismatches->map(function ($release) {
88
+        $rows = $mismatches->map(function($release) {
89 89
             return [
90 90
                 $release->id,
91 91
                 $release->searchname,
Please login to merge, or discard this patch.
app/Console/Commands/CaptchaStatus.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
         $recaptchaSecret = config('captcha.recaptcha.secret');
41 41
 
42 42
         $this->line('  Enabled: '.($recaptchaEnabled ? '<fg=green>Yes</>' : '<fg=red>No</>'));
43
-        $this->line('  Site Key: '.(! empty($recaptchaSitekey) ? '<fg=green>Configured</>' : '<fg=red>Missing</>'));
44
-        $this->line('  Secret: '.(! empty($recaptchaSecret) ? '<fg=green>Configured</>' : '<fg=red>Missing</>'));
43
+        $this->line('  Site Key: '.(!empty($recaptchaSitekey) ? '<fg=green>Configured</>' : '<fg=red>Missing</>'));
44
+        $this->line('  Secret: '.(!empty($recaptchaSecret) ? '<fg=green>Configured</>' : '<fg=red>Missing</>'));
45 45
         $this->newLine();
46 46
 
47 47
         // Check Turnstile
@@ -51,13 +51,13 @@  discard block
 block discarded – undo
51 51
         $turnstileSecret = config('captcha.turnstile.secret');
52 52
 
53 53
         $this->line('  Enabled: '.($turnstileEnabled ? '<fg=green>Yes</>' : '<fg=red>No</>'));
54
-        $this->line('  Site Key: '.(! empty($turnstileSitekey) ? '<fg=green>Configured</>' : '<fg=red>Missing</>'));
55
-        $this->line('  Secret: '.(! empty($turnstileSecret) ? '<fg=green>Configured</>' : '<fg=red>Missing</>'));
54
+        $this->line('  Site Key: '.(!empty($turnstileSitekey) ? '<fg=green>Configured</>' : '<fg=red>Missing</>'));
55
+        $this->line('  Secret: '.(!empty($turnstileSecret) ? '<fg=green>Configured</>' : '<fg=red>Missing</>'));
56 56
         $this->newLine();
57 57
 
58 58
         // Validation
59
-        $recaptchaReady = $recaptchaEnabled && ! empty($recaptchaSitekey) && ! empty($recaptchaSecret);
60
-        $turnstileReady = $turnstileEnabled && ! empty($turnstileSitekey) && ! empty($turnstileSecret);
59
+        $recaptchaReady = $recaptchaEnabled && !empty($recaptchaSitekey) && !empty($recaptchaSecret);
60
+        $turnstileReady = $turnstileEnabled && !empty($turnstileSitekey) && !empty($turnstileSecret);
61 61
 
62 62
         if ($recaptchaReady && $turnstileReady) {
63 63
             $this->error('⚠ WARNING: Both providers are enabled!');
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
             $this->info('✓ reCAPTCHA is properly configured and active');
71 71
         } elseif ($provider === 'turnstile' && $turnstileReady) {
72 72
             $this->info('✓ Turnstile is properly configured and active');
73
-        } elseif ($provider === 'recaptcha' && ! $recaptchaReady) {
73
+        } elseif ($provider === 'recaptcha' && !$recaptchaReady) {
74 74
             $this->error('✗ reCAPTCHA is selected but not properly configured');
75
-        } elseif ($provider === 'turnstile' && ! $turnstileReady) {
75
+        } elseif ($provider === 'turnstile' && !$turnstileReady) {
76 76
             $this->error('✗ Turnstile is selected but not properly configured');
77 77
         } else {
78 78
             $this->warn('⚠ No CAPTCHA provider is active');
Please login to merge, or discard this patch.
app/Services/SystemMetricsService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             $hourKey = $metric->recorded_at->format('Y-m-d H:00');
51 51
             $hourLabel = $metric->recorded_at->format('H:i');
52 52
 
53
-            if (! isset($hourlyData[$hourKey])) {
53
+            if (!isset($hourlyData[$hourKey])) {
54 54
                 $hourlyData[$hourKey] = [
55 55
                     'time' => $hourLabel,
56 56
                     'values' => [],
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             $dayKey = $metric->recorded_at->format('Y-m-d');
91 91
             $dayLabel = $metric->recorded_at->format('M d');
92 92
 
93
-            if (! isset($dailyData[$dayKey])) {
93
+            if (!isset($dailyData[$dayKey])) {
94 94
                 $dailyData[$dayKey] = [
95 95
                     'time' => $dayLabel,
96 96
                     'values' => [],
Please login to merge, or discard this patch.
app/Rules/TurnstileRule.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
             return;
20 20
         }
21 21
 
22
-        if (! TurnstileService::verify($value)) {
22
+        if (!TurnstileService::verify($value)) {
23 23
             $fail('The captcha verification failed. Please try again.');
24 24
         }
25 25
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/AdminPageController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             ->limit(10)
57 57
             ->get();
58 58
 
59
-        return $activities->map(function ($activity) {
59
+        return $activities->map(function($activity) {
60 60
             return (object) [
61 61
                 'type' => $activity->activity_type,
62 62
                 'message' => $activity->description,
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
         return response()->json([
80 80
             'success' => true,
81
-            'activities' => array_map(function ($activity) {
81
+            'activities' => array_map(function($activity) {
82 82
                 return [
83 83
                     'type' => $activity->type,
84 84
                     'message' => $activity->message,
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 
266 266
                 // Get number of physical cores
267 267
                 preg_match_all('/^cpu cores\s*:\s*(\d+)/m', $cpuinfo, $coresMatches);
268
-                if (! empty($coresMatches[1])) {
268
+                if (!empty($coresMatches[1])) {
269 269
                     $info['cores'] = (int) $coresMatches[1][0];
270 270
                 }
271 271
 
@@ -275,14 +275,14 @@  discard block
 block discarded – undo
275 275
 
276 276
                 // Get CPU model
277 277
                 preg_match('/^model name\s*:\s*(.+)$/m', $cpuinfo, $modelMatches);
278
-                if (! empty($modelMatches[1])) {
278
+                if (!empty($modelMatches[1])) {
279 279
                     $info['model'] = trim($modelMatches[1]);
280 280
                 }
281 281
 
282 282
                 // If cores is 0, try to get from physical id count
283 283
                 if ($info['cores'] === 0) {
284 284
                     preg_match_all('/^physical id\s*:\s*(\d+)/m', $cpuinfo, $physicalMatches);
285
-                    $uniquePhysical = ! empty($physicalMatches[1]) ? count(array_unique($physicalMatches[1])) : 1;
285
+                    $uniquePhysical = !empty($physicalMatches[1]) ? count(array_unique($physicalMatches[1])) : 1;
286 286
                     $info['cores'] = (int) ($info['threads'] / $uniquePhysical);
287 287
                 }
288 288
             }
Please login to merge, or discard this patch.
app/Observers/UserActivityObserver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
      */
115 115
     private function getRoleName(?int $roleId): string
116 116
     {
117
-        if (! $roleId) {
117
+        if (!$roleId) {
118 118
             return 'None';
119 119
         }
120 120
 
Please login to merge, or discard this patch.
app/Console/Commands/BackfillUserActivityStats.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $type = $this->option('type');
38 38
         $force = $this->option('force');
39 39
 
40
-        if (! in_array($type, ['daily', 'hourly'])) {
40
+        if (!in_array($type, ['daily', 'hourly'])) {
41 41
             $this->error("Invalid type '{$type}'. Must be 'daily' or 'hourly'.");
42 42
 
43 43
             return Command::FAILURE;
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             $date = Carbon::now()->subDays($i)->format('Y-m-d');
69 69
 
70 70
             // Check if stats already exist for this date
71
-            if (! $force && UserActivityStat::where('stat_date', $date)->exists()) {
71
+            if (!$force && UserActivityStat::where('stat_date', $date)->exists()) {
72 72
                 $statsSkipped++;
73 73
                 $progressBar->advance();
74 74
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             $hour = Carbon::now()->subHours($i)->startOfHour()->format('Y-m-d H:00:00');
129 129
 
130 130
             // Check if stats already exist for this hour
131
-            if (! $force && DB::table('user_activity_stats_hourly')->where('stat_hour', $hour)->exists()) {
131
+            if (!$force && DB::table('user_activity_stats_hourly')->where('stat_hour', $hour)->exists()) {
132 132
                 $statsSkipped++;
133 133
                 $progressBar->advance();
134 134
 
Please login to merge, or discard this patch.