From b09d7b2f1b7c33ec583169848283732cb4136b95 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Fri, 11 Aug 2017 14:56:31 +0200 Subject: [PATCH] Update NZB class --- Changelog | 1 + nntmux/NZB.php | 17 +++++++---------- nntmux/NZBMultiGroup.php | 2 ++ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Changelog b/Changelog index 4134bc939..7f171c722 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2017-08-11 DariusIII + * Chg: Update NZB class * Chg: Update API/RSS again * Fix: Fix API/RSS feeds * Chg: Update API/RSS related classes diff --git a/nntmux/NZB.php b/nntmux/NZB.php index fa2b1ff0f..11f5b5e10 100755 --- a/nntmux/NZB.php +++ b/nntmux/NZB.php @@ -43,15 +43,12 @@ class NZB protected $groupID; /** - * Instance of class db. - * - * @var \nntmux\db\Settings - * @access public + * @var DB */ public $pdo; /** - * @var \nntmux\Logger + * @var Logger */ protected $debugging; @@ -148,7 +145,7 @@ class NZB $this->groupID = $groupID; // Set table names - if ($this->groupID == '') { + if ($this->groupID === '') { exit("{$this->groupID} is missing\n"); } $this->_tableNames = [ @@ -159,7 +156,7 @@ class NZB $this->setQueries(); } - protected function setQueries() + protected function setQueries(): void { $this->_collectionsQuery = " SELECT c.*, UNIX_TIMESTAMP(c.date) AS udate, @@ -191,7 +188,7 @@ class NZB * * @access public */ - public function writeNZBforReleaseId($relID, $relGuid, $name, $cTitle) + public function writeNZBforReleaseId($relID, $relGuid, $name, $cTitle): bool { $collections = $this->pdo->queryDirect($this->_collectionsQuery . $relID); @@ -343,7 +340,7 @@ class NZB * * @access public */ - public function getNZBPath($releaseGuid, $levelsToSplit = 0, $createIfNotExist = false) + public function getNZBPath($releaseGuid, $levelsToSplit = 0, $createIfNotExist = false): string { if ($levelsToSplit === 0) { $levelsToSplit = $this->nzbSplitLevel; @@ -382,7 +379,7 @@ class NZB * * @access public */ - public function nzbFileList($nzb, array $options = []) + public function nzbFileList($nzb, array $options = []): array { $defaults = [ 'no-file-key' => true, diff --git a/nntmux/NZBMultiGroup.php b/nntmux/NZBMultiGroup.php index 093531245..7c638a6dd 100644 --- a/nntmux/NZBMultiGroup.php +++ b/nntmux/NZBMultiGroup.php @@ -13,6 +13,8 @@ class NZBMultiGroup extends NZB * @access public * * @param $pdo + * + * @throws \Exception */ public function __construct(&$pdo) {