@@ -34,7 +34,7 @@ |
||
| 34 | 34 | * @param string $string |
| 35 | 35 | * @param HTMLPurifier_Config $config |
| 36 | 36 | * @param HTMLPurifier_Context $context |
| 37 | - * @return bool|string |
|
| 37 | + * @return false|string |
|
| 38 | 38 | */ |
| 39 | 39 | public function validate($string, $config, $context) |
| 40 | 40 | { |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | * @param string $string |
| 25 | 25 | * @param HTMLPurifier_Config $config |
| 26 | 26 | * @param HTMLPurifier_Context $context |
| 27 | - * @return bool|string |
|
| 27 | + * @return string|false |
|
| 28 | 28 | */ |
| 29 | 29 | public function validate($string, $config, $context) |
| 30 | 30 | { |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | protected $minimumConfidence = 65.0; // set at your desired threshold |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | - * @return bool |
|
| 26 | + * @return boolean|null |
|
| 27 | 27 | */ |
| 28 | 28 | public function execute() |
| 29 | 29 | { |
@@ -458,6 +458,9 @@ discard block |
||
| 458 | 458 | const CHARACTR = 4; |
| 459 | 459 | const EOF = 5; |
| 460 | 460 | |
| 461 | + /** |
|
| 462 | + * @param string $data |
|
| 463 | + */ |
|
| 461 | 464 | public function __construct($data) |
| 462 | 465 | { |
| 463 | 466 | $this->data = $data; |
@@ -478,6 +481,9 @@ discard block |
||
| 478 | 481 | return $this->tree->save(); |
| 479 | 482 | } |
| 480 | 483 | |
| 484 | + /** |
|
| 485 | + * @return string |
|
| 486 | + */ |
|
| 481 | 487 | private function char() |
| 482 | 488 | { |
| 483 | 489 | return ($this->char < $this->EOF) |
@@ -485,6 +491,11 @@ discard block |
||
| 485 | 491 | : false; |
| 486 | 492 | } |
| 487 | 493 | |
| 494 | + /** |
|
| 495 | + * @param integer $s |
|
| 496 | + * |
|
| 497 | + * @return string |
|
| 498 | + */ |
|
| 488 | 499 | private function character($s, $l = 0) |
| 489 | 500 | { |
| 490 | 501 | if ($s + $l < $this->EOF) { |
@@ -496,6 +507,10 @@ discard block |
||
| 496 | 507 | } |
| 497 | 508 | } |
| 498 | 509 | |
| 510 | + /** |
|
| 511 | + * @param string $char_class |
|
| 512 | + * @param integer $start |
|
| 513 | + */ |
|
| 499 | 514 | private function characters($char_class, $start) |
| 500 | 515 | { |
| 501 | 516 | return preg_replace('#^([' . $char_class . ']+).*#s', '\\1', substr($this->data, $start)); |
@@ -4645,6 +4660,9 @@ discard block |
||
| 4645 | 4660 | } |
| 4646 | 4661 | } |
| 4647 | 4662 | |
| 4663 | + /** |
|
| 4664 | + * @param string[] $elements |
|
| 4665 | + */ |
|
| 4648 | 4666 | private function clearStackToTableContext($elements) |
| 4649 | 4667 | { |
| 4650 | 4668 | /* When the steps above require the UA to clear the stack back to a |
@@ -270,6 +270,9 @@ discard block |
||
| 270 | 270 | return self::mb_detect_encoding($var, array($encoding)) || false !== @iconv($encoding, $encoding, $var); |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | + /** |
|
| 274 | + * @return string |
|
| 275 | + */ |
|
| 273 | 276 | public static function mb_detect_encoding($str, $encodingList = null, $strict = false) |
| 274 | 277 | { |
| 275 | 278 | if (null === $encodingList) { |
@@ -574,6 +577,9 @@ discard block |
||
| 574 | 577 | return $code; |
| 575 | 578 | } |
| 576 | 579 | |
| 580 | + /** |
|
| 581 | + * @param boolean $part |
|
| 582 | + */ |
|
| 577 | 583 | private static function getSubpart($pos, $part, $haystack, $encoding) |
| 578 | 584 | { |
| 579 | 585 | if (false === $pos) { |
@@ -621,6 +627,9 @@ discard block |
||
| 621 | 627 | return self::mb_convert_case($s[0], MB_CASE_UPPER, 'UTF-8'); |
| 622 | 628 | } |
| 623 | 629 | |
| 630 | + /** |
|
| 631 | + * @param string $file |
|
| 632 | + */ |
|
| 624 | 633 | private static function getData($file) |
| 625 | 634 | { |
| 626 | 635 | if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | /** |
| 223 | 223 | * Access the only instance of this class |
| 224 | 224 | * |
| 225 | - * @return object |
|
| 225 | + * @return MyTextSanitizer |
|
| 226 | 226 | * @static |
| 227 | 227 | * @staticvar object |
| 228 | 228 | */ |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | * Replace XoopsCodes with their equivalent HTML formatting |
| 395 | 395 | * |
| 396 | 396 | * @param string $text |
| 397 | - * @param bool|int $allowimage Allow images in the text? |
|
| 397 | + * @param integer $allowimage Allow images in the text? |
|
| 398 | 398 | * On FALSE, uses links to images. |
| 399 | 399 | * @return string |
| 400 | 400 | */ |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | * A quick solution for filtering XSS scripts |
| 481 | 481 | * |
| 482 | 482 | * @TODO : To be improved |
| 483 | - * @param $text |
|
| 483 | + * @param string $text |
|
| 484 | 484 | * @return mixed |
| 485 | 485 | */ |
| 486 | 486 | public function filterXss($text) |
@@ -576,11 +576,11 @@ discard block |
||
| 576 | 576 | * Filters textarea form data in DB for display |
| 577 | 577 | * |
| 578 | 578 | * @param string $text |
| 579 | - * @param bool|int $html allow html? |
|
| 580 | - * @param bool|int $smiley allow smileys? |
|
| 581 | - * @param bool|int $xcode allow xoopscode? |
|
| 582 | - * @param bool|int $image allow inline images? |
|
| 583 | - * @param bool|int $br convert linebreaks? |
|
| 579 | + * @param integer $html allow html? |
|
| 580 | + * @param integer $smiley allow smileys? |
|
| 581 | + * @param integer $xcode allow xoopscode? |
|
| 582 | + * @param integer $image allow inline images? |
|
| 583 | + * @param integer $br convert linebreaks? |
|
| 584 | 584 | * @return string |
| 585 | 585 | */ |
| 586 | 586 | public function &displayTarea($text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1) |
@@ -624,11 +624,11 @@ discard block |
||
| 624 | 624 | * Filters textarea form data submitted for preview |
| 625 | 625 | * |
| 626 | 626 | * @param string $text |
| 627 | - * @param bool|int $html allow html? |
|
| 628 | - * @param bool|int $smiley allow smileys? |
|
| 629 | - * @param bool|int $xcode allow xoopscode? |
|
| 630 | - * @param bool|int $image allow inline images? |
|
| 631 | - * @param bool|int $br convert linebreaks? |
|
| 627 | + * @param integer $html allow html? |
|
| 628 | + * @param integer $smiley allow smileys? |
|
| 629 | + * @param integer $xcode allow xoopscode? |
|
| 630 | + * @param integer $image allow inline images? |
|
| 631 | + * @param integer $br convert linebreaks? |
|
| 632 | 632 | * @return string |
| 633 | 633 | */ |
| 634 | 634 | public function &previewTarea($text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1) |
@@ -660,7 +660,7 @@ discard block |
||
| 660 | 660 | * MyTextSanitizer::codePreConv() |
| 661 | 661 | * |
| 662 | 662 | * @param mixed $text |
| 663 | - * @param mixed $xcode |
|
| 663 | + * @param integer $xcode |
|
| 664 | 664 | * @return mixed |
| 665 | 665 | */ |
| 666 | 666 | public function codePreConv($text, $xcode = 1) |
@@ -696,8 +696,8 @@ discard block |
||
| 696 | 696 | * MyTextSanitizer::codeConv() |
| 697 | 697 | * |
| 698 | 698 | * @param mixed $text |
| 699 | - * @param mixed $xcode |
|
| 700 | - * @return mixed |
|
| 699 | + * @param integer $xcode |
|
| 700 | + * @return string |
|
| 701 | 701 | */ |
| 702 | 702 | public function codeConv($text, $xcode = 1) |
| 703 | 703 | { |
@@ -713,7 +713,7 @@ discard block |
||
| 713 | 713 | /** |
| 714 | 714 | * MyTextSanitizer::executeExtensions() |
| 715 | 715 | * |
| 716 | - * @return bool |
|
| 716 | + * @return boolean|null |
|
| 717 | 717 | */ |
| 718 | 718 | public function executeExtensions() |
| 719 | 719 | { |
@@ -798,8 +798,8 @@ discard block |
||
| 798 | 798 | * MyTextSanitizer::codeSanitizer() |
| 799 | 799 | * |
| 800 | 800 | * @param mixed $str |
| 801 | - * @param mixed $image |
|
| 802 | - * @return mixed|string |
|
| 801 | + * @param integer $image |
|
| 802 | + * @return string |
|
| 803 | 803 | */ |
| 804 | 804 | public function codeSanitizer($str, $image = 1) |
| 805 | 805 | { |
@@ -816,8 +816,8 @@ discard block |
||
| 816 | 816 | * @param mixed $text |
| 817 | 817 | * @param integer $allowhtml |
| 818 | 818 | * @param integer $smiley |
| 819 | - * @param mixed $bbcode |
|
| 820 | - * @return mixed|string |
|
| 819 | + * @param integer $bbcode |
|
| 820 | + * @return string |
|
| 821 | 821 | */ |
| 822 | 822 | public function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) |
| 823 | 823 | { |
@@ -847,8 +847,8 @@ discard block |
||
| 847 | 847 | * @param mixed $text |
| 848 | 848 | * @param integer $allowhtml |
| 849 | 849 | * @param integer $smiley |
| 850 | - * @param mixed $bbcode |
|
| 851 | - * @return mixed|string |
|
| 850 | + * @param integer $bbcode |
|
| 851 | + * @return string |
|
| 852 | 852 | */ |
| 853 | 853 | public function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) |
| 854 | 854 | { |
@@ -891,8 +891,8 @@ discard block |
||
| 891 | 891 | * MyTextSanitizer::makeTboxData4Show() |
| 892 | 892 | * |
| 893 | 893 | * @param mixed $text |
| 894 | - * @param mixed $smiley |
|
| 895 | - * @return mixed|string |
|
| 894 | + * @param integer $smiley |
|
| 895 | + * @return string |
|
| 896 | 896 | */ |
| 897 | 897 | public function makeTboxData4Show($text, $smiley = 0) |
| 898 | 898 | { |
@@ -919,8 +919,8 @@ discard block |
||
| 919 | 919 | * MyTextSanitizer::makeTboxData4Preview() |
| 920 | 920 | * |
| 921 | 921 | * @param mixed $text |
| 922 | - * @param mixed $smiley |
|
| 923 | - * @return mixed|string |
|
| 922 | + * @param integer $smiley |
|
| 923 | + * @return string |
|
| 924 | 924 | */ |
| 925 | 925 | public function makeTboxData4Preview($text, $smiley = 0) |
| 926 | 926 | { |
@@ -964,8 +964,8 @@ discard block |
||
| 964 | 964 | * @param mixed $text |
| 965 | 965 | * @param integer $html |
| 966 | 966 | * @param integer $smiley |
| 967 | - * @param mixed $xcode |
|
| 968 | - * @return mixed|string |
|
| 967 | + * @param integer $xcode |
|
| 968 | + * @return string |
|
| 969 | 969 | */ |
| 970 | 970 | public function &makeTareaData4Show(&$text, $html = 1, $smiley = 1, $xcode = 1) |
| 971 | 971 | { |
@@ -994,8 +994,8 @@ discard block |
||
| 994 | 994 | * @param mixed $text |
| 995 | 995 | * @param integer $html |
| 996 | 996 | * @param integer $smiley |
| 997 | - * @param mixed $xcode |
|
| 998 | - * @return mixed|string |
|
| 997 | + * @param integer $xcode |
|
| 998 | + * @return string |
|
| 999 | 999 | */ |
| 1000 | 1000 | public function &makeTareaData4Preview(&$text, $html = 1, $smiley = 1, $xcode = 1) |
| 1001 | 1001 | { |
@@ -114,7 +114,7 @@ |
||
| 114 | 114 | class SystemuserrankHandler extends XoopsPersistableObjectHandler |
| 115 | 115 | { |
| 116 | 116 | /** |
| 117 | - * @param null|XoopsDatabase $db |
|
| 117 | + * @param XoopsDatabase $db |
|
| 118 | 118 | */ |
| 119 | 119 | public function __construct(XoopsDatabase $db) |
| 120 | 120 | { |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | class Protector_postcommon_post_deny_by_httpbl extends ProtectorFilterAbstract |
| 10 | 10 | { |
| 11 | 11 | /** |
| 12 | - * @return bool |
|
| 12 | + * @return null|boolean |
|
| 13 | 13 | */ |
| 14 | 14 | public function execute() |
| 15 | 15 | { |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | class Protector_postcommon_post_deny_by_rbl extends ProtectorFilterAbstract |
| 7 | 7 | { |
| 8 | 8 | /** |
| 9 | - * @return bool |
|
| 9 | + * @return null|boolean |
|
| 10 | 10 | */ |
| 11 | 11 | public function execute() |
| 12 | 12 | { |