Passed
Push — master ( ae0ea4...59225e )
by Darko
10:57
created
app/Console/Commands/RenameOtherMiscReleases.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $show = $this->option('show');
58 58
         $sizeTolerance = (float) $this->option('size-tolerance');
59 59
 
60
-        if ($limit && ! is_numeric($limit)) {
60
+        if ($limit && !is_numeric($limit)) {
61 61
             $this->error('Limit must be a numeric value.');
62 62
 
63 63
             return Command::FAILURE;
@@ -134,27 +134,27 @@  discard block
 block discarded – undo
134 134
             $matched = false;
135 135
 
136 136
             // 1. Title + Size Match (most reliable)
137
-            if (! $matched) {
137
+            if (!$matched) {
138 138
                 $matched = $this->matchByTitleAndSize($release, $cleanName, $dryRun, $show, $sizeTolerance, $categorize);
139 139
             }
140 140
 
141 141
             // 2. Filename + Size Match
142
-            if (! $matched) {
142
+            if (!$matched) {
143 143
                 $matched = $this->matchByFilenameAndSize($release, $cleanName, $dryRun, $show, $sizeTolerance, $categorize);
144 144
             }
145 145
 
146 146
             // 3. Direct Title Match (no size check)
147
-            if (! $matched) {
147
+            if (!$matched) {
148 148
                 $matched = $this->matchByDirectTitle($release, $cleanName, $dryRun, $show, $categorize);
149 149
             }
150 150
 
151 151
             // 4. Direct Filename Match (no size check)
152
-            if (! $matched) {
152
+            if (!$matched) {
153 153
                 $matched = $this->matchByDirectFilename($release, $cleanName, $dryRun, $show, $categorize);
154 154
             }
155 155
 
156 156
             // 5. Partial Title Match (least strict, last resort)
157
-            if (! $matched) {
157
+            if (!$matched) {
158 158
                 $matched = $this->matchByPartialTitle($release, $cleanName, $dryRun, $show, $categorize);
159 159
             }
160 160
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                 $this->matched++;
163 163
             }
164 164
 
165
-            if (! $show && $this->checked % 10 === 0) {
165
+            if (!$show && $this->checked % 10 === 0) {
166 166
                 $percent = round(($this->checked / $total) * 100, 1);
167 167
                 $this->info(
168 168
                     "Progress: {$percent}% ({$this->checked}/{$total}) | ".
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             }
172 172
         }
173 173
 
174
-        if (! $show) {
174
+        if (!$show) {
175 175
             echo PHP_EOL;
176 176
         }
177 177
     }
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
             // Try to match by title and size
267 267
             $matched = $this->matchByTitleAndSize($release, $cleanName, $dryRun, $show, $sizeTolerance, $categorize);
268 268
 
269
-            if (! $matched) {
269
+            if (!$matched) {
270 270
                 // Try to match by filename and size
271 271
                 $matched = $this->matchByFilenameAndSize($release, $cleanName, $dryRun, $show, $sizeTolerance, $categorize);
272 272
             }
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
                 $this->matched++;
276 276
             }
277 277
 
278
-            if (! $show && $this->checked % 10 === 0) {
278
+            if (!$show && $this->checked % 10 === 0) {
279 279
                 $percent = round(($this->checked / $total) * 100, 1);
280 280
                 $this->info(
281 281
                     "Progress: {$percent}% ({$this->checked}/{$total}) | ".
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
             }
285 285
         }
286 286
 
287
-        if (! $show) {
287
+        if (!$show) {
288 288
             echo PHP_EOL;
289 289
         }
290 290
     }
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
                 $this->matched++;
330 330
             }
331 331
 
332
-            if (! $show && ($this->checked - $initialChecked) % 10 === 0) {
332
+            if (!$show && ($this->checked - $initialChecked) % 10 === 0) {
333 333
                 $percent = round((($this->checked - $initialChecked) / $total) * 100, 1);
334 334
                 $this->info(
335 335
                     "Progress: {$percent}% ({$this->checked}/{$total}) | ".
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
             }
339 339
         }
340 340
 
341
-        if (! $show) {
341
+        if (!$show) {
342 342
             echo PHP_EOL;
343 343
         }
344 344
     }
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 
359 359
         $predb = Predb::query()
360 360
             ->where('title', $cleanName)
361
-            ->where(function ($query) use ($sizeMin, $sizeMax) {
361
+            ->where(function($query) use ($sizeMin, $sizeMax) {
362 362
                 $query->whereNull('size')
363 363
                     ->orWhereBetween('size', [$sizeMin, $sizeMax]);
364 364
             })
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 
387 387
         $predb = Predb::query()
388 388
             ->where('filename', $cleanName)
389
-            ->where(function ($query) use ($sizeMin, $sizeMax) {
389
+            ->where(function($query) use ($sizeMin, $sizeMax) {
390 390
                 $query->whereNull('size')
391 391
                     ->orWhereBetween('size', [$sizeMin, $sizeMax]);
392 392
             })
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 
431 431
         if ($release->searchname === $predb->title) {
432 432
             // Names already match, just update predb_id
433
-            if (! $dryRun) {
433
+            if (!$dryRun) {
434 434
                 Release::where('id', $release->id)->update(['predb_id' => $predb->id]);
435 435
             }
436 436
 
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
         $newCategory = null;
462 462
         $newCategoryName = $oldCategoryName;
463 463
 
464
-        if (! $dryRun) {
464
+        if (!$dryRun) {
465 465
             // Update release
466 466
             Release::where('id', $release->id)->update([
467 467
                 'name' => $newName,
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
      */
543 543
     protected function getCategoryName(int $categoryId): string
544 544
     {
545
-        if (! isset($this->categoryCache[$categoryId])) {
545
+        if (!isset($this->categoryCache[$categoryId])) {
546 546
             $category = Category::query()->where('id', $categoryId)->first(['title']);
547 547
             $this->categoryCache[$categoryId] = $category ? $category->title : "Unknown (ID: {$categoryId})";
548 548
         }
Please login to merge, or discard this patch.