Passed
Push — master ( ee640b...0220bb )
by Darko
09:03
created
app/Http/Controllers/Api/RSS.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                 $limit === -1 ? '' : ' LIMIT '.$limit.' OFFSET '.$offset
82 82
             );
83 83
 
84
-        return Cache::flexible(md5($sql), [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function () use ($sql) {
84
+        return Cache::flexible(md5($sql), [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function() use ($sql) {
85 85
             return Release::fromQuery($sql);
86 86
         });
87 87
     }
@@ -122,10 +122,10 @@  discard block
 block discarded – undo
122 122
             Category::TV_ROOT,
123 123
             Category::TV_OTHER,
124 124
             $this->releases->showPasswords(),
125
-            ! empty($limit) ? sprintf(' LIMIT %d OFFSET 0', $limit > 100 ? 100 : $limit) : ''
125
+            !empty($limit) ? sprintf(' LIMIT %d OFFSET 0', $limit > 100 ? 100 : $limit) : ''
126 126
         );
127 127
 
128
-        return Cache::flexible(md5($sql), [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function () use ($sql) {
128
+        return Cache::flexible(md5($sql), [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function() use ($sql) {
129 129
             return Release::fromQuery($sql);
130 130
         });
131 131
     }
@@ -164,10 +164,10 @@  discard block
 block discarded – undo
164 164
             Category::MOVIE_ROOT,
165 165
             Category::MOVIE_OTHER,
166 166
             $this->releases->showPasswords(),
167
-            ! empty($limit) ? sprintf(' LIMIT %d OFFSET 0', $limit > 100 ? 100 : $limit) : ''
167
+            !empty($limit) ? sprintf(' LIMIT %d OFFSET 0', $limit > 100 ? 100 : $limit) : ''
168 168
         );
169 169
 
170
-        return Cache::flexible(md5($sql), [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function () use ($sql) {
170
+        return Cache::flexible(md5($sql), [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function() use ($sql) {
171 171
             return Release::fromQuery($sql);
172 172
         });
173 173
     }
Please login to merge, or discard this patch.
app/Models/Release.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
     public static function updateRelease($id, $name, $searchName, $fromName, $categoryId, $parts, $grabs, $size, $postedDate, $addedDate, $videoId, $episodeId, $imDbId, $aniDbId): void
276 276
     {
277 277
         $movieInfoId = null;
278
-        if (! empty($imDbId)) {
278
+        if (!empty($imDbId)) {
279 279
             $movieInfoId = MovieInfo::whereImdbid($imDbId)->first(['id']);
280 280
         }
281 281
         self::whereId($id)->update(
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 
336 336
     public static function getReleases(): mixed
337 337
     {
338
-        return Cache::flexible('Releases', [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function () {
338
+        return Cache::flexible('Releases', [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function() {
339 339
             return self::query()
340 340
                 ->where('nzbstatus', '=', NZB::NZB_ADDED)
341 341
                 ->select(['releases.*', 'g.name as group_name', 'c.title as category_name'])
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 
348 348
     public static function getReleasesRange(): mixed
349 349
     {
350
-        return Cache::flexible('releasesRange', [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function () {
350
+        return Cache::flexible('releasesRange', [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function() {
351 351
             return self::query()
352 352
                 ->where('nzbstatus', '=', NZB::NZB_ADDED)
353 353
                 ->select(
@@ -450,12 +450,12 @@  discard block
 block discarded – undo
450 450
 
451 451
         preg_match('/(^\w+[-_. ].+?\.(\d+p)).+/i', $rel['searchname'], $similar);
452 452
 
453
-        if (! empty($similar)) {
453
+        if (!empty($similar)) {
454 454
             if (config('nntmux.elasticsearch_enabled') === true) {
455 455
                 $searchResult = (new ElasticSearchSiteSearch)->indexSearch($similar[1], 10);
456 456
             } else {
457 457
                 $searchResult = (new ManticoreSearch)->searchIndexes('releases_rt', $similar[1]);
458
-                if (! empty($searchResult)) {
458
+                if (!empty($searchResult)) {
459 459
                     $searchResult = Arr::wrap(Arr::get($searchResult, 'id'));
460 460
                 }
461 461
             }
Please login to merge, or discard this patch.
app/Models/Category.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
      */
364 364
     public static function getChildren($categoryId)
365 365
     {
366
-        return Cache::flexible(md5($categoryId), [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function () use ($categoryId) {
366
+        return Cache::flexible(md5($categoryId), [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function() use ($categoryId) {
367 367
             return RootCategory::find($categoryId)->categories;
368 368
         });
369 369
     }
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
     public static function getByIds($ids)
400 400
     {
401 401
         if (\count($ids) > 0) {
402
-            return Cache::flexible(md5(md5(implode(',', $ids))), [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function () use ($ids) {
402
+            return Cache::flexible(md5(md5(implode(',', $ids))), [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function() use ($ids) {
403 403
                 return self::query()->whereIn('id', $ids)->get();
404 404
             });
405 405
         }
@@ -446,15 +446,15 @@  discard block
 block discarded – undo
446 446
     public static function getForMenu(array $excludedCats = []): array
447 447
     {
448 448
         $categoriesResult = [];
449
-        $categoriesArray = RootCategory::query()->with(['categories' => function ($query) use ($excludedCats) {
450
-            if (! empty($excludedCats)) {
449
+        $categoriesArray = RootCategory::query()->with(['categories' => function($query) use ($excludedCats) {
450
+            if (!empty($excludedCats)) {
451 451
                 $query->whereNotIn('id', $excludedCats);
452 452
             }
453 453
             $query->select(['id', 'title', 'root_categories_id', 'description']);
454 454
         }])->select(['id', 'title'])->get()->toArray();
455 455
 
456 456
         foreach ($categoriesArray as $category) {
457
-            if (! empty($category['categories'])) {
457
+            if (!empty($category['categories'])) {
458 458
                 $categoriesResult[] = $category;
459 459
             }
460 460
         }
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
      */
468 468
     public static function getForApi()
469 469
     {
470
-        return Cache::flexible('ForApi', [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function () {
470
+        return Cache::flexible('ForApi', [config('nntmux.cache_expiry_medium'), config('nntmux.cache_expiry_long')], function() {
471 471
             return RootCategory::query()->select(['id', 'title'])->where('status', '=', self::STATUS_ACTIVE)->get();
472 472
         });
473 473
     }
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
             $sql->where('status', '=', self::STATUS_ACTIVE);
505 505
         }
506 506
 
507
-        if (! empty($excludedCats)) {
507
+        if (!empty($excludedCats)) {
508 508
             $sql->whereNotIn('id', $excludedCats);
509 509
         }
510 510
 
Please login to merge, or discard this patch.