Passed
Push — master ( 95276d...684724 )
by Darko
10:45
created
app/Services/Tmux/TmuxTaskRunner.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -54,16 +54,16 @@  discard block
 block discarded – undo
54 54
         $enabled = $config['enabled'] ?? true;
55 55
         $workAvailable = $config['work_available'] ?? true;
56 56
 
57
-        if (! $pane || ! $command) {
57
+        if (!$pane || !$command) {
58 58
             return false;
59 59
         }
60 60
 
61 61
         // Check if task is enabled and has work
62
-        if (! $enabled) {
62
+        if (!$enabled) {
63 63
             return $this->disablePane($pane, $taskName, 'disabled in settings');
64 64
         }
65 65
 
66
-        if (! $workAvailable) {
66
+        if (!$workAvailable) {
67 67
             return $this->disablePane($pane, $taskName, 'no work available');
68 68
         }
69 69
 
@@ -129,13 +129,13 @@  discard block
 block discarded – undo
129 129
     {
130 130
         $logsEnabled = (int) Settings::settingValue('write_logs') === 1;
131 131
 
132
-        if (! $logsEnabled) {
132
+        if (!$logsEnabled) {
133 133
             return '/dev/null';
134 134
         }
135 135
 
136 136
         $logDir = config('tmux.paths.logs', storage_path('logs/tmux'));
137 137
 
138
-        if (! is_dir($logDir)) {
138
+        if (!is_dir($logDir)) {
139 139
             mkdir($logDir, 0755, true);
140 140
         }
141 141
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         $killswitch = $config['killswitch']['pp'] ?? false;
203 203
         $pane = '0.1';
204 204
 
205
-        if (! $enabled) {
205
+        if (!$enabled) {
206 206
             return $this->disablePane($pane, 'Update Binaries', 'disabled in settings');
207 207
         }
208 208
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
             default => null,
216 216
         };
217 217
 
218
-        if (! $artisanCommand) {
218
+        if (!$artisanCommand) {
219 219
             return false;
220 220
         }
221 221
 
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
         $ppKillswitch = $config['killswitch']['pp'] ?? false;
238 238
         $pane = '0.2';
239 239
 
240
-        if (! $enabled) {
240
+        if (!$enabled) {
241 241
             return $this->disablePane($pane, 'Backfill', 'disabled in settings');
242 242
         }
243 243
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
             default => null,
252 252
         };
253 253
 
254
-        if (! $artisanCommand) {
254
+        if (!$artisanCommand) {
255 255
             return false;
256 256
         }
257 257
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
         $enabled = (int) ($config['settings']['releases_run'] ?? 0);
280 280
         $pane = $config['pane'] ?? '0.3';
281 281
 
282
-        if (! $enabled) {
282
+        if (!$enabled) {
283 283
             return $this->disablePane($pane, 'Update Releases', 'disabled in settings');
284 284
         }
285 285
 
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 
443 443
             // Trim whitespace and filter out empty values and '0'
444 444
             $types = array_map('trim', $types);
445
-            $types = array_filter($types, fn ($type) => ! empty($type) && $type !== '0');
445
+            $types = array_filter($types, fn ($type) => !empty($type) && $type !== '0');
446 446
 
447 447
             // Re-index array to ensure sequential keys
448 448
             $types = array_values($types);
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
      */
490 490
     protected function loadCrapState(string $file): array
491 491
     {
492
-        if (! file_exists($file)) {
492
+        if (!file_exists($file)) {
493 493
             return ['first_run' => true];
494 494
         }
495 495
 
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
     protected function saveCrapState(string $file, array $state): void
506 506
     {
507 507
         $dir = dirname($file);
508
-        if (! is_dir($dir)) {
508
+        if (!is_dir($dir)) {
509 509
             mkdir($dir, 0755, true);
510 510
         }
511 511
 
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
             return $this->disablePane($pane, 'Post-process Movies', 'disabled in settings');
665 665
         }
666 666
 
667
-        if (! $hasMoviesWork) {
667
+        if (!$hasMoviesWork) {
668 668
             return $this->disablePane($pane, 'Post-process Movies', 'no work available');
669 669
         }
670 670
 
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
             || (int) ($runVar['counts']['now']['processconsole'] ?? 0) > 0
703 703
             || (int) ($runVar['counts']['now']['processgames'] ?? 0) > 0;
704 704
 
705
-        if (! $hasWork) {
705
+        if (!$hasWork) {
706 706
             return $this->disablePane($pane, 'Post-process Amazon', 'no music/books/games to process');
707 707
         }
708 708
 
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
 
767 767
         $hasWork = (int) ($runVar['counts']['now']['processxxx'] ?? 0) > 0;
768 768
 
769
-        if (! $hasWork) {
769
+        if (!$hasWork) {
770 770
             return $this->disablePane($pane, 'Post-process XXX', 'no XXX releases to process');
771 771
         }
772 772
 
Please login to merge, or discard this patch.