Passed
Push — master ( 6b3709...d172f1 )
by Darko
10:26
created
app/Console/Commands/ProcessFixRelNames.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     {
30 30
         $type = $this->argument('type');
31 31
 
32
-        if (! \in_array($type, ['standard', 'predbft'], true)) {
32
+        if (!\in_array($type, ['standard', 'predbft'], true)) {
33 33
             $this->error('Type must be either: standard or predbft');
34 34
             $this->line('');
35 35
             $this->line('standard => Attempt to fix release name using standard methods');
Please login to merge, or discard this patch.
app/Console/Commands/PostProcessGuid.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         $guid = $this->argument('guid');
39 39
         $renamed = $this->argument('renamed') ?? '';
40 40
 
41
-        if (! $this->isValidChar($guid)) {
41
+        if (!$this->isValidChar($guid)) {
42 42
             $this->error('GUID character must be a-f or 0-9.');
43 43
 
44 44
             return self::FAILURE;
Please login to merge, or discard this patch.
app/Console/Commands/BackfillGroup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         $type = (int) $this->argument('type');
36 36
         $quantity = $this->argument('quantity');
37 37
 
38
-        if (! \in_array($type, [1, 2], true)) {
38
+        if (!\in_array($type, [1, 2], true)) {
39 39
             $this->error('Invalid backfill type. Must be 1 (interval) or 2 (all).');
40 40
 
41 41
             return self::FAILURE;
Please login to merge, or discard this patch.
app/Console/Commands/UpdateBinaries.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             $nntp = $this->getNntp();
44 44
             $binaries = new Binaries(['NNTP' => $nntp]);
45 45
 
46
-            if ($groupName && ! is_numeric($groupName)) {
46
+            if ($groupName && !is_numeric($groupName)) {
47 47
                 $this->info("Updating group: {$groupName}");
48 48
                 $this->updateSingleGroup($binaries, $groupName, $maxHeaders);
49 49
             } else {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     {
68 68
         $group = UsenetGroup::getByName($groupName)->toArray();
69 69
 
70
-        if (! is_array($group)) {
70
+        if (!is_array($group)) {
71 71
             throw new \Exception("Group not found: {$groupName}");
72 72
         }
73 73
 
Please login to merge, or discard this patch.
app/Console/Commands/ReleasesFixNamesGroup.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -102,13 +102,13 @@  discard block
 block discarded – undo
102 102
 
103 103
             // Process UID
104 104
             if ((int) $release->proc_uid === NameFixer::PROC_UID_NONE &&
105
-                (! empty($release->uid) || ! empty($release->mediainfo))) {
105
+                (!empty($release->uid) || !empty($release->mediainfo))) {
106 106
 
107
-                if (! empty($release->uid)) {
107
+                if (!empty($release->uid)) {
108 108
                     $this->nameFixer->checkName($release, true, 'UID, ', 1, true);
109 109
                 }
110 110
 
111
-                if (empty($this->nameFixer->matched) && ! empty($release->mediainfo)) {
111
+                if (empty($this->nameFixer->matched) && !empty($release->mediainfo)) {
112 112
                     $this->nameFixer->checkName($release, true, 'Mediainfo, ', 1, true);
113 113
                 }
114 114
             }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
             }
123 123
 
124 124
             // Process CRC32
125
-            if ((int) $release->proc_crc32 === NameFixer::PROC_CRC_NONE && ! empty($release->crc)) {
125
+            if ((int) $release->proc_crc32 === NameFixer::PROC_CRC_NONE && !empty($release->crc)) {
126 126
                 $this->nameFixer->reset();
127 127
                 $this->nameFixer->checkName($release, true, 'CRC32, ', 1, true);
128 128
             }
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             }
151 151
 
152 152
             // Process PAR2 hash
153
-            if ((int) $release->proc_hash16k === NameFixer::PROC_HASH16K_NONE && ! empty($release->hash)) {
153
+            if ((int) $release->proc_hash16k === NameFixer::PROC_HASH16K_NONE && !empty($release->hash)) {
154 154
                 $this->nameFixer->reset();
155 155
                 $this->nameFixer->checkName($release, true, 'PAR2 hash, ', 1, true);
156 156
             }
@@ -166,8 +166,8 @@  discard block
 block discarded – undo
166 166
             // Process NFO
167 167
             if ((int) $release->nfostatus === Nfo::NFO_FOUND &&
168 168
                 (int) $release->proc_nfo === NameFixer::PROC_NFO_NONE &&
169
-                ! empty($release->textstring) &&
170
-                ! preg_match('/^=newz\[NZB\]=\w+/', $release->textstring)) {
169
+                !empty($release->textstring) &&
170
+                !preg_match('/^=newz\[NZB\]=\w+/', $release->textstring)) {
171 171
 
172 172
                 $this->nameFixer->reset();
173 173
                 $this->nameFixer->checkName($release, true, 'NFO, ', 1, true);
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
             // Process PAR2
209 209
             if ((int) $release->proc_par2 === NameFixer::PROC_PAR2_NONE) {
210 210
                 // Initialize NZB contents if needed
211
-                if (! isset($nzbcontents)) {
211
+                if (!isset($nzbcontents)) {
212 212
                     $nntp = new NNTP;
213 213
                     $compressedHeaders = config('nntmux_nntp.compressed_headers');
214 214
 
Please login to merge, or discard this patch.
app/Services/Tmux/TmuxSessionManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     public function killSession(): bool
66 66
     {
67
-        if (! $this->sessionExists()) {
67
+        if (!$this->sessionExists()) {
68 68
             return true;
69 69
         }
70 70
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function attachSession(): bool
80 80
     {
81
-        if (! $this->sessionExists()) {
81
+        if (!$this->sessionExists()) {
82 82
             return false;
83 83
         }
84 84
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function listPanes(): array
96 96
     {
97
-        if (! $this->sessionExists()) {
97
+        if (!$this->sessionExists()) {
98 98
             return [];
99 99
         }
100 100
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             "tmux list-panes -s -t {$this->sessionName} -F '#{window_index}:#{pane_index} #{pane_title}'"
103 103
         );
104 104
 
105
-        if (! $result->successful()) {
105
+        if (!$result->successful()) {
106 106
             return [];
107 107
         }
108 108
 
Please login to merge, or discard this patch.
app/Services/Tmux/Scripts/groupfixrelnames.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 $colorCli = new ColorCLI;
18 18
 
19
-if (! isset($argv[1])) {
19
+if (!isset($argv[1])) {
20 20
     $colorCli->error('This script is not intended to be run manually, it is called from Multiprocessing.');
21 21
     exit(1);
22 22
 }
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 switch ($type) {
31 31
     case 'standard':
32
-        if ($guidChar === null || $maxPerRun === null || ! is_numeric($maxPerRun)) {
32
+        if ($guidChar === null || $maxPerRun === null || !is_numeric($maxPerRun)) {
33 33
             $colorCli->error('Invalid arguments for standard type');
34 34
             exit(1);
35 35
         }
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         break;
39 39
 
40 40
     case 'predbft':
41
-        if (! isset($maxPerRun) || ! is_numeric($maxPerRun) || ! isset($thread) || ! is_numeric($thread)) {
41
+        if (!isset($maxPerRun) || !is_numeric($maxPerRun) || !isset($thread) || !is_numeric($thread)) {
42 42
             $colorCli->error('Invalid arguments for predbft type');
43 43
             exit(1);
44 44
         }
Please login to merge, or discard this patch.
app/Services/Tmux/TmuxLayoutBuilder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     protected function buildFullLayout(): bool
41 41
     {
42 42
         // Window 0: Monitor + Binaries + Backfill + Releases
43
-        if (! $this->sessionManager->createSession('Monitor')) {
43
+        if (!$this->sessionManager->createSession('Monitor')) {
44 44
             return false;
45 45
         }
46 46
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     protected function buildBasicLayout(): bool
83 83
     {
84 84
         // Window 0: Monitor + Releases
85
-        if (! $this->sessionManager->createSession('Monitor')) {
85
+        if (!$this->sessionManager->createSession('Monitor')) {
86 86
             return false;
87 87
         }
88 88
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     protected function buildStrippedLayout(): bool
117 117
     {
118 118
         // Window 0: Monitor + Sequential
119
-        if (! $this->sessionManager->createSession('Monitor')) {
119
+        if (!$this->sessionManager->createSession('Monitor')) {
120 120
             return false;
121 121
         }
122 122
 
Please login to merge, or discard this patch.
app/Services/Tmux/TmuxTaskRunner.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -33,16 +33,16 @@  discard block
 block discarded – undo
33 33
         $enabled = $config['enabled'] ?? true;
34 34
         $workAvailable = $config['work_available'] ?? true;
35 35
 
36
-        if (! $pane || ! $command) {
36
+        if (!$pane || !$command) {
37 37
             return false;
38 38
         }
39 39
 
40 40
         // Check if task is enabled and has work
41
-        if (! $enabled) {
41
+        if (!$enabled) {
42 42
             return $this->disablePane($pane, $taskName, 'disabled in settings');
43 43
         }
44 44
 
45
-        if (! $workAvailable) {
45
+        if (!$workAvailable) {
46 46
             return $this->disablePane($pane, $taskName, 'no work available');
47 47
         }
48 48
 
@@ -108,13 +108,13 @@  discard block
 block discarded – undo
108 108
     {
109 109
         $logsEnabled = (int) Settings::settingValue('write_logs') === 1;
110 110
 
111
-        if (! $logsEnabled) {
111
+        if (!$logsEnabled) {
112 112
             return '/dev/null';
113 113
         }
114 114
 
115 115
         $logDir = config('tmux.paths.logs', storage_path('logs/tmux'));
116 116
 
117
-        if (! is_dir($logDir)) {
117
+        if (!is_dir($logDir)) {
118 118
             mkdir($logDir, 0755, true);
119 119
         }
120 120
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         $killswitch = $config['killswitch']['pp'] ?? false;
182 182
         $pane = '0.1';
183 183
 
184
-        if (! $enabled) {
184
+        if (!$enabled) {
185 185
             return $this->disablePane($pane, 'Update Binaries', 'disabled in settings');
186 186
         }
187 187
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
             default => null,
195 195
         };
196 196
 
197
-        if (! $artisanCommand) {
197
+        if (!$artisanCommand) {
198 198
             return false;
199 199
         }
200 200
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         $ppKillswitch = $config['killswitch']['pp'] ?? false;
217 217
         $pane = '0.2';
218 218
 
219
-        if (! $enabled) {
219
+        if (!$enabled) {
220 220
             return $this->disablePane($pane, 'Backfill', 'disabled in settings');
221 221
         }
222 222
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             default => null,
231 231
         };
232 232
 
233
-        if (! $artisanCommand) {
233
+        if (!$artisanCommand) {
234 234
             return false;
235 235
         }
236 236
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         $enabled = (int) ($config['settings']['releases_run'] ?? 0);
259 259
         $pane = $config['pane'] ?? '0.3';
260 260
 
261
-        if (! $enabled) {
261
+        if (!$enabled) {
262 262
             return $this->disablePane($pane, 'Update Releases', 'disabled in settings');
263 263
         }
264 264
 
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
         $pane = '0.1';
339 339
         $script = base_path('misc/update/nix/tmux/bin/sequential.php');
340 340
 
341
-        if (! file_exists($script)) {
341
+        if (!file_exists($script)) {
342 342
             return $this->disablePane($pane, 'Sequential', 'script not found');
343 343
         }
344 344
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
         $option = (int) ($runVar['settings']['fix_crap_opt'] ?? 1);
398 398
         $script = base_path('misc/update/nix/tmux/bin/removecrap.php');
399 399
 
400
-        if (! file_exists($script)) {
400
+        if (!file_exists($script)) {
401 401
             return $this->disablePane($pane, 'Remove Crap', 'script not found');
402 402
         }
403 403
 
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
             || (int) ($runVar['counts']['now']['processtv'] ?? 0) > 0
446 446
             || (int) ($runVar['counts']['now']['processanime'] ?? 0) > 0;
447 447
 
448
-        if (! $hasWork) {
448
+        if (!$hasWork) {
449 449
             return $this->disablePane($pane, 'Post-process Non-Amazon', 'no movies/tv/anime to process');
450 450
         }
451 451
 
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
             || (int) ($runVar['counts']['now']['processgames'] ?? 0) > 0
485 485
             || (int) ($runVar['counts']['now']['processxxx'] ?? 0) > 0;
486 486
 
487
-        if (! $hasWork) {
487
+        if (!$hasWork) {
488 488
             return $this->disablePane($pane, 'Post-process Amazon', 'no music/books/games to process');
489 489
         }
490 490
 
Please login to merge, or discard this patch.