Update NZB class

This commit is contained in:
DariusIII
2017-08-11 14:56:31 +02:00
parent 346cfb3a1d
commit b09d7b2f1b
3 changed files with 10 additions and 10 deletions
+1
View File
@@ -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
+7 -10
View File
@@ -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,
+2
View File
@@ -13,6 +13,8 @@ class NZBMultiGroup extends NZB
* @access public
*
* @param $pdo
*
* @throws \Exception
*/
public function __construct(&$pdo)
{