@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | { |
299 | 299 | $browseBy = ' '; |
300 | 300 | foreach ($this->getBrowseByOptions() as $bbk => $bbv) { |
301 | - if (! empty($_REQUEST[$bbk])) { |
|
301 | + if (!empty($_REQUEST[$bbk])) { |
|
302 | 302 | $bbs = stripslashes($_REQUEST[$bbk]); |
303 | 303 | if ($bbk === 'year') { |
304 | 304 | $browseBy .= ' AND YEAR (gi.releasedate) '.'LIKE '.escapeString('%'.$bbs.'%'); |
@@ -362,11 +362,11 @@ discard block |
||
362 | 362 | if (empty($this->_gameResults['title'])) { |
363 | 363 | return false; |
364 | 364 | } |
365 | - if (! empty($this->_gameResults['cover'])) { |
|
365 | + if (!empty($this->_gameResults['cover'])) { |
|
366 | 366 | $game['coverurl'] = (string) $this->_gameResults['cover']; |
367 | 367 | } |
368 | 368 | |
369 | - if (! empty($this->_gameResults['backdrop'])) { |
|
369 | + if (!empty($this->_gameResults['backdrop'])) { |
|
370 | 370 | $game['backdropurl'] = (string) $this->_gameResults['backdrop']; |
371 | 371 | } |
372 | 372 | |
@@ -374,41 +374,41 @@ discard block |
||
374 | 374 | $game['asin'] = $this->_gameResults['steamid']; |
375 | 375 | $game['url'] = (string) $this->_gameResults['directurl']; |
376 | 376 | |
377 | - if (! empty($this->_gameResults['publisher'])) { |
|
377 | + if (!empty($this->_gameResults['publisher'])) { |
|
378 | 378 | $game['publisher'] = (string) $this->_gameResults['publisher']; |
379 | 379 | } else { |
380 | 380 | $game['publisher'] = 'Unknown'; |
381 | 381 | } |
382 | 382 | |
383 | - if (! empty($this->_gameResults['rating'])) { |
|
383 | + if (!empty($this->_gameResults['rating'])) { |
|
384 | 384 | $game['esrb'] = (string) $this->_gameResults['rating']; |
385 | 385 | } else { |
386 | 386 | $game['esrb'] = 'Not Rated'; |
387 | 387 | } |
388 | 388 | |
389 | - if (! empty($this->_gameResults['releasedate'])) { |
|
389 | + if (!empty($this->_gameResults['releasedate'])) { |
|
390 | 390 | $dateReleased = strtotime($this->_gameResults['releasedate']) === false ? '' : $this->_gameResults['releasedate']; |
391 | 391 | $game['releasedate'] = ($this->_gameResults['releasedate'] === '' || strtotime($this->_gameResults['releasedate']) === false) ? null : Carbon::createFromFormat('M j, Y', Carbon::parse($dateReleased)->toFormattedDateString())->format('Y-m-d'); |
392 | 392 | } |
393 | 393 | |
394 | - if (! empty($this->_gameResults['description'])) { |
|
394 | + if (!empty($this->_gameResults['description'])) { |
|
395 | 395 | $game['review'] = (string) $this->_gameResults['description']; |
396 | 396 | } |
397 | 397 | |
398 | - if (! empty($this->_gameResults['genres'])) { |
|
398 | + if (!empty($this->_gameResults['genres'])) { |
|
399 | 399 | $genres = $this->_gameResults['genres']; |
400 | 400 | $genreName = $this->_matchGenre($genres); |
401 | 401 | } |
402 | 402 | } |
403 | 403 | } |
404 | 404 | |
405 | - if (! empty($this->publicKey)) { |
|
405 | + if (!empty($this->publicKey)) { |
|
406 | 406 | if ($steamGameID === false || $this->_gameResults === false) { |
407 | 407 | $bestMatch = false; |
408 | 408 | $this->_classUsed = 'GiantBomb'; |
409 | 409 | try { |
410 | 410 | $result = $this->giantBomb->search($gameInfo['title'], 'Game'); |
411 | - if (! \is_object($result)) { |
|
411 | + if (!\is_object($result)) { |
|
412 | 412 | $bestMatchPct = 0; |
413 | 413 | foreach ($result as $res) { |
414 | 414 | similar_text(strtolower($gameInfo['title']), strtolower($res->name), $percent1); |
@@ -421,17 +421,17 @@ discard block |
||
421 | 421 | if ($bestMatch !== false) { |
422 | 422 | $this->_gameResults = $this->giantBomb->findWithResourceID('Game', '3030-'.$bestMatch); |
423 | 423 | |
424 | - if (! empty($this->_gameResults->image['medium_url'])) { |
|
424 | + if (!empty($this->_gameResults->image['medium_url'])) { |
|
425 | 425 | $game['coverurl'] = (string) $this->_gameResults->image['medium_url']; |
426 | 426 | } |
427 | 427 | |
428 | - if (! empty($this->_gameResults->image['screen_url'])) { |
|
428 | + if (!empty($this->_gameResults->image['screen_url'])) { |
|
429 | 429 | $game['backdropurl'] = (string) $this->_gameResults->image['screen_url']; |
430 | 430 | } |
431 | 431 | |
432 | 432 | $game['title'] = (string) $this->_gameResults->get('name'); |
433 | 433 | $game['asin'] = $this->_gameResults->get('id'); |
434 | - if (! empty($this->_gameResults->get('site_detail_url'))) { |
|
434 | + if (!empty($this->_gameResults->get('site_detail_url'))) { |
|
435 | 435 | $game['url'] = (string) $this->_gameResults->get('site_detail_url'); |
436 | 436 | } else { |
437 | 437 | $game['url'] = ''; |
@@ -443,7 +443,7 @@ discard block |
||
443 | 443 | $game['publisher'] = 'Unknown'; |
444 | 444 | } |
445 | 445 | |
446 | - if (! empty($this->_gameResults->original_game_rating[0]['name'])) { |
|
446 | + if (!empty($this->_gameResults->original_game_rating[0]['name'])) { |
|
447 | 447 | $game['esrb'] = $this->_gameResults->original_game_rating[0]['name'] ?? 'Not Rated'; |
448 | 448 | } else { |
449 | 449 | $game['esrb'] = 'Not Rated'; |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | $bestMatch = false; |
481 | 481 | $this->_classUsed = 'IGDB'; |
482 | 482 | $result = Game::where('name', $gameInfo['title'])->get(); |
483 | - if (! empty($result)) { |
|
483 | + if (!empty($result)) { |
|
484 | 484 | $bestMatchPct = 0; |
485 | 485 | foreach ($result as $res) { |
486 | 486 | similar_text(strtolower($gameInfo['title']), strtolower($res->name), $percent1); |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | ])->where('id', $bestMatch)->first(); |
499 | 499 | |
500 | 500 | $publishers = []; |
501 | - if (! empty($this->_gameResults->involved_companies)) { |
|
501 | + if (!empty($this->_gameResults->involved_companies)) { |
|
502 | 502 | foreach ($this->_gameResults->involved_companies as $publisher) { |
503 | 503 | if ($publisher['publisher'] === true) { |
504 | 504 | $company = Company::find($publisher['company']); |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | |
510 | 510 | $genres = []; |
511 | 511 | |
512 | - if (! empty($this->_gameResults->themes)) { |
|
512 | + if (!empty($this->_gameResults->themes)) { |
|
513 | 513 | foreach ($this->_gameResults->themes as $theme) { |
514 | 514 | $genres[] = $theme['name']; |
515 | 515 | } |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | 'esrb' => isset($this->_gameResults->aggregated_rating) ? round($this->_gameResults->aggregated_rating).'%' : 'Not Rated', |
532 | 532 | 'url' => $this->_gameResults->url ?? '', |
533 | 533 | 'backdropurl' => isset($this->_gameResults->screenshots) ? 'https:'.str_replace('t_thumb', 't_cover_big', $this->_gameResults->screenshots[0]['url']) : '', |
534 | - 'publisher' => ! empty($publishers) ? implode(',', $publishers) : 'Unknown', |
|
534 | + 'publisher' => !empty($publishers) ? implode(',', $publishers) : 'Unknown', |
|
535 | 535 | ]; |
536 | 536 | } else { |
537 | 537 | $this->colorCli->notice('IGDB returned no valid results'); |
@@ -565,20 +565,20 @@ discard block |
||
565 | 565 | } else { |
566 | 566 | $game['backdrop'] = 0; |
567 | 567 | } |
568 | - if (! isset($game['trailer'])) { |
|
568 | + if (!isset($game['trailer'])) { |
|
569 | 569 | $game['trailer'] = 0; |
570 | 570 | } |
571 | 571 | if (empty($game['title'])) { |
572 | 572 | $game['title'] = $gameInfo['title']; |
573 | 573 | } |
574 | - if (! isset($game['releasedate'])) { |
|
574 | + if (!isset($game['releasedate'])) { |
|
575 | 575 | $game['releasedate'] = ''; |
576 | 576 | } |
577 | 577 | |
578 | 578 | if ($game['releasedate'] === '') { |
579 | 579 | $game['releasedate'] = ''; |
580 | 580 | } |
581 | - if (! isset($game['review'])) { |
|
581 | + if (!isset($game['review'])) { |
|
582 | 582 | $game['review'] = 'No Review'; |
583 | 583 | } |
584 | 584 | $game['classused'] = $this->_classUsed; |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | $game['gamesgenre'] = $genreName; |
597 | 597 | $game['gamesgenreID'] = $genreKey; |
598 | 598 | |
599 | - if (! empty($game['asin'])) { |
|
599 | + if (!empty($game['asin'])) { |
|
600 | 600 | $check = GamesInfo::query()->where('asin', $game['asin'])->first(); |
601 | 601 | if ($check === null) { |
602 | 602 | $gamesId = GamesInfo::query() |
@@ -641,7 +641,7 @@ discard block |
||
641 | 641 | } |
642 | 642 | } |
643 | 643 | |
644 | - if (! empty($gamesId)) { |
|
644 | + if (!empty($gamesId)) { |
|
645 | 645 | if ($this->echoOutput) { |
646 | 646 | $this->colorCli->header('Added/updated game: '). |
647 | 647 | $this->colorCli->alternateOver(' Title: '). |
@@ -660,7 +660,7 @@ discard block |
||
660 | 660 | $this->colorCli->primary($game['title'].' (PC)'); |
661 | 661 | } |
662 | 662 | |
663 | - return ! empty($gamesId) ? $gamesId : false; |
|
663 | + return !empty($gamesId) ? $gamesId : false; |
|
664 | 664 | } |
665 | 665 | |
666 | 666 | /** |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $this->colorCli = new ColorCLI(); |
78 | 78 | |
79 | 79 | $this->tmpPath = (string) Settings::settingValue('..tmpunrarpath'); |
80 | - if (! preg_match('/[\/\\\\]$/', $this->tmpPath)) { |
|
80 | + if (!preg_match('/[\/\\\\]$/', $this->tmpPath)) { |
|
81 | 81 | $this->tmpPath .= '/'; |
82 | 82 | } |
83 | 83 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $size = \strlen($possibleNFO); |
139 | 139 | if ($size < 65535 && |
140 | 140 | $size > 11 && |
141 | - ! preg_match( |
|
141 | + !preg_match( |
|
142 | 142 | '/\A(\s*<\?xml|=newz\[NZB\]=|RIFF|\s*[RP]AR|.{0,10}(JFIF|matroska|ftyp|ID3))|;\s*Generated\s*by.*SF\w/i', |
143 | 143 | $possibleNFO |
144 | 144 | )) { |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | |
149 | 149 | // Linux boxes have 'file' (so should Macs), Windows *can* have it too: see GNUWIN.txt in docs. |
150 | 150 | $result = Utility::fileInfo($tmpPath); |
151 | - if (! empty($result)) { |
|
151 | + if (!empty($result)) { |
|
152 | 152 | // Check if it's text. |
153 | 153 | if (preg_match('/(ASCII|ISO-8859|UTF-(8|16|32).*?)\s*text/', $result)) { |
154 | 154 | @File::delete($tmpPath); |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | |
207 | 207 | Release::whereId($release->id)->update(['nfostatus' => self::NFO_FOUND]); |
208 | 208 | |
209 | - if (! isset($release->completion)) { |
|
209 | + if (!isset($release->completion)) { |
|
210 | 210 | $release->completion = 0; |
211 | 211 | } |
212 | 212 |
@@ -195,8 +195,8 @@ discard block |
||
195 | 195 | %s %s %s |
196 | 196 | GROUP BY m.id |
197 | 197 | ORDER BY %s %s', |
198 | - ! empty($musicIDs) ? 'WHERE m.id IN ('.implode(',', $musicIDs).')' : 'AND 1=1', |
|
199 | - (! empty($releaseIDs)) ? 'AND r.id in ('.implode(',', $releaseIDs).')' : '', |
|
198 | + !empty($musicIDs) ? 'WHERE m.id IN ('.implode(',', $musicIDs).')' : 'AND 1=1', |
|
199 | + (!empty($releaseIDs)) ? 'AND r.id in ('.implode(',', $releaseIDs).')' : '', |
|
200 | 200 | $catsrch, |
201 | 201 | $order[0], |
202 | 202 | $order[1] |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | { |
262 | 262 | $browseby = ' '; |
263 | 263 | foreach ($this->getBrowseByOptions() as $bbk => $bbv) { |
264 | - if (! empty($_REQUEST[$bbk])) { |
|
264 | + if (!empty($_REQUEST[$bbk])) { |
|
265 | 265 | $bbs = stripslashes($_REQUEST[$bbk]); |
266 | 266 | if (stripos($bbv, 'id') !== false) { |
267 | 267 | $browseby .= ' AND m.'.$bbv.' = '.$bbs; |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | ) |
414 | 414 | ); |
415 | 415 | |
416 | - if (! empty($res)) { |
|
416 | + if (!empty($res)) { |
|
417 | 417 | foreach ($res as $arr) { |
418 | 418 | $startTime = now(); |
419 | 419 | $usedAmazon = false; |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | $h = trim(preg_replace('/\s\s+/', ' ', $g)); |
487 | 487 | $newname = trim(preg_replace('/ [a-z]{2}$| [a-z]{3} \d{2,}$|\d{5,} \d{5,}$|-WEB$/i', '', $h)); |
488 | 488 | |
489 | - if (! preg_match('/^[a-z0-9]+$/i', $newname) && strlen($newname) > 10) { |
|
489 | + if (!preg_match('/^[a-z0-9]+$/i', $newname) && strlen($newname) > 10) { |
|
490 | 490 | $result['name'] = $newname; |
491 | 491 | |
492 | 492 | return $result; |
@@ -687,7 +687,7 @@ |
||
687 | 687 | { |
688 | 688 | $sharing = (array) Arr::first(DB::select('SELECT enabled, posting, fetching FROM sharing')); |
689 | 689 | |
690 | - if (! empty($sharing) && (int) $sharing['enabled'] === 1 && (int) $runVar['settings']['run_sharing'] === 1 && ((int) $sharing['posting'] === 1 || (int) $sharing['fetching'] === 1) && shell_exec("tmux list-panes -t{$runVar['constants']['tmux_session']}:{$pane} | grep ^0 | grep -c dead") == 1) { |
|
690 | + if (!empty($sharing) && (int) $sharing['enabled'] === 1 && (int) $runVar['settings']['run_sharing'] === 1 && ((int) $sharing['posting'] === 1 || (int) $sharing['fetching'] === 1) && shell_exec("tmux list-panes -t{$runVar['constants']['tmux_session']}:{$pane} | grep ^0 | grep -c dead") == 1) { |
|
691 | 691 | shell_exec( |
692 | 692 | "tmux respawnp -t{$runVar['constants']['tmux_session']}:{$pane}.0 ' \ |
693 | 693 | {$runVar['commands']['_php']} {$runVar['paths']['misc']}/update/multiprocessing/postprocess.php sha; \ |
@@ -107,7 +107,7 @@ |
||
107 | 107 | protected function generic(): array |
108 | 108 | { |
109 | 109 | // For non music groups. |
110 | - if (! preg_match('/\.(flac|lossless|mp3|music|sounds)/', $this->groupName)) { |
|
110 | + if (!preg_match('/\.(flac|lossless|mp3|music|sounds)/', $this->groupName)) { |
|
111 | 111 | // File/part count. |
112 | 112 | // File extensions. |
113 | 113 | // File extensions - If it was not in quotes. |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | { |
276 | 276 | $browseBy = ' '; |
277 | 277 | foreach ($this->getBrowseByOptions() as $bbk => $bbv) { |
278 | - if (! empty($_REQUEST[$bbk])) { |
|
278 | + if (!empty($_REQUEST[$bbk])) { |
|
279 | 279 | $bbs = stripslashes($_REQUEST[$bbk]); |
280 | 280 | $browseBy .= ' AND con.'.$bbv.' LIKE '.escapeString('%'.$bbs.'%'); |
281 | 281 | } |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | $con['esrb'] = (string) $amaz->ItemAttributes->ESRBAgeRating; |
401 | 401 | $con['releasedate'] = (string) $amaz->ItemAttributes->ReleaseDate; |
402 | 402 | |
403 | - if (! isset($con['releasedate'])) { |
|
403 | + if (!isset($con['releasedate'])) { |
|
404 | 404 | $con['releasedate'] = ''; |
405 | 405 | } |
406 | 406 | |
@@ -628,7 +628,7 @@ discard block |
||
628 | 628 | if (config('config.credentials.client_id') !== '' && config('config.credentials.client_secret') !== '') { |
629 | 629 | try { |
630 | 630 | $result = Game::where('name', $gameInfo)->get(); |
631 | - if (! empty($result)) { |
|
631 | + if (!empty($result)) { |
|
632 | 632 | $bestMatchPct = 0; |
633 | 633 | foreach ($result as $res) { |
634 | 634 | similar_text(strtolower($gameInfo), strtolower($res->name), $percent); |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | ])->where('id', $bestMatch)->first(); |
647 | 647 | |
648 | 648 | $publishers = []; |
649 | - if (! empty($game->involved_companies)) { |
|
649 | + if (!empty($game->involved_companies)) { |
|
650 | 650 | foreach ($game->involved_companies as $publisher) { |
651 | 651 | if ($publisher['publisher'] === true) { |
652 | 652 | $company = Company::find($publisher['company']); |
@@ -657,7 +657,7 @@ discard block |
||
657 | 657 | |
658 | 658 | $genres = []; |
659 | 659 | |
660 | - if (! empty($game->themes)) { |
|
660 | + if (!empty($game->themes)) { |
|
661 | 661 | foreach ($game->themes as $theme) { |
662 | 662 | $genres[] = $theme['name']; |
663 | 663 | } |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | |
668 | 668 | $platform = ''; |
669 | 669 | |
670 | - if (! empty($game->platforms)) { |
|
670 | + if (!empty($game->platforms)) { |
|
671 | 671 | foreach ($game->platforms as $platforms) { |
672 | 672 | $percentCurrent = 0; |
673 | 673 | $gamePlatforms = Platform::where('id', $platforms)->get(); |
@@ -686,13 +686,13 @@ discard block |
||
686 | 686 | 'title' => $game->name, |
687 | 687 | 'asin' => $game->id, |
688 | 688 | 'review' => $game->summary ?? '', |
689 | - 'coverurl' => ! empty($game->cover->url) ? 'https:'.$game->cover->url : '', |
|
690 | - 'releasedate' => ! empty($game->first_release_date) ? $game->first_release_date->format('Y-m-d') : now()->format('Y-m-d'), |
|
691 | - 'esrb' => ! empty($game->aggregated_rating) ? round($game->aggregated_rating).'%' : 'Not Rated', |
|
689 | + 'coverurl' => !empty($game->cover->url) ? 'https:'.$game->cover->url : '', |
|
690 | + 'releasedate' => !empty($game->first_release_date) ? $game->first_release_date->format('Y-m-d') : now()->format('Y-m-d'), |
|
691 | + 'esrb' => !empty($game->aggregated_rating) ? round($game->aggregated_rating).'%' : 'Not Rated', |
|
692 | 692 | 'url' => $game->url ?? '', |
693 | - 'publisher' => ! empty($publishers) ? implode(',', $publishers) : 'Unknown', |
|
693 | + 'publisher' => !empty($publishers) ? implode(',', $publishers) : 'Unknown', |
|
694 | 694 | 'platform' => $platform ?? '', |
695 | - 'consolegenre' => ! empty($genres) ? implode(',', $genres) : 'Unknown', |
|
695 | + 'consolegenre' => !empty($genres) ? implode(',', $genres) : 'Unknown', |
|
696 | 696 | 'consolegenreid' => $genreKey ?? '', |
697 | 697 | 'salesrank' => '', |
698 | 698 | ]; |
@@ -835,7 +835,7 @@ discard block |
||
835 | 835 | $platform = 'PSX'; |
836 | 836 | } |
837 | 837 | |
838 | - if (! empty($title) && stripos('XBLA', $platform) === 0 && stripos('dlc', $title) !== false) { |
|
838 | + if (!empty($title) && stripos('XBLA', $platform) === 0 && stripos('dlc', $title) !== false) { |
|
839 | 839 | $platform = 'XBOX360'; |
840 | 840 | } |
841 | 841 | |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | Other option is to pass the $release->categories_id here if we don't find a platform but that |
851 | 851 | would require an extra lookup to determine the name. In either case we should have a title at the minimum. */ |
852 | 852 | |
853 | - return (isset($result['title'], $result['platform']) && ! empty($result['title'])) ? $result : false; |
|
853 | + return (isset($result['title'], $result['platform']) && !empty($result['title'])) ? $result : false; |
|
854 | 854 | } |
855 | 855 | |
856 | 856 | public function getBrowseNode($platform): string |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | $audios = $arrXml->getAudios(); |
107 | 107 | $videos = $arrXml->getVideos(); |
108 | 108 | $subtitles = $arrXml->getSubtitles(); |
109 | - if (! empty($general)) { |
|
110 | - if (! empty($general->get('unique_id')) && (int) $general->get('unique_id')->getShortName() !== 1) { |
|
109 | + if (!empty($general)) { |
|
110 | + if (!empty($general->get('unique_id')) && (int) $general->get('unique_id')->getShortName() !== 1) { |
|
111 | 111 | $uniqueId = $general->get('unique_id')->getShortName(); |
112 | 112 | $this->addUID($releaseID, $uniqueId); |
113 | 113 | } |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | $videoDuration = $videoFormat = $videoCodec = $videoWidth = $videoHeight = $videoAspect = $videoFrameRate = $videoLibrary = $videoBitRate = ''; |
124 | 124 | |
125 | - if (! empty($videos)) { |
|
125 | + if (!empty($videos)) { |
|
126 | 126 | foreach ($videos as $video) { |
127 | 127 | if ($video->get('duration') !== null) { |
128 | 128 | $videoDuration = $video->get('duration')->getMilliseconds(); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | $videoBitRate = $video->get('nominal_bit_rate')->getTextValue(); |
169 | 169 | } |
170 | 170 | |
171 | - if (! empty($videoBitRate)) { |
|
171 | + if (!empty($videoBitRate)) { |
|
172 | 172 | $overallBitRate = $videoBitRate; |
173 | 173 | } |
174 | 174 | |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $audioID = 1; |
180 | 180 | $audioFormat = $audioMode = $audioBitRateMode = $audioBitRate = $audioChannels = $audioSampleRate = $audioLibrary = $audioLanguage = $audioTitle = ''; |
181 | 181 | |
182 | - if (! empty($audios)) { |
|
182 | + if (!empty($audios)) { |
|
183 | 183 | foreach ($audios as $audio) { |
184 | 184 | if ($audio->get('id') !== null) { |
185 | 185 | $audioID = $audio->get('id')->getFullName(); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | } |
226 | 226 | } |
227 | 227 | |
228 | - if (! empty($subtitles)) { |
|
228 | + if (!empty($subtitles)) { |
|
229 | 229 | foreach ($subtitles as $subtitle) { |
230 | 230 | $subsID = 1; |
231 | 231 | $subsLanguage = 'Unknown'; |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | 'audiochannels' => \is_array($audioChannels) ? implode($audioChannels) : $audioChannels, |
290 | 290 | 'audiosamplerate' => \is_array($audioSampleRate) ? implode($audioSampleRate) : $audioSampleRate, |
291 | 291 | 'audiolibrary' => \is_array($audioLibrary) ? implode($audioLibrary) : $audioLibrary, |
292 | - 'audiolanguage' => ! empty($audioLanguage) ? $audioLanguage[1] : '', |
|
292 | + 'audiolanguage' => !empty($audioLanguage) ? $audioLanguage[1] : '', |
|
293 | 293 | 'audiotitle' => \is_array($audioTitle) ? implode($audioTitle) : $audioTitle, |
294 | 294 | ]); |
295 | 295 | } |
@@ -299,10 +299,10 @@ discard block |
||
299 | 299 | { |
300 | 300 | $ckid = ReleaseSubtitle::query()->where('releases_id', $releaseID)->first(['releases_id']); |
301 | 301 | $subs = ''; |
302 | - if (! empty($subsLanguage)) { |
|
303 | - if (! empty($subsLanguage[1])) { |
|
302 | + if (!empty($subsLanguage)) { |
|
303 | + if (!empty($subsLanguage[1])) { |
|
304 | 304 | $subs = $subsLanguage[1]; |
305 | - } elseif (! empty($subsLanguage[0])) { |
|
305 | + } elseif (!empty($subsLanguage[0])) { |
|
306 | 306 | $subs = $subsLanguage[0]; |
307 | 307 | } |
308 | 308 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | */ |
150 | 150 | public function deleteRegex(int $id): void |
151 | 151 | { |
152 | - DB::transaction(function () use ($id) { |
|
152 | + DB::transaction(function() use ($id) { |
|
153 | 153 | DB::delete(sprintf('DELETE FROM %s WHERE id = %d', $this->tableName, $id)); |
154 | 154 | }, 3); |
155 | 155 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | { |
167 | 167 | $groupID = UsenetGroup::getIDByName($groupName); |
168 | 168 | |
169 | - if (! $groupID) { |
|
169 | + if (!$groupID) { |
|
170 | 170 | return []; |
171 | 171 | } |
172 | 172 | |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | ksort($hits); |
189 | 189 | $string = $string2 = ''; |
190 | 190 | foreach ($hits as $key => $hit) { |
191 | - if (! \is_int($key)) { |
|
191 | + if (!\is_int($key)) { |
|
192 | 192 | $string .= $hit; |
193 | 193 | $string2 .= '<br/>'.$key.': '.$hit; |
194 | 194 | } |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | { |
228 | 228 | $groupID = UsenetGroup::getIDByName($groupName); |
229 | 229 | |
230 | - if (! $groupID) { |
|
230 | + if (!$groupID) { |
|
231 | 231 | return []; |
232 | 232 | } |
233 | 233 |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | public function beginImport($filesToProcess, $useNzbName = false, $delete = true, $deleteFailed = true) |
108 | 108 | { |
109 | 109 | // Get all the groups in the DB. |
110 | - if (! $this->getAllGroups()) { |
|
110 | + if (!$this->getAllGroups()) { |
|
111 | 111 | if ($this->browser) { |
112 | 112 | return $this->retVal; |
113 | 113 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | gzwrite($fp, $nzbString); |
168 | 168 | gzclose($fp); |
169 | 169 | |
170 | - if (! File::isFile($path)) { |
|
170 | + if (!File::isFile($path)) { |
|
171 | 171 | $this->echoOut('ERROR: Problem compressing NZB file to: '.$path); |
172 | 172 | |
173 | 173 | // Remove the release. |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | if ($groupID === -1) { |
256 | 256 | if (array_key_exists($group, $this->allGroups)) { |
257 | 257 | $groupID = $this->allGroups[$group]; |
258 | - if (! $groupName) { |
|
258 | + if (!$groupName) { |
|
259 | 259 | $groupName = $group; |
260 | 260 | } |
261 | 261 | } else { |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | } |
290 | 290 | |
291 | 291 | // If we found a group and it's not blacklisted. |
292 | - if ($groupID !== -1 && ! $isBlackListed) { |
|
292 | + if ($groupID !== -1 && !$isBlackListed) { |
|
293 | 293 | // Get the size of the release. |
294 | 294 | if (\count($file->segments->segment) > 0) { |
295 | 295 | foreach ($file->segments->segment as $segment) { |