diff --git a/Blacklight/AniDB.php b/Blacklight/AniDB.php index 2696b72c5..d7cbbd29b 100755 --- a/Blacklight/AniDB.php +++ b/Blacklight/AniDB.php @@ -6,6 +6,11 @@ use App\Models\Category; use App\Models\AnidbTitle; use Illuminate\Support\Facades\DB; +/** + * Class AniDB + * + * @package Blacklight + */ class AniDB { /** diff --git a/Blacklight/Backfill.php b/Blacklight/Backfill.php index 365dff32c..4d196bd2d 100755 --- a/Blacklight/Backfill.php +++ b/Blacklight/Backfill.php @@ -6,6 +6,11 @@ use App\Models\Group; use App\Models\Settings; use Illuminate\Support\Facades\DB; +/** + * Class Backfill + * + * @package Blacklight + */ class Backfill { /** diff --git a/Blacklight/Binaries.php b/Blacklight/Binaries.php index 829e442ef..28ad6e99d 100755 --- a/Blacklight/Binaries.php +++ b/Blacklight/Binaries.php @@ -7,11 +7,12 @@ use App\Models\Settings; use Illuminate\Support\Carbon; use App\Models\BinaryBlacklist; use Illuminate\Support\Facades\DB; -use Illuminate\Support\Facades\Cache; use Illuminate\Database\QueryException; /** - * Class Binaries. + * Class Binaries + * + * @package Blacklight */ class Binaries { @@ -740,7 +741,6 @@ class Binaries * * * @param array $headers - * @param bool $multiGroup * * @throws \Exception * @throws \Throwable @@ -770,16 +770,13 @@ class Binaries $fileCount[1] = $fileCount[3] = 0; } - $ckName = ''; - $ckId = ''; - $collMatch = $this->_collectionsCleaning->collectionsCleaner( $this->header['matches'][1], - $ckName + '' ); - // Used to group articles together when forming the release. MGR requires this to be group irrespective - $this->header['CollectionKey'] = $collMatch['name'].$ckId.$fileCount[3]; + // Used to group articles together when forming the release. + $this->header['CollectionKey'] = $collMatch['name'].$fileCount[3]; // If this header's collection key isn't in memory, attempt to insert the collection if (! isset($collectionIDs[$this->header['CollectionKey']])) { @@ -826,7 +823,7 @@ class Binaries $collectionID = $collectionIDs[$this->header['CollectionKey']]; } - // MGR or Standard, Binary Hash should be unique to the group + // Binary Hash should be unique to the group $hash = md5($this->header['matches'][1].$this->header['From'].$this->groupMySQL['id']); $binaryID = false; diff --git a/Blacklight/Books.php b/Blacklight/Books.php index 4e7e89644..f2ae616ca 100755 --- a/Blacklight/Books.php +++ b/Blacklight/Books.php @@ -19,6 +19,11 @@ use ApaiIO\ResponseTransformer\XmlToSimpleXmlObject; use DariusIII\ItunesApi\Exceptions\EbookNotFoundException; use DariusIII\ItunesApi\Exceptions\SearchNoResultsException; +/** + * Class Books + * + * @package Blacklight + */ class Books { /** diff --git a/Blacklight/Categorize.php b/Blacklight/Categorize.php index be82f40fc..787886667 100755 --- a/Blacklight/Categorize.php +++ b/Blacklight/Categorize.php @@ -9,7 +9,10 @@ use App\Models\Settings; /** * Categorizing of releases by name/group. * + * * Class Categorize + * + * @package Blacklight */ class Categorize { diff --git a/Blacklight/CollectionsCleaning.php b/Blacklight/CollectionsCleaning.php index 93274bb10..ae78d3512 100755 --- a/Blacklight/CollectionsCleaning.php +++ b/Blacklight/CollectionsCleaning.php @@ -5,7 +5,10 @@ namespace Blacklight; /** * Cleans names for collections/imports/namefixer. * + * * Class CollectionsCleaning + * + * @package Blacklight */ class CollectionsCleaning { @@ -77,34 +80,27 @@ class CollectionsCleaning protected $_regexes; /** - * @param array $options Class instances. + * CollectionsCleaning constructor. + * * @throws \Exception */ - public function __construct(array $options = []) + public function __construct() { // Extensions. $this->e0 = self::REGEX_FILE_EXTENSIONS; $this->e1 = self::REGEX_FILE_EXTENSIONS.self::REGEX_END; $this->e2 = self::REGEX_FILE_EXTENSIONS.self::REGEX_SUBJECT_SIZE.self::REGEX_END; - $defaults = [ - 'Settings' => null, - ]; - $options += $defaults; - $this->_regexes = new Regexes(['Table_Name' => 'collection_regexes']); } /** - * Cleans a usenet subject returning a string that can be used to "merge" files together, a pretty subject, a categoryID and the name status. - * - * @param string $subject Subject to parse. - * @param string $groupName Group to work in. - * - * @return array The ID of the Regex Matched and the cleaned collection name + * @param $subject + * @param $groupName + * @return array * @throws \Exception */ - public function collectionsCleaner($subject, $groupName): ?array + public function collectionsCleaner($subject, $groupName): array { $this->subject = $subject; $this->groupName = $groupName; @@ -118,23 +114,16 @@ class CollectionsCleaning ]; } - switch ($groupName) { - /* - case 'alt.binaries.this.is.an.example': - return $this->_example_method_name(); - */ - case null: - default: - return $this->generic(); - } + return $this->generic(); } /** * Cleans usenet subject before inserting, used for collectionhash. If no regexes matched on collectionsCleaner. * - * @return array|null + * + * @return array */ - protected function generic(): ?array + protected function generic(): array { // For non music groups. if (! preg_match('/\.(flac|lossless|mp3|music|sounds)/', $this->groupName)) { diff --git a/Blacklight/ColorCLI.php b/Blacklight/ColorCLI.php index 1dc1625d6..9166781e9 100755 --- a/Blacklight/ColorCLI.php +++ b/Blacklight/ColorCLI.php @@ -4,6 +4,11 @@ namespace Blacklight; use League\CLImate\CLImate; +/** + * Class ColorCLI + * + * @package Blacklight + */ class ColorCLI { /** diff --git a/Blacklight/Console.php b/Blacklight/Console.php index 0933d8ffb..987210a1c 100755 --- a/Blacklight/Console.php +++ b/Blacklight/Console.php @@ -21,7 +21,9 @@ use ApaiIO\Configuration\GenericConfiguration; use ApaiIO\ResponseTransformer\XmlToSimpleXmlObject; /** - * Class Console. + * Class Console + * + * @package Blacklight */ class Console { diff --git a/Blacklight/ConsoleTools.php b/Blacklight/ConsoleTools.php index a740d5474..27b5900e7 100755 --- a/Blacklight/ConsoleTools.php +++ b/Blacklight/ConsoleTools.php @@ -3,7 +3,9 @@ namespace Blacklight; /** - * Class ConsoleTools. + * Class ConsoleTools + * + * @package Blacklight */ class ConsoleTools { diff --git a/Blacklight/Contents.php b/Blacklight/Contents.php index b04f3116a..d3fd1c6d9 100755 --- a/Blacklight/Contents.php +++ b/Blacklight/Contents.php @@ -5,6 +5,11 @@ namespace Blacklight; use App\Models\User; use App\Models\Content; +/** + * Class Contents + * + * @package Blacklight + */ class Contents { public const TYPEUSEFUL = 1; diff --git a/Blacklight/CouchPotato.php b/Blacklight/CouchPotato.php index 671283fff..fd849398c 100755 --- a/Blacklight/CouchPotato.php +++ b/Blacklight/CouchPotato.php @@ -24,7 +24,9 @@ namespace Blacklight; use GuzzleHttp\Client; /** - * Class CouchPotato. + * Class CouchPotato + * + * @package Blacklight */ class CouchPotato { diff --git a/Blacklight/Games.php b/Blacklight/Games.php index 358d6cb20..562d95729 100755 --- a/Blacklight/Games.php +++ b/Blacklight/Games.php @@ -15,6 +15,11 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Cache; use GuzzleHttp\Exception\ClientException; +/** + * Class Games + * + * @package Blacklight + */ class Games { protected const GAME_MATCH_PERCENTAGE = 85; diff --git a/Blacklight/Genres.php b/Blacklight/Genres.php index 462ede02c..a4a648f1c 100755 --- a/Blacklight/Genres.php +++ b/Blacklight/Genres.php @@ -7,6 +7,11 @@ use App\Models\Category; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Cache; +/** + * Class Genres + * + * @package Blacklight + */ class Genres { public const CONSOLE_TYPE = Category::GAME_ROOT; diff --git a/Blacklight/IRCClient.php b/Blacklight/IRCClient.php index 39909c49a..0f6e4c164 100755 --- a/Blacklight/IRCClient.php +++ b/Blacklight/IRCClient.php @@ -7,7 +7,10 @@ use Blacklight\utility\Utility; /** * Basic IRC client for fetching IRCScraper. * + * * Class IRCClient + * + * @package Blacklight */ class IRCClient { diff --git a/Blacklight/IRCScraper.php b/Blacklight/IRCScraper.php index c9be43b60..398f2ff84 100755 --- a/Blacklight/IRCScraper.php +++ b/Blacklight/IRCScraper.php @@ -8,7 +8,9 @@ use Illuminate\Support\Carbon; use Illuminate\Support\Facades\DB; /** - * Class IRCScraper. + * Class IRCScraper + * + * @package Blacklight */ class IRCScraper extends IRCClient { diff --git a/Blacklight/Movie.php b/Blacklight/Movie.php index 6f3d73552..9e19b0e80 100755 --- a/Blacklight/Movie.php +++ b/Blacklight/Movie.php @@ -25,7 +25,9 @@ use DariusIII\ItunesApi\Exceptions\MovieNotFoundException; use DariusIII\ItunesApi\Exceptions\SearchNoResultsException; /** - * Class Movie. + * Class Movie + * + * @package Blacklight */ class Movie { diff --git a/Blacklight/Music.php b/Blacklight/Music.php index 41279417f..179bc6733 100755 --- a/Blacklight/Music.php +++ b/Blacklight/Music.php @@ -22,7 +22,9 @@ use DariusIII\ItunesApi\Exceptions\ArtistNotFoundException; use DariusIII\ItunesApi\Exceptions\SearchNoResultsException; /** - * Class Music. + * Class Music + * + * @package Blacklight */ class Music { diff --git a/Blacklight/NNTP.php b/Blacklight/NNTP.php index 751dc048e..9efa4cfa0 100755 --- a/Blacklight/NNTP.php +++ b/Blacklight/NNTP.php @@ -9,6 +9,11 @@ use App\Extensions\util\PhpYenc; * Class for connecting to the usenet, retrieving articles and article headers, * decoding yEnc articles, decompressing article headers. * Extends PEAR's Net_NNTP_Client class, overrides some functions. + * + * + * Class NNTP + * + * @package Blacklight */ class NNTP extends \Net_NNTP_Client { diff --git a/Blacklight/NZB.php b/Blacklight/NZB.php index 8e0483abd..bcb6dfa1e 100755 --- a/Blacklight/NZB.php +++ b/Blacklight/NZB.php @@ -9,6 +9,11 @@ use Illuminate\Support\Facades\File; /** * Class for reading and writing NZB files on the hard disk, * building folder paths to store the NZB files. + * + * + * Class NZB + * + * @package Blacklight */ class NZB { diff --git a/Blacklight/NZBContents.php b/Blacklight/NZBContents.php index f2e000c5d..76e1558e3 100755 --- a/Blacklight/NZBContents.php +++ b/Blacklight/NZBContents.php @@ -10,7 +10,10 @@ use Blacklight\processing\PostProcess; /** * Gets information contained within the NZB. * + * * Class NZBContents + * + * @package Blacklight */ class NZBContents { diff --git a/Blacklight/NZBExport.php b/Blacklight/NZBExport.php index 301633be4..9247ac240 100755 --- a/Blacklight/NZBExport.php +++ b/Blacklight/NZBExport.php @@ -7,7 +7,9 @@ use Blacklight\utility\Utility; use Illuminate\Support\Facades\File; /** - * Class NZBExport. + * Class NZBExport + * + * @package Blacklight */ class NZBExport { diff --git a/Blacklight/NZBGet.php b/Blacklight/NZBGet.php index 38a6d422b..cae9c1b57 100755 --- a/Blacklight/NZBGet.php +++ b/Blacklight/NZBGet.php @@ -8,9 +8,12 @@ use GuzzleHttp\Psr7\Request; use Blacklight\utility\Utility; /** - * Class NZBGet. - * * Transfers data between an NZBGet server and a nntmux website. + * + * + * Class NZBGet + * + * @package Blacklight */ class NZBGet { diff --git a/Blacklight/NZBImport.php b/Blacklight/NZBImport.php index 7d378f094..bec9d09b5 100755 --- a/Blacklight/NZBImport.php +++ b/Blacklight/NZBImport.php @@ -9,8 +9,9 @@ use Blacklight\utility\Utility; use Illuminate\Support\Facades\File; /** - * Import NZB files into the database. - * Class NZBImport. + * Class NZBImport + * + * @package Blacklight */ class NZBImport { diff --git a/Blacklight/NZBVortex.php b/Blacklight/NZBVortex.php index 62a5df978..303737853 100755 --- a/Blacklight/NZBVortex.php +++ b/Blacklight/NZBVortex.php @@ -5,10 +5,15 @@ namespace Blacklight; use Page; use App\Models\User; +/** + * Class NZBVortex + * + * @package Blacklight + */ final class NZBVortex { - protected $nonce = null; - protected $session = null; + private $nonce = null; + private $session = null; public function __construct() { diff --git a/Blacklight/NameFixer.php b/Blacklight/NameFixer.php index a3137406d..4dcb4e9ce 100755 --- a/Blacklight/NameFixer.php +++ b/Blacklight/NameFixer.php @@ -10,7 +10,9 @@ use Blacklight\utility\Utility; use Blacklight\processing\PostProcess; /** - * Class NameFixer. + * Class NameFixer + * + * @package Blacklight */ class NameFixer { diff --git a/Blacklight/Nfo.php b/Blacklight/Nfo.php index 6212612c4..45a962b40 100755 --- a/Blacklight/Nfo.php +++ b/Blacklight/Nfo.php @@ -14,7 +14,8 @@ use Blacklight\processing\PostProcess; /** * Class Nfo - * Class for handling fetching/storing of NFO files. + * + * @package Blacklight */ class Nfo { diff --git a/Blacklight/Regexes.php b/Blacklight/Regexes.php index fd6c63256..262d091a8 100755 --- a/Blacklight/Regexes.php +++ b/Blacklight/Regexes.php @@ -10,6 +10,11 @@ use App\Models\CollectionRegex; use App\Models\ReleaseNamingRegex; use Illuminate\Support\Facades\DB; +/** + * Class Regexes + * + * @package Blacklight + */ class Regexes { /** diff --git a/Blacklight/ReleaseCleaning.php b/Blacklight/ReleaseCleaning.php index d27ac3b14..2f8b6c7e9 100755 --- a/Blacklight/ReleaseCleaning.php +++ b/Blacklight/ReleaseCleaning.php @@ -7,6 +7,11 @@ use App\Models\Predb; /** * Cleans names for releases/imports/namefixer. * Names of group functions should match between CollectionsCleaning and this file. + * + * + * Class ReleaseCleaning + * + * @package Blacklight */ class ReleaseCleaning { diff --git a/Blacklight/ReleaseExtra.php b/Blacklight/ReleaseExtra.php index f66381e48..6f420b147 100755 --- a/Blacklight/ReleaseExtra.php +++ b/Blacklight/ReleaseExtra.php @@ -10,6 +10,11 @@ use App\Models\ReleaseExtraFull; use Illuminate\Support\Facades\DB; use Mhor\MediaInfo\Container\MediaInfoContainer; +/** + * Class ReleaseExtra + * + * @package Blacklight + */ class ReleaseExtra { /** diff --git a/Blacklight/ReleaseImage.php b/Blacklight/ReleaseImage.php index d621077c9..3d783af09 100755 --- a/Blacklight/ReleaseImage.php +++ b/Blacklight/ReleaseImage.php @@ -12,7 +12,10 @@ use Intervention\Image\Exception\NotWritableException; /** * Resize/save/delete images to disk. * + * * Class ReleaseImage + * + * @package Blacklight */ class ReleaseImage { diff --git a/Blacklight/ReleaseRemover.php b/Blacklight/ReleaseRemover.php index c27cbd840..5099a6343 100755 --- a/Blacklight/ReleaseRemover.php +++ b/Blacklight/ReleaseRemover.php @@ -8,7 +8,10 @@ use Illuminate\Support\Facades\DB; /** * Handles removing of various unwanted releases. * + * * Class ReleaseRemover + * + * @package Blacklight */ class ReleaseRemover { diff --git a/Blacklight/ReleaseSearch.php b/Blacklight/ReleaseSearch.php index 23fef98e2..7ff608e59 100755 --- a/Blacklight/ReleaseSearch.php +++ b/Blacklight/ReleaseSearch.php @@ -2,6 +2,11 @@ namespace Blacklight; +/** + * Class ReleaseSearch + * + * @package Blacklight + */ class ReleaseSearch { /** diff --git a/Blacklight/Releases.php b/Blacklight/Releases.php index 05dbd4145..a015315a9 100755 --- a/Blacklight/Releases.php +++ b/Blacklight/Releases.php @@ -13,7 +13,9 @@ use Illuminate\Support\Facades\File; use Illuminate\Support\Facades\Cache; /** - * Class Releases. + * Class Releases + * + * @package Blacklight */ class Releases { diff --git a/Blacklight/SABnzbd.php b/Blacklight/SABnzbd.php index dc2a7e5eb..0f4ba3416 100755 --- a/Blacklight/SABnzbd.php +++ b/Blacklight/SABnzbd.php @@ -6,7 +6,9 @@ use GuzzleHttp\Client; use App\Models\Settings; /** - * Class SABnzbd. + * Class SABnzbd + * + * @package Blacklight */ class SABnzbd { diff --git a/Blacklight/Sharing.php b/Blacklight/Sharing.php index 7df400c2a..2edbd5753 100755 --- a/Blacklight/Sharing.php +++ b/Blacklight/Sharing.php @@ -5,7 +5,9 @@ namespace Blacklight; use Illuminate\Support\Facades\DB; /** - * Class Sharing. + * Class Sharing + * + * @package Blacklight */ class Sharing { diff --git a/Blacklight/SphinxSearch.php b/Blacklight/SphinxSearch.php index 4bb5e9027..17a07e4e7 100755 --- a/Blacklight/SphinxSearch.php +++ b/Blacklight/SphinxSearch.php @@ -9,6 +9,11 @@ use Foolz\SphinxQL\SphinxQL; use Illuminate\Support\Facades\DB; use Foolz\SphinxQL\Drivers\Pdo\Connection; +/** + * Class SphinxSearch + * + * @package Blacklight + */ class SphinxSearch { /** diff --git a/Blacklight/Steam.php b/Blacklight/Steam.php index d4e3b118b..b49298398 100755 --- a/Blacklight/Steam.php +++ b/Blacklight/Steam.php @@ -6,6 +6,11 @@ use App\Models\Settings; use App\Models\SteamApp; use b3rs3rk\steamfront\Main; +/** + * Class Steam + * + * @package Blacklight + */ class Steam { private const STEAM_MATCH_PERCENTAGE = 90; diff --git a/Blacklight/Tmux.php b/Blacklight/Tmux.php index d43756074..3a187e963 100755 --- a/Blacklight/Tmux.php +++ b/Blacklight/Tmux.php @@ -7,7 +7,9 @@ use App\Models\Settings; use Illuminate\Support\Facades\DB; /** - * Class Tmux. + * Class Tmux + * + * @package Blacklight */ class Tmux { diff --git a/Blacklight/TmuxOutput.php b/Blacklight/TmuxOutput.php index ddbdfd2b8..1f35a169c 100755 --- a/Blacklight/TmuxOutput.php +++ b/Blacklight/TmuxOutput.php @@ -7,7 +7,10 @@ use App\Extensions\util\Git; /** * Tmux output functions for printing monitor data. * + * * Class TmuxOutput + * + * @package Blacklight */ class TmuxOutput extends Tmux { diff --git a/Blacklight/TmuxRun.php b/Blacklight/TmuxRun.php index de079050d..765441473 100755 --- a/Blacklight/TmuxRun.php +++ b/Blacklight/TmuxRun.php @@ -8,7 +8,10 @@ use Illuminate\Support\Facades\DB; /** * Tmux pane shell exec functions for pane respawning. * + * * Class TmuxRun + * + * @package Blacklight */ class TmuxRun extends Tmux { diff --git a/Blacklight/XXX.php b/Blacklight/XXX.php index c777e9e1e..0bbe44c64 100755 --- a/Blacklight/XXX.php +++ b/Blacklight/XXX.php @@ -16,7 +16,9 @@ use Blacklight\processing\adult\Popporn; use Blacklight\processing\adult\Hotmovies; /** - * Class XXX. + * Class XXX + * + * @package Blacklight */ class XXX { diff --git a/Changelog b/Changelog index fe16f03f0..0c3202e85 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2019-01-01 DariusIII + * Chg: Update all the \Blacklight namespace classes with class PHPDOC block * Chg: Update friendsofphp/php-cs-fixer to version 2.13.2 * Fix: Fix NZB creation * Fix: Fix typo in ProcessReleases class