@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | protected function _getReleases() |
| 42 | 42 | { |
| 43 | 43 | $this->_releases = $this->pdo->queryDirect( |
| 44 | - sprintf (' |
|
| 44 | + sprintf(' |
|
| 45 | 45 | SELECT r.id, r.name, r.searchname, r.fromname, g.name AS groupname, r.groups_id, r.categories_id |
| 46 | 46 | FROM releases r |
| 47 | 47 | LEFT JOIN groups g ON r.groups_id = g.id |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | if ($this->_releases instanceof \Traversable) { |
| 113 | 113 | // Loop all the results. |
| 114 | - foreach($this->_releases as $release) { |
|
| 114 | + foreach ($this->_releases as $release) { |
|
| 115 | 115 | |
| 116 | 116 | $this->_release['name'] = $release['name']; |
| 117 | 117 | // Try to find a request id for the release. |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | $returnedIdentifiers = []; |
| 170 | 170 | |
| 171 | 171 | $groupIDArray = []; |
| 172 | - foreach($returnXml->request as $result) { |
|
| 172 | + foreach ($returnXml->request as $result) { |
|
| 173 | 173 | if (isset($result['name']) && isset($result['ident']) && (int)$result['ident'] > 0) { |
| 174 | 174 | $this->_newTitle['title'] = (string)$result['name']; |
| 175 | 175 | $this->_requestID = (int)$result['reqid']; |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | |
| 224 | 224 | $status = self::REQID_NONE; |
| 225 | 225 | if ($addDate !== false && !empty($addDate['adddate'])) { |
| 226 | - if ((bool) (intval((time() - (int)$addDate['adddate']) / 3600) > $this->_request_hours)) { |
|
| 226 | + if ((bool)(intval((time() - (int)$addDate['adddate']) / 3600) > $this->_request_hours)) { |
|
| 227 | 227 | $status = self::REQID_OLD; |
| 228 | 228 | } |
| 229 | 229 | } else { |
@@ -151,7 +151,7 @@ |
||
| 151 | 151 | 'search' => ['available' => 'yes', 'supportedParams' => 'q'], |
| 152 | 152 | 'tv-search' => ['available' => 'yes', 'supportedParams' => 'q,vid,tvdbid,traktid,rid,tvmazeid,imdbid,tmdbid,season,ep'], |
| 153 | 153 | 'movie-search' => ['available' => 'yes', 'supportedParams' => 'q,imdbid'], |
| 154 | - 'audio-search' => ['available' => 'no', 'supportedParams' => ''] |
|
| 154 | + 'audio-search' => ['available' => 'no', 'supportedParams' => ''] |
|
| 155 | 155 | ], |
| 156 | 156 | 'categories' => |
| 157 | 157 | ($this->type === 'caps' |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | * |
| 13 | 13 | * @package nntmux |
| 14 | 14 | */ |
| 15 | -Class RSS extends Capabilities |
|
| 15 | +class RSS extends Capabilities |
|
| 16 | 16 | { |
| 17 | 17 | /** Releases class |
| 18 | 18 | * @var Releases |
@@ -30,7 +30,8 @@ |
||
| 30 | 30 | * |
| 31 | 31 | * @package nntmux |
| 32 | 32 | */ |
| 33 | -class API extends Capabilities { |
|
| 33 | +class API extends Capabilities |
|
| 34 | +{ |
|
| 34 | 35 | |
| 35 | 36 | /** DB class |
| 36 | 37 | * @var \nntmux\db\Settings |
@@ -130,7 +130,7 @@ |
||
| 130 | 130 | $tsql .= sprintf("AND v.title LIKE %s", $this->pdo->escapeString("%" . $showname . "%")); |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | - $qry = sprintf(" |
|
| 133 | + $qry = sprintf(" |
|
| 134 | 134 | SELECT v.* FROM |
| 135 | 135 | (SELECT v.*, |
| 136 | 136 | tve.firstaired AS prevdate, tve.title AS previnfo, |
@@ -14,7 +14,8 @@ |
||
| 14 | 14 | /** |
| 15 | 15 | * @param array $options |
| 16 | 16 | */ |
| 17 | - public function __construct(array $options = []) { |
|
| 17 | + public function __construct(array $options = []) |
|
| 18 | + { |
|
| 18 | 19 | $defaults = [ |
| 19 | 20 | 'Echo' => false, |
| 20 | 21 | 'Logger' => null, |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * |
| 10 | 10 | * @package nntmux |
| 11 | 11 | */ |
| 12 | -Class Videos |
|
| 12 | +class Videos |
|
| 13 | 13 | { |
| 14 | 14 | /** |
| 15 | 15 | * @param array $options |
@@ -902,7 +902,7 @@ |
||
| 902 | 902 | // Try re-selecting the group. |
| 903 | 903 | $data = $nntp->selectGroup($group); |
| 904 | 904 | if ($this->isError($data)) { |
| 905 | - $message = "Code {$data->code}: {$data->message}\nSkipping group: {$group}"; |
|
| 905 | + $message = "code {$data->code}: {$data->message}\nSkipping group: {$group}"; |
|
| 906 | 906 | if ($this->_debugBool) { |
| 907 | 907 | $this->_debugging->log(get_class(), __FUNCTION__, $message, Logger::LOG_NOTICE); |
| 908 | 908 | } |
@@ -13,8 +13,8 @@ discard block |
||
| 13 | 13 | const REQID_NONE = -3; // The Request id was not found locally or via web lookup. |
| 14 | 14 | const REQID_ZERO = -2; // The Request id was 0. |
| 15 | 15 | const REQID_NOLL = -1; // Request id was not found via local lookup. |
| 16 | - const REQID_UPROC = 0; // Release has not been processed. |
|
| 17 | - const REQID_FOUND = 1; // Request id found and release was updated. |
|
| 16 | + const REQID_UPROC = 0; // Release has not been processed. |
|
| 17 | + const REQID_FOUND = 1; // Request id found and release was updated. |
|
| 18 | 18 | |
| 19 | 19 | const IS_REQID_TRUE = 1; // releases.isrequestid is 1 |
| 20 | 20 | const IS_REQID_FALSE = 0; // releases.isrequestid is 0 |
@@ -144,9 +144,9 @@ discard block |
||
| 144 | 144 | case preg_match('/\[\s*(\d+)\s*\]/', $this->_release['name'], $requestID): |
| 145 | 145 | case preg_match('/^REQ\s*(\d{4,6})/i', $this->_release['name'], $requestID): |
| 146 | 146 | case preg_match('/^(\d{4,6})-\d{1}\[/', $this->_release['name'], $requestID): |
| 147 | - case preg_match('/(\d{4,6}) -/',$this->_release['name'], $requestID): |
|
| 148 | - if ((int) $requestID[1] > 0) { |
|
| 149 | - return (int) $requestID[1]; |
|
| 147 | + case preg_match('/(\d{4,6}) -/', $this->_release['name'], $requestID): |
|
| 148 | + if ((int)$requestID[1] > 0) { |
|
| 149 | + return (int)$requestID[1]; |
|
| 150 | 150 | } |
| 151 | 151 | } |
| 152 | 152 | return self::REQID_ZERO; |
@@ -95,14 +95,18 @@ discard block |
||
| 95 | 95 | /** |
| 96 | 96 | * Fetch releases with requestid's from MySQL. |
| 97 | 97 | */ |
| 98 | - protected function _getReleases() { } |
|
| 98 | + protected function _getReleases() |
|
| 99 | + { |
|
| 100 | +} |
|
| 99 | 101 | |
| 100 | 102 | /** |
| 101 | 103 | * Process releases for requestid's. |
| 102 | 104 | * |
| 103 | 105 | * @return int How many did we rename? |
| 104 | 106 | */ |
| 105 | - protected function _processReleases() { } |
|
| 107 | + protected function _processReleases() |
|
| 108 | + { |
|
| 109 | +} |
|
| 106 | 110 | |
| 107 | 111 | /** |
| 108 | 112 | * No request id was found, update the release. |
@@ -129,7 +133,9 @@ discard block |
||
| 129 | 133 | * |
| 130 | 134 | * @return array|bool |
| 131 | 135 | */ |
| 132 | - protected function _getNewTitle() { } |
|
| 136 | + protected function _getNewTitle() |
|
| 137 | + { |
|
| 138 | +} |
|
| 133 | 139 | |
| 134 | 140 | /** |
| 135 | 141 | * Find a RequestID in a usenet subject. |
@@ -190,7 +190,7 @@ |
||
| 190 | 190 | $category = explode(":", $li->plaintext); |
| 191 | 191 | if (trim($category[0]) == "Category") { |
| 192 | 192 | $g = explode(",", $category[1]); |
| 193 | - foreach($g as $genre) { |
|
| 193 | + foreach ($g as $genre) { |
|
| 194 | 194 | $genres[] = trim($genre); |
| 195 | 195 | } |
| 196 | 196 | $this->_res['genres'] = & $genres; |
@@ -120,7 +120,7 @@ |
||
| 120 | 120 | $version = $this->_vers->versions->git->tag; |
| 121 | 121 | |
| 122 | 122 | $buffer .= sprintf($this->tmpMasks[2], |
| 123 | - "Monitor $state $version [" . $this->runVar['constants']['sqlpatch'] . "]: ", |
|
| 123 | + "monitor $state $version [" . $this->runVar['constants']['sqlpatch'] . "]: ", |
|
| 124 | 124 | $this->relativeTime($this->runVar['timers']['timer1']) |
| 125 | 125 | ); |
| 126 | 126 | |