@@ -81,7 +81,7 @@ |
||
| 81 | 81 | /** |
| 82 | 82 | * view a user |
| 83 | 83 | * |
| 84 | - * @param integer|string $userId |
|
| 84 | + * @param integer $userId |
|
| 85 | 85 | */ |
| 86 | 86 | public function viewUser($userId = 0){ |
| 87 | 87 | |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | /** |
| 57 | 57 | * view a post |
| 58 | 58 | * |
| 59 | - * @param integer|string $postId |
|
| 59 | + * @param integer $postId |
|
| 60 | 60 | */ |
| 61 | 61 | public function view($postId = 0){ |
| 62 | 62 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | /** |
| 21 | 21 | * Gets a configuration value |
| 22 | 22 | * |
| 23 | - * @param $key string |
|
| 23 | + * @param string $key string |
|
| 24 | 24 | * @return string|null |
| 25 | 25 | * @throws Exception if configuration file doesn't exist |
| 26 | 26 | */ |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | * |
| 40 | 40 | * @access public |
| 41 | 41 | * @static static method |
| 42 | - * @return string User ID |
|
| 42 | + * @return integer User ID |
|
| 43 | 43 | */ |
| 44 | 44 | public static function getUserId(){ |
| 45 | 45 | return (int)self::$userId; |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | * Get number of total pages. |
| 81 | 81 | * |
| 82 | 82 | * @access public |
| 83 | - * @return integer |
|
| 83 | + * @return double |
|
| 84 | 84 | */ |
| 85 | 85 | public function totalPages() { |
| 86 | 86 | return ceil($this->totalCount/$this->perPage); |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | * @access public |
| 168 | 168 | * @param integer $userId |
| 169 | 169 | * @param string $emailToken |
| 170 | - * @return mixed |
|
| 170 | + * @return boolean |
|
| 171 | 171 | * @throws Exception If failed to revoke email updates. |
| 172 | 172 | */ |
| 173 | 173 | public function revokeEmail($userId, $emailToken){ |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | * @access public |
| 207 | 207 | * @param integer $userId |
| 208 | 208 | * @param string $emailToken |
| 209 | - * @return mixed |
|
| 209 | + * @return boolean |
|
| 210 | 210 | * @throws Exception If failed to update current email. |
| 211 | 211 | */ |
| 212 | 212 | public function updateEmail($userId, $emailToken){ |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | /** |
| 252 | 252 | * clear all existing errors |
| 253 | 253 | * |
| 254 | - * @return bool |
|
| 254 | + * @return boolean|null |
|
| 255 | 255 | */ |
| 256 | 256 | public function clearErrors(){ |
| 257 | 257 | $this->errors = []; |
@@ -275,7 +275,6 @@ discard block |
||
| 275 | 275 | * min string length |
| 276 | 276 | * |
| 277 | 277 | * @param string $str |
| 278 | - * @param array $args(min) |
|
| 279 | 278 | * |
| 280 | 279 | * @return bool |
| 281 | 280 | */ |
@@ -287,7 +286,6 @@ discard block |
||
| 287 | 286 | * max string length |
| 288 | 287 | * |
| 289 | 288 | * @param string $str |
| 290 | - * @param array $args(max) |
|
| 291 | 289 | * |
| 292 | 290 | * @return bool |
| 293 | 291 | */ |
@@ -299,7 +297,6 @@ discard block |
||
| 299 | 297 | * check if number between given range of numbers |
| 300 | 298 | * |
| 301 | 299 | * @param int $num |
| 302 | - * @param array $args(min,max) |
|
| 303 | 300 | * @return bool |
| 304 | 301 | */ |
| 305 | 302 | private function rangeNum($num, $args){ |
@@ -340,7 +337,7 @@ discard block |
||
| 340 | 337 | * check if value is contains alphabetic characters and numbers |
| 341 | 338 | * |
| 342 | 339 | * @param mixed $value |
| 343 | - * @return bool |
|
| 340 | + * @return integer |
|
| 344 | 341 | */ |
| 345 | 342 | private function alphaNum($value){ |
| 346 | 343 | return preg_match('/\A[a-z0-9]+\z/i', $value); |
@@ -350,7 +347,7 @@ discard block |
||
| 350 | 347 | * check if value is contains alphabetic characters, numbers and spaces |
| 351 | 348 | * |
| 352 | 349 | * @param mixed $value |
| 353 | - * @return bool |
|
| 350 | + * @return integer |
|
| 354 | 351 | */ |
| 355 | 352 | private function alphaNumWithSpaces($value){ |
| 356 | 353 | return preg_match('/\A[a-z0-9 ]+\z/i', $value); |
@@ -364,7 +361,7 @@ discard block |
||
| 364 | 361 | * - one special(non-word) character |
| 365 | 362 | * |
| 366 | 363 | * @param mixed $value |
| 367 | - * @return bool |
|
| 364 | + * @return integer |
|
| 368 | 365 | * @see http://stackoverflow.com/questions/8141125/regex-for-password-php |
| 369 | 366 | * @see http://code.runnable.com/UmrnTejI6Q4_AAIM/how-to-validate-complex-passwords-using-regular-expressions-for-php-and-pcre |
| 370 | 367 | */ |
@@ -376,7 +373,6 @@ discard block |
||
| 376 | 373 | * check if value is equals to another value(strings) |
| 377 | 374 | * |
| 378 | 375 | * @param string $value |
| 379 | - * @param array $args(value) |
|
| 380 | 376 | * @return bool |
| 381 | 377 | */ |
| 382 | 378 | private function equals($value, $args){ |
@@ -387,7 +383,6 @@ discard block |
||
| 387 | 383 | * check if value is not equal to another value(strings) |
| 388 | 384 | * |
| 389 | 385 | * @param string $value |
| 390 | - * @param array $args(value) |
|
| 391 | 386 | * @return bool |
| 392 | 387 | */ |
| 393 | 388 | private function notEqual($value, $args){ |
@@ -412,7 +407,6 @@ discard block |
||
| 412 | 407 | * check if a value of a column is unique. |
| 413 | 408 | * |
| 414 | 409 | * @param string $value |
| 415 | - * @param array $args(table, column) |
|
| 416 | 410 | * @return bool |
| 417 | 411 | */ |
| 418 | 412 | private function unique($value, $args){ |
@@ -568,7 +562,6 @@ discard block |
||
| 568 | 562 | * checks from file size |
| 569 | 563 | * |
| 570 | 564 | * @param array $file |
| 571 | - * @param array $args(min,max) |
|
| 572 | 565 | * @return bool |
| 573 | 566 | */ |
| 574 | 567 | private function fileSize($file, $args){ |
@@ -594,7 +587,6 @@ discard block |
||
| 594 | 587 | * checks from image size(dimensions) |
| 595 | 588 | * |
| 596 | 589 | * @param array $file |
| 597 | - * @param array $dimensions(width,height) |
|
| 598 | 590 | * @return bool |
| 599 | 591 | */ |
| 600 | 592 | private function imageSize($file, $dimensions){ |
@@ -671,7 +663,7 @@ discard block |
||
| 671 | 663 | * you need to change it here as well. |
| 672 | 664 | * |
| 673 | 665 | * @param string $rule |
| 674 | - * @return mixed |
|
| 666 | + * @return string|null |
|
| 675 | 667 | */ |
| 676 | 668 | private static function defaultMessages($rule){ |
| 677 | 669 | $messages = [ |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * count fields in $this->data and optionally exclude some fields |
| 75 | 75 | * |
| 76 | 76 | * @param array $exclude |
| 77 | - * @return mixed |
|
| 77 | + * @return integer |
|
| 78 | 78 | */ |
| 79 | 79 | public function countData(array $exclude = []){ |
| 80 | 80 | $count = count($this->data); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * safer and better access to $this->data |
| 91 | 91 | * |
| 92 | 92 | * @param string $key |
| 93 | - * @return mixed |
|
| 93 | + * @return string|null |
|
| 94 | 94 | */ |
| 95 | 95 | public function data($key){ |
| 96 | 96 | return array_key_exists($key, $this->data)? $this->data[$key]: null; |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * safer and better access to $this->query |
| 101 | 101 | * |
| 102 | 102 | * @param string $key |
| 103 | - * @return mixed |
|
| 103 | + * @return string |
|
| 104 | 104 | */ |
| 105 | 105 | public function query($key){ |
| 106 | 106 | return array_key_exists($key, $this->query)? $this->query[$key]: null; |
@@ -175,7 +175,7 @@ |
||
| 175 | 175 | * call error action method and set response status code |
| 176 | 176 | * This will work as well for ajax call, see how ajax calls are handled in main.js |
| 177 | 177 | * |
| 178 | - * @param int|string $code |
|
| 178 | + * @param integer $code |
|
| 179 | 179 | * |
| 180 | 180 | */ |
| 181 | 181 | public function error($code){ |