Passed
Push — master ( 39c5e1...95276d )
by Darko
12:16
created
app/Services/Tmux/TmuxTaskRunner.php 1 patch
Spacing   +15 added lines, -15 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
 
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
 
442 442
             // Trim whitespace and filter out empty values and '0'
443 443
             $types = array_map('trim', $types);
444
-            $types = array_filter($types, fn ($type) => ! empty($type) && $type !== '0');
444
+            $types = array_filter($types, fn ($type) => !empty($type) && $type !== '0');
445 445
 
446 446
             // Re-index array to ensure sequential keys
447 447
             $types = array_values($types);
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
      */
489 489
     protected function loadCrapState(string $file): array
490 490
     {
491
-        if (! file_exists($file)) {
491
+        if (!file_exists($file)) {
492 492
             return ['first_run' => true];
493 493
         }
494 494
 
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
     protected function saveCrapState(string $file, array $state): void
505 505
     {
506 506
         $dir = dirname($file);
507
-        if (! is_dir($dir)) {
507
+        if (!is_dir($dir)) {
508 508
             mkdir($dir, 0755, true);
509 509
         }
510 510
 
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
             return $this->disablePane($pane, 'Post-process Movies', 'disabled in settings');
664 664
         }
665 665
 
666
-        if (! $hasMoviesWork) {
666
+        if (!$hasMoviesWork) {
667 667
             return $this->disablePane($pane, 'Post-process Movies', 'no work available');
668 668
         }
669 669
 
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
             || (int) ($runVar['counts']['now']['processgames'] ?? 0) > 0
703 703
             || (int) ($runVar['counts']['now']['processxxx'] ?? 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
 
Please login to merge, or discard this patch.