Passed
Push — master ( 4f5b3b...1c5d75 )
by Darko
09:48
created
app/Http/Controllers/Api/ApiController.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         $releases = new Releases;
124 124
 
125 125
         // Set Query Parameters based on Request objects
126
-        $outputXML = ! ($request->has('o') && $request->input('o') === 'json');
126
+        $outputXML = !($request->has('o') && $request->input('o') === 'json');
127 127
         $minSize = $request->has('minsize') && $request->input('minsize') > 0 ? $request->input('minsize') : 0;
128 128
         $offset = $this->offset($request);
129 129
 
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 
265 265
                 $this->addCoverURL(
266 266
                     $relData,
267
-                    function ($release) {
267
+                    function($release) {
268 268
                         return Utility::getCoverURL(['type' => 'movies', 'id' => $release->imdbid]);
269 269
                     }
270 270
                 );
@@ -306,9 +306,9 @@  discard block
 block discarded – undo
306 306
 
307 307
                 if ($rel && $rel->isNotEmpty()) {
308 308
                     $data = ReleaseNfo::getReleaseNfo($rel->id);
309
-                    if (! empty($data)) {
309
+                    if (!empty($data)) {
310 310
                         if ($request->has('o') && $request->input('o') === 'file') {
311
-                            return response()->streamDownload(function () use ($data) {
311
+                            return response()->streamDownload(function() use ($data) {
312 312
                                 echo $data['nfo'];
313 313
                             }, $rel['searchname'].'.nfo', ['Content-type:' => 'application/octet-stream']);
314 314
                         }
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
                 // curl -X POST -F "file=@./The.File.nzb" "https://www.tabula-rasa.pw/api/V1/api?t=nzbadd&apikey=xxx"
327 327
                 //
328 328
             case 'nzbAdd':
329
-                if (! User::canPost($uid)) {
329
+                if (!User::canPost($uid)) {
330 330
                     return response('User does not have permission to post', 403);
331 331
                 }
332 332
 
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
                     return response('Missing parameter (apikey is required for adding an NZB)', 400);
338 338
                 }
339 339
 
340
-                if (! $request->hasFile('file')) {
340
+                if (!$request->hasFile('file')) {
341 341
                     return response('Missing parameter (file is required for adding an NZB)', 400);
342 342
                 }
343 343
 
@@ -352,10 +352,10 @@  discard block
 block discarded – undo
352 352
                         return response('File is not an NZB file', 400);
353 353
                     }
354 354
                     // Check if the file is proper xml nzb file.
355
-                    if (! Utility::isValidNewznabNzb($nzbFile->getContent())) {
355
+                    if (!Utility::isValidNewznabNzb($nzbFile->getContent())) {
356 356
                         return response('File is not a valid Newznab NZB file', 400);
357 357
                     }
358
-                    if (! File::isDirectory(config('nntmux.nzb_upload_folder'))) {
358
+                    if (!File::isDirectory(config('nntmux.nzb_upload_folder'))) {
359 359
                         @File::makeDirectory(config('nntmux.nzb_upload_folder'), 0775, true);
360 360
                     }
361 361
 
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
             header('Content-type: text/xml');
403 403
         } else {
404 404
             // JSON encode the XMLWriter response
405
-            $response = json_encode(xml_to_array($response), JSON_THROW_ON_ERROR | JSON_PRETTY_PRINT + JSON_UNESCAPED_SLASHES);
405
+            $response = json_encode(xml_to_array($response), JSON_THROW_ON_ERROR|JSON_PRETTY_PRINT + JSON_UNESCAPED_SLASHES);
406 406
             header('Content-type: application/json');
407 407
         }
408 408
         if ($response === false) {
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
                 'search' => ['available' => 'yes', 'supportedParams' => 'q'],
446 446
                 'tv-search' => ['available' => 'yes', 'supportedParams' => 'q,vid,tvdbid,traktid,rid,tvmazeid,imdbid,tmdbid,season,ep'],
447 447
                 'movie-search' => ['available' => 'yes', 'supportedParams' => 'q,imdbid, tmdbid, traktid'],
448
-                'audio-search' => ['available' => 'no',  'supportedParams' => ''],
448
+                'audio-search' => ['available' => 'no', 'supportedParams' => ''],
449 449
             ],
450 450
             'categories' => $this->type === 'caps'
451 451
                 ? Category::getForMenu()
@@ -460,9 +460,9 @@  discard block
 block discarded – undo
460 460
     {
461 461
         $maxAge = -1;
462 462
         if ($request->has('maxage')) {
463
-            if (! $request->filled('maxage')) {
463
+            if (!$request->filled('maxage')) {
464 464
                 return Utility::showApiError(201, 'Incorrect parameter (maxage must not be empty)');
465
-            } elseif (! is_numeric($request->input('maxage'))) {
465
+            } elseif (!is_numeric($request->input('maxage'))) {
466 466
                 return Utility::showApiError(201, 'Incorrect parameter (maxage must be numeric)');
467 467
             } else {
468 468
                 $maxAge = (int) $request->input('maxage');
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
         if ($request->has('cat')) {
482 482
             $categoryIDs = urldecode($request->input('cat'));
483 483
             // Append Web-DL category ID if HD present for SickBeard / Sonarr compatibility.
484
-            if (str_contains($categoryIDs, (string) Category::TV_HD) && ! str_contains($categoryIDs, (string) Category::TV_WEBDL) && (int) Settings::settingValue('catwebdl') === 0) {
484
+            if (str_contains($categoryIDs, (string) Category::TV_HD) && !str_contains($categoryIDs, (string) Category::TV_WEBDL) && (int) Settings::settingValue('catwebdl') === 0) {
485 485
                 $categoryIDs .= (','.Category::TV_WEBDL);
486 486
             }
487 487
             $categoryID = explode(',', $categoryIDs);
Please login to merge, or discard this patch.
app/Models/Release.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     public static function updateRelease($id, $name, $searchName, $fromName, $categoryId, $parts, $grabs, $size, $postedDate, $addedDate, $videoId, $episodeId, $imDbId, $aniDbId): void
151 151
     {
152 152
         $movieInfoId = null;
153
-        if (! empty($imDbId)) {
153
+        if (!empty($imDbId)) {
154 154
             $movieInfoId = MovieInfo::whereImdbid($imDbId)->first(['id']);
155 155
         }
156 156
         self::whereId($id)->update(
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 
342 342
         $releases = $query->get();
343 343
 
344
-        $releases->each(function ($release) {
344
+        $releases->each(function($release) {
345 345
             $release->group_name = $release->group->name ?? null;
346 346
             $release->showtitle = $release->video->title ?? null;
347 347
             $release->tvdb = $release->video->tvdb ?? null;
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
             $release->sub_category = $release->category->title ?? null;
359 359
             $release->category_name = $release->parent_category.' > '.$release->sub_category;
360 360
             $release->category_ids = $release->category ? ($release->category->parentid.','.$release->category->id) : '';
361
-            $release->group_names = $release->releaseGroup->map(function ($relGroup) {
361
+            $release->group_names = $release->releaseGroup->map(function($relGroup) {
362 362
                 return $relGroup->group ? $relGroup->group->name : null;
363 363
             })->implode(',');
364 364
         });
@@ -395,12 +395,12 @@  discard block
 block discarded – undo
395 395
 
396 396
         preg_match('/(^\w+[-_. ].+?\.(\d+p)).+/i', $rel['searchname'], $similar);
397 397
 
398
-        if (! empty($similar)) {
398
+        if (!empty($similar)) {
399 399
             if (config('nntmux.elasticsearch_enabled') === true) {
400 400
                 $searchResult = (new ElasticSearchSiteSearch)->indexSearch($similar[1], 10);
401 401
             } else {
402 402
                 $searchResult = (new ManticoreSearch)->searchIndexes('releases_rt', $similar[1]);
403
-                if (! empty($searchResult)) {
403
+                if (!empty($searchResult)) {
404 404
                     $searchResult = Arr::wrap(Arr::get($searchResult, 'id'));
405 405
                 }
406 406
             }
Please login to merge, or discard this patch.
app/Extensions/helper/helpers.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 use Symfony\Component\Process\Process;
17 17
 use Zip as ZipStream;
18 18
 
19
-if (! function_exists('getRawHtml')) {
19
+if (!function_exists('getRawHtml')) {
20 20
     /**
21 21
      * @param  bool  $cookie
22 22
      * @return bool|mixed|string
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     }
52 52
 }
53 53
 
54
-if (! function_exists('makeFieldLinks')) {
54
+if (!function_exists('makeFieldLinks')) {
55 55
     /**
56 56
      * @return string
57 57
      *
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     }
82 82
 }
83 83
 
84
-if (! function_exists('getUserBrowseOrder')) {
84
+if (!function_exists('getUserBrowseOrder')) {
85 85
     /**
86 86
      * @param  string  $orderBy
87 87
      */
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     }
108 108
 }
109 109
 
110
-if (! function_exists('getUserBrowseOrdering')) {
110
+if (!function_exists('getUserBrowseOrdering')) {
111 111
     function getUserBrowseOrdering(): array
112 112
     {
113 113
         return [
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     }
138 138
 }
139 139
 
140
-if (! function_exists('getSimilarName')) {
140
+if (!function_exists('getSimilarName')) {
141 141
     /**
142 142
      * @param  string  $name
143 143
      */
@@ -147,14 +147,14 @@  discard block
 block discarded – undo
147 147
     }
148 148
 }
149 149
 
150
-if (! function_exists('color')) {
150
+if (!function_exists('color')) {
151 151
     function color(string $string = ''): Color
152 152
     {
153 153
         return new Color($string);
154 154
     }
155 155
 }
156 156
 
157
-if (! function_exists('human_filesize')) {
157
+if (!function_exists('human_filesize')) {
158 158
     /**
159 159
      * @param  int  $decimals
160 160
      */
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     }
168 168
 }
169 169
 
170
-if (! function_exists('bcdechex')) {
170
+if (!function_exists('bcdechex')) {
171 171
     /**
172 172
      * @return string
173 173
      */
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     }
185 185
 }
186 186
 
187
-if (! function_exists('runCmd')) {
187
+if (!function_exists('runCmd')) {
188 188
     /**
189 189
      * Run CLI command.
190 190
      *
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
     }
213 213
 }
214 214
 
215
-if (! function_exists('escapeString')) {
215
+if (!function_exists('escapeString')) {
216 216
 
217 217
     function escapeString($string): string
218 218
     {
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
     }
221 221
 }
222 222
 
223
-if (! function_exists('realDuration')) {
223
+if (!function_exists('realDuration')) {
224 224
 
225 225
     function realDuration($milliseconds): string
226 226
     {
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
     }
231 231
 }
232 232
 
233
-if (! function_exists('is_it_json')) {
233
+if (!function_exists('is_it_json')) {
234 234
     /**
235 235
      * @throws JsonException
236 236
      */
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     }
246 246
 }
247 247
 
248
-if (! function_exists('getStreamingZip')) {
248
+if (!function_exists('getStreamingZip')) {
249 249
     /**
250 250
      * @throws Exception
251 251
      */
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
     }
273 273
 }
274 274
 
275
-if (! function_exists('release_flag')) {
275
+if (!function_exists('release_flag')) {
276 276
     // Function inspired by c0r3@newznabforums adds country flags on the browse page.
277 277
     /**
278 278
      * @param  string  $text  Text to match against.
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
     }
410 410
 }
411 411
 
412
-if (! function_exists('getReleaseCover')) {
412
+if (!function_exists('getReleaseCover')) {
413 413
     /**
414 414
      * Get the cover image URL for a release based on its type and ID
415 415
      *
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
         $coverId = null;
423 423
 
424 424
         // Helper function to get value from object or array
425
-        $getValue = function ($data, $key) {
425
+        $getValue = function($data, $key) {
426 426
             if (is_array($data)) {
427 427
                 return $data[$key] ?? null;
428 428
             } elseif (is_object($data)) {
@@ -441,25 +441,25 @@  discard block
 block discarded – undo
441 441
         $xxxinfo_id = $getValue($release, 'xxxinfo_id');
442 442
         $anidbid = $getValue($release, 'anidbid');
443 443
 
444
-        if (! empty($imdbid) && $imdbid > 0) {
444
+        if (!empty($imdbid) && $imdbid > 0) {
445 445
             $coverType = 'movies';
446 446
             $coverId = str_pad($imdbid, 7, '0', STR_PAD_LEFT);
447
-        } elseif (! empty($musicinfo_id)) {
447
+        } elseif (!empty($musicinfo_id)) {
448 448
             $coverType = 'music';
449 449
             $coverId = $musicinfo_id;
450
-        } elseif (! empty($consoleinfo_id)) {
450
+        } elseif (!empty($consoleinfo_id)) {
451 451
             $coverType = 'console';
452 452
             $coverId = $consoleinfo_id;
453
-        } elseif (! empty($bookinfo_id)) {
453
+        } elseif (!empty($bookinfo_id)) {
454 454
             $coverType = 'book';
455 455
             $coverId = $bookinfo_id;
456
-        } elseif (! empty($gamesinfo_id)) {
456
+        } elseif (!empty($gamesinfo_id)) {
457 457
             $coverType = 'games';
458 458
             $coverId = $gamesinfo_id;
459
-        } elseif (! empty($xxxinfo_id)) {
459
+        } elseif (!empty($xxxinfo_id)) {
460 460
             $coverType = 'xxx';
461 461
             $coverId = $xxxinfo_id;
462
-        } elseif (! empty($anidbid)) {
462
+        } elseif (!empty($anidbid)) {
463 463
             $coverType = 'anime';
464 464
             $coverId = $anidbid;
465 465
         }
@@ -475,10 +475,10 @@  discard block
 block discarded – undo
475 475
     }
476 476
 }
477 477
 
478
-if (! function_exists('sanitize')) {
478
+if (!function_exists('sanitize')) {
479 479
     function sanitize(array|string $phrases, array $doNotSanitize = []): string
480 480
     {
481
-        if (! is_array($phrases)) {
481
+        if (!is_array($phrases)) {
482 482
             $wordArray = explode(' ', str_replace('.', ' ', $phrases));
483 483
         } else {
484 484
             $wordArray = $phrases;
@@ -489,9 +489,9 @@  discard block
 block discarded – undo
489 489
         foreach ($wordArray as $words) {
490 490
             $words = preg_split('/\s+/', $words);
491 491
             foreach ($words as $st) {
492
-                if (Str::startsWith($st, ['!', '+', '-', '?', '*']) && Str::length($st) > 1 && ! preg_match('/([!+?\-*]){2,}/', $st)) {
492
+                if (Str::startsWith($st, ['!', '+', '-', '?', '*']) && Str::length($st) > 1 && !preg_match('/([!+?\-*]){2,}/', $st)) {
493 493
                     $str = $st;
494
-                } elseif (Str::endsWith($st, ['+', '-', '?', '*']) && Str::length($st) > 1 && ! preg_match('/([!+?\-*]){2,}/', $st)) {
494
+                } elseif (Str::endsWith($st, ['+', '-', '?', '*']) && Str::length($st) > 1 && !preg_match('/([!+?\-*]){2,}/', $st)) {
495 495
                     $str = $st;
496 496
                 } else {
497 497
                     $str = Sanitizer::escape($st, $doNotSanitize);
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
     }
507 507
 }
508 508
 
509
-if (! function_exists('formatBytes')) {
509
+if (!function_exists('formatBytes')) {
510 510
     /**
511 511
      * Format bytes into human-readable file size.
512 512
      *
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
     }
526 526
 }
527 527
 
528
-if (! function_exists('csp_nonce')) {
528
+if (!function_exists('csp_nonce')) {
529 529
     /**
530 530
      * Generate a CSP nonce for inline scripts
531 531
      * This should be stored in the request and reused across the request lifecycle
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
     }
543 543
 }
544 544
 
545
-if (! function_exists('userDate')) {
545
+if (!function_exists('userDate')) {
546 546
     /**
547 547
      * Format a date/time string according to the authenticated user's timezone
548 548
      *
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
     }
575 575
 }
576 576
 
577
-if (! function_exists('userDateDiffForHumans')) {
577
+if (!function_exists('userDateDiffForHumans')) {
578 578
     /**
579 579
      * Format a date/time string as a human-readable diff according to the authenticated user's timezone
580 580
      *
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
     }
606 606
 }
607 607
 
608
-if (! function_exists('getAvailableTimezones')) {
608
+if (!function_exists('getAvailableTimezones')) {
609 609
     /**
610 610
      * Get a list of available timezones grouped by region
611 611
      *
Please login to merge, or discard this patch.
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/BackfillUserActivityStats.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
             $date = Carbon::now()->subDays($i)->format('Y-m-d');
47 47
 
48 48
             // Check if stats already exist for this date
49
-            if (! $force && UserActivityStat::where('stat_date', $date)->exists()) {
49
+            if (!$force && UserActivityStat::where('stat_date', $date)->exists()) {
50 50
                 $statsSkipped++;
51 51
                 $progressBar->advance();
52 52
 
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.