Passed
Push — master ( e21d9f...a9d080 )
by Darko
11:59
created
app/Services/Tmux/TmuxTaskRunner.php 1 patch
Spacing   +14 added lines, -14 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
 
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 
438 438
             // Trim whitespace and filter out empty values and '0'
439 439
             $types = array_map('trim', $types);
440
-            $types = array_filter($types, fn ($type) => ! empty($type) && $type !== '0');
440
+            $types = array_filter($types, fn ($type) => !empty($type) && $type !== '0');
441 441
 
442 442
             // Re-index array to ensure sequential keys
443 443
             $types = array_values($types);
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
      */
484 484
     protected function loadCrapState(string $file): array
485 485
     {
486
-        if (! file_exists($file)) {
486
+        if (!file_exists($file)) {
487 487
             return ['first_run' => true];
488 488
         }
489 489
 
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
     protected function saveCrapState(string $file, array $state): void
500 500
     {
501 501
         $dir = dirname($file);
502
-        if (! is_dir($dir)) {
502
+        if (!is_dir($dir)) {
503 503
             mkdir($dir, 0755, true);
504 504
         }
505 505
 
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
             || (int) ($runVar['counts']['now']['processgames'] ?? 0) > 0
654 654
             || (int) ($runVar['counts']['now']['processxxx'] ?? 0) > 0;
655 655
 
656
-        if (! $hasWork) {
656
+        if (!$hasWork) {
657 657
             return $this->disablePane($pane, 'Post-process Amazon', 'no music/books/games to process');
658 658
         }
659 659
 
Please login to merge, or discard this patch.