@@ -78,7 +78,6 @@ discard block |
||
| 78 | 78 | /** |
| 79 | 79 | * Fetch git tag for latest version. |
| 80 | 80 | * |
| 81 | - * @param null $path Optional path to the versions XML file. |
|
| 82 | 81 | */ |
| 83 | 82 | protected function git() |
| 84 | 83 | { |
@@ -93,7 +92,6 @@ discard block |
||
| 93 | 92 | /** |
| 94 | 93 | * Fetch SQL latest patch version. |
| 95 | 94 | * |
| 96 | - * @param null $path Optional path to the versions XML file. |
|
| 97 | 95 | */ |
| 98 | 96 | protected function sql() |
| 99 | 97 | { |
@@ -268,6 +268,9 @@ discard block |
||
| 268 | 268 | } |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | + /** |
|
| 272 | + * @param integer $property |
|
| 273 | + */ |
|
| 271 | 274 | protected function isChanged($property) |
| 272 | 275 | { |
| 273 | 276 | return (($this->changes & $property) == $property); |
@@ -309,6 +312,10 @@ discard block |
||
| 309 | 312 | } |
| 310 | 313 | } |
| 311 | 314 | |
| 315 | + /** |
|
| 316 | + * @param string $methodOld |
|
| 317 | + * @param string $methodUse |
|
| 318 | + */ |
|
| 312 | 319 | private function deprecated($methodOld, $methodUse) |
| 313 | 320 | { |
| 314 | 321 | trigger_error("This method ($methodOld) is deprecated. Please use '$methodUse' instead.", |
@@ -87,6 +87,9 @@ discard block |
||
| 87 | 87 | } |
| 88 | 88 | sleep(2); |
| 89 | 89 | |
| 90 | +/** |
|
| 91 | + * @param string $pane |
|
| 92 | + */ |
|
| 90 | 93 | function writelog($pane) |
| 91 | 94 | { |
| 92 | 95 | $path = dirname(__FILE__) . "/bin/logs"; |
@@ -100,6 +103,9 @@ discard block |
||
| 100 | 103 | } |
| 101 | 104 | } |
| 102 | 105 | |
| 106 | +/** |
|
| 107 | + * @param string $cmd |
|
| 108 | + */ |
|
| 103 | 109 | function command_exist($cmd) |
| 104 | 110 | { |
| 105 | 111 | $returnVal = exec("which $cmd 2>/dev/null"); |
@@ -101,6 +101,10 @@ discard block |
||
| 101 | 101 | return $this->pdo->queryOneRow(sprintf('SELECT bookinfo.* FROM bookinfo WHERE bookinfo.id = %d', $id)); |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | + /** |
|
| 105 | + * @param string $author |
|
| 106 | + * @param string|null $title |
|
| 107 | + */ |
|
| 104 | 108 | public function getBookInfoByName($author, $title) |
| 105 | 109 | { |
| 106 | 110 | $pdo = $this->pdo; |
@@ -332,6 +336,9 @@ discard block |
||
| 332 | 336 | return $browseby; |
| 333 | 337 | } |
| 334 | 338 | |
| 339 | + /** |
|
| 340 | + * @param string $title |
|
| 341 | + */ |
|
| 335 | 342 | public function fetchAmazonProperties($title) |
| 336 | 343 | { |
| 337 | 344 | $conf = new GenericConfiguration(); |
@@ -472,6 +479,9 @@ discard block |
||
| 472 | 479 | } |
| 473 | 480 | } |
| 474 | 481 | |
| 482 | + /** |
|
| 483 | + * @param string $releasetype |
|
| 484 | + */ |
|
| 475 | 485 | public function parseTitle($release_name, $releaseID, $releasetype) |
| 476 | 486 | { |
| 477 | 487 | $a = preg_replace('/\d{1,2} \d{1,2} \d{2,4}|(19|20)\d\d|anybody got .+?[a-z]\? |[-._ ](Novel|TIA)([-._ ]|$)|( |\.)HQ(-|\.| )|[\(\)\.\-_ ](AVI|AZW3?|DOC|EPUB|LIT|MOBI|NFO|RETAIL|(si)?PDF|RTF|TXT)[\)\]\.\-_ ](?![a-z0-9])|compleet|DAGSTiDNiNGEN|DiRFiX|\+ extra|r?e ?Books?([\.\-_ ]English|ers)?|azw3?|ePu(b|p)s?|html|mobi|^NEW[\.\-_ ]|PDF([\.\-_ ]English)?|Please post more|Post description|Proper|Repack(fix)?|[\.\-_ ](Chinese|English|French|German|Italian|Retail|Scan|Swedish)|^R4 |Repost|Skytwohigh|TIA!+|TruePDF|V413HAV|(would someone )?please (re)?post.+? "|with the authors name right/i', '', $release_name); |
@@ -177,6 +177,9 @@ |
||
| 177 | 177 | ]); |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | + /** |
|
| 181 | + * @param string $category |
|
| 182 | + */ |
|
| 180 | 183 | public static function getCategoryValue($category) |
| 181 | 184 | { |
| 182 | 185 | return constant('self::' . $category); |
@@ -174,6 +174,9 @@ discard block |
||
| 174 | 174 | return $colored_string; |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | + /** |
|
| 178 | + * @param string $fg |
|
| 179 | + */ |
|
| 177 | 180 | public static function set256($fg, $opt = "None", $bg = "None") |
| 178 | 181 | { |
| 179 | 182 | $colored_string = "\033[38;5;" . self::$colors256[$fg]; |
@@ -199,6 +202,9 @@ discard block |
||
| 199 | 202 | return $infostring; |
| 200 | 203 | } |
| 201 | 204 | |
| 205 | + /** |
|
| 206 | + * @param string $str |
|
| 207 | + */ |
|
| 202 | 208 | public static function notice($str) |
| 203 | 209 | { |
| 204 | 210 | $noticstring = "\033[38;5;" . self::$colors256['Blue'] . "mNotice: $str\033[0m\n"; |
@@ -229,12 +235,18 @@ discard block |
||
| 229 | 235 | return $str; |
| 230 | 236 | } |
| 231 | 237 | |
| 238 | + /** |
|
| 239 | + * @param string $str |
|
| 240 | + */ |
|
| 232 | 241 | public static function alternate($str) |
| 233 | 242 | { |
| 234 | 243 | $str = "\033[38;5;" . self::$colors256['DeepPink1'] . "m$str\033[0m\n"; |
| 235 | 244 | return $str; |
| 236 | 245 | } |
| 237 | 246 | |
| 247 | + /** |
|
| 248 | + * @param string $str |
|
| 249 | + */ |
|
| 238 | 250 | public static function tmuxOrange($str) |
| 239 | 251 | { |
| 240 | 252 | $str = "\033[38;5;" . self::$colors256['Orange'] . "m$str\033[0m\n"; |
@@ -253,12 +265,18 @@ discard block |
||
| 253 | 265 | return $str; |
| 254 | 266 | } |
| 255 | 267 | |
| 268 | + /** |
|
| 269 | + * @param string $str |
|
| 270 | + */ |
|
| 256 | 271 | public static function alternateOver($str) |
| 257 | 272 | { |
| 258 | 273 | $str = "\033[38;5;" . self::$colors256['DeepPink1'] . "m$str\033[0m"; |
| 259 | 274 | return $str; |
| 260 | 275 | } |
| 261 | 276 | |
| 277 | + /** |
|
| 278 | + * @param string $str |
|
| 279 | + */ |
|
| 262 | 280 | public static function warningOver($str) |
| 263 | 281 | { |
| 264 | 282 | $str = "\033[38;5;" . self::$colors256['Red'] . "m"; |
@@ -915,6 +915,9 @@ discard block |
||
| 915 | 915 | return (isset($result['title']) && !empty($result['title']) && isset($result['platform'])) ? $result : false; |
| 916 | 916 | } |
| 917 | 917 | |
| 918 | + /** |
|
| 919 | + * @param string $platform |
|
| 920 | + */ |
|
| 918 | 921 | function getBrowseNode($platform) |
| 919 | 922 | { |
| 920 | 923 | switch ($platform) { |
@@ -982,6 +985,9 @@ discard block |
||
| 982 | 985 | return $nodeId; |
| 983 | 986 | } |
| 984 | 987 | |
| 988 | + /** |
|
| 989 | + * @param string $nodeName |
|
| 990 | + */ |
|
| 985 | 991 | public function matchBrowseNode($nodeName) |
| 986 | 992 | { |
| 987 | 993 | $str = ''; |
@@ -128,6 +128,9 @@ |
||
| 128 | 128 | return $this->row2Object($row); |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | + /** |
|
| 132 | + * @param Content $content |
|
| 133 | + */ |
|
| 131 | 134 | public function validate($content) |
| 132 | 135 | { |
| 133 | 136 | if (substr($content->url, 0, 1) != '/') { |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | * |
| 270 | 270 | * @param $encoding |
| 271 | 271 | * |
| 272 | - * @return mixed If setting the encoding; returns true on success, else false. |
|
| 272 | + * @return string|boolean If setting the encoding; returns true on success, else false. |
|
| 273 | 273 | * When getting, returns the encoding. |
| 274 | 274 | */ |
| 275 | 275 | public function encoding($encoding = null) |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | * @param string $context |
| 338 | 338 | * @param array $options |
| 339 | 339 | * |
| 340 | - * @return void |
|
| 340 | + * @return string |
|
| 341 | 341 | */ |
| 342 | 342 | public function conditions($conditions, $context, array $options = []) |
| 343 | 343 | { |