@@ -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 | { |
@@ -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 | { |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * Tries to find and include a file for a cache engine and returns object instance |
80 | 80 | * |
81 | 81 | * @param $name Name of the engine |
82 | - * @return mixed $engine object or null |
|
82 | + * @return boolean $engine object or null |
|
83 | 83 | * @access private |
84 | 84 | */ |
85 | 85 | private function loadEngine($name) |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | * |
207 | 207 | * @param string $key Identifier for the data |
208 | 208 | * @param mixed $value Data to be cached - anything except a resource |
209 | - * @param mixed $duration Optional - string configuration name OR how long to cache the data, either in seconds or a |
|
209 | + * @param string $duration Optional - string configuration name OR how long to cache the data, either in seconds or a |
|
210 | 210 | * string that can be parsed by the strtotime() function OR array('config' => 'default', 'duration' => '3600') |
211 | 211 | * @return boolean True if the data was successfully cached, false on failure |
212 | 212 | * @access public |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | * generates a safe key |
385 | 385 | * |
386 | 386 | * @param string $key the key passed over |
387 | - * @return mixed string $key or false |
|
387 | + * @return false|string string $key or false |
|
388 | 388 | * @access private |
389 | 389 | */ |
390 | 390 | public function key($key) |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | * @param string $key Identifier for the data |
450 | 450 | * @param mixed $value Data to be cached |
451 | 451 | * @param mixed $duration How long to cache the data, in seconds |
452 | - * @return boolean True if the data was successfully cached, false on failure |
|
452 | + * @return boolean|null True if the data was successfully cached, false on failure |
|
453 | 453 | * @access public |
454 | 454 | */ |
455 | 455 | public function write($key, $value, $duration = null) |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | * Delete a key from the cache |
474 | 474 | * |
475 | 475 | * @param string $key Identifier for the data |
476 | - * @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed |
|
476 | + * @return boolean|null True if the value was successfully deleted, false if it didn't exist or couldn't be removed |
|
477 | 477 | * @access public |
478 | 478 | */ |
479 | 479 | public function delete($key) |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | * Delete all keys from the cache |
485 | 485 | * |
486 | 486 | * @param boolean $check if true will check expiration, otherwise delete all |
487 | - * @return boolean True if the cache was successfully cleared, false otherwise |
|
487 | + * @return boolean|null True if the cache was successfully cleared, false otherwise |
|
488 | 488 | * @access public |
489 | 489 | */ |
490 | 490 | public function clear($check) |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | /** |
495 | 495 | * Cache Engine settings |
496 | 496 | * |
497 | - * @return array settings |
|
497 | + * @return integer settings |
|
498 | 498 | * @access public |
499 | 499 | */ |
500 | 500 | public function settings() |
@@ -20,28 +20,62 @@ |
||
20 | 20 | function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); } |
21 | 21 | function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); } |
22 | 22 | function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); } |
23 | + |
|
24 | + /** |
|
25 | + * @param string|boolean $enc |
|
26 | + */ |
|
23 | 27 | function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); } |
24 | 28 | function mb_language($lang = null) { return p\Mbstring::mb_language($lang); } |
25 | 29 | function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } |
26 | 30 | function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } |
31 | + |
|
32 | + /** |
|
33 | + * @param string $var |
|
34 | + * @param string $encoding |
|
35 | + */ |
|
27 | 36 | function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); } |
28 | 37 | function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); } |
29 | 38 | function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); } |
30 | 39 | function mb_parse_str($s, &$result = array()) { parse_str($s, $result); } |
31 | 40 | function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); } |
41 | + |
|
42 | + /** |
|
43 | + * @param string $s |
|
44 | + * @param string $needle |
|
45 | + * @param string $enc |
|
46 | + */ |
|
32 | 47 | function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); } |
48 | + |
|
49 | + /** |
|
50 | + * @param string $s |
|
51 | + * @param string $enc |
|
52 | + */ |
|
33 | 53 | function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); } |
34 | 54 | function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); } |
35 | 55 | function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); } |
36 | 56 | function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); } |
57 | + |
|
58 | + /** |
|
59 | + * @param string $enc |
|
60 | + */ |
|
37 | 61 | function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); } |
38 | 62 | function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); } |
39 | 63 | function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); } |
40 | 64 | function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); } |
41 | 65 | function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); } |
66 | + |
|
67 | + /** |
|
68 | + * @param string $s |
|
69 | + * @param string $needle |
|
70 | + * @param string $enc |
|
71 | + */ |
|
42 | 72 | function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); } |
43 | 73 | function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); } |
44 | 74 | function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } |
75 | + |
|
76 | + /** |
|
77 | + * @param string $enc |
|
78 | + */ |
|
45 | 79 | function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); } |
46 | 80 | function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); } |
47 | 81 | function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); } |
@@ -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')) { |
@@ -648,7 +648,7 @@ discard block |
||
648 | 648 | * |
649 | 649 | * @param string $table table |
650 | 650 | * @param array $columns array of 'column'=>'value' entries |
651 | - * @param string|CriteriaElement $criteria string where clause or object criteria |
|
651 | + * @param \Criteria $criteria string where clause or object criteria |
|
652 | 652 | * @param boolean $quoteValue true to quote values, false if caller handles quoting |
653 | 653 | * |
654 | 654 | * @return boolean true if no errors, false if errors encountered |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | * @param string $table table |
711 | 711 | * @param bool $prefixed true to return with table name prefixed |
712 | 712 | * |
713 | - * @return string|false string SQL to create table, or false if errors encountered |
|
713 | + * @return string|boolean string SQL to create table, or false if errors encountered |
|
714 | 714 | */ |
715 | 715 | protected function renderTableCreate($table, $prefixed = false) |
716 | 716 | { |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | * @param string $sql SQL statement to execute |
748 | 748 | * @param bool $force true to use force updates even in safe requests |
749 | 749 | * |
750 | - * @return mixed result resource if no error, |
|
750 | + * @return resource result resource if no error, |
|
751 | 751 | * true if no error but no result |
752 | 752 | * false if error encountered. |
753 | 753 | * Any error message is in $this->lastError; |
@@ -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 | */ |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | * Replace XoopsCodes with their equivalent HTML formatting |
396 | 396 | * |
397 | 397 | * @param string $text |
398 | - * @param bool|int $allowimage Allow images in the text? |
|
398 | + * @param integer $allowimage Allow images in the text? |
|
399 | 399 | * On FALSE, uses links to images. |
400 | 400 | * @return string |
401 | 401 | */ |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | * A quick solution for filtering XSS scripts |
482 | 482 | * |
483 | 483 | * @TODO : To be improved |
484 | - * @param $text |
|
484 | + * @param string $text |
|
485 | 485 | * @return mixed |
486 | 486 | */ |
487 | 487 | public function filterXss($text) |
@@ -577,11 +577,11 @@ discard block |
||
577 | 577 | * Filters textarea form data in DB for display |
578 | 578 | * |
579 | 579 | * @param string $text |
580 | - * @param bool|int $html allow html? |
|
581 | - * @param bool|int $smiley allow smileys? |
|
582 | - * @param bool|int $xcode allow xoopscode? |
|
583 | - * @param bool|int $image allow inline images? |
|
584 | - * @param bool|int $br convert linebreaks? |
|
580 | + * @param integer $html allow html? |
|
581 | + * @param integer $smiley allow smileys? |
|
582 | + * @param integer $xcode allow xoopscode? |
|
583 | + * @param integer $image allow inline images? |
|
584 | + * @param integer $br convert linebreaks? |
|
585 | 585 | * @return string |
586 | 586 | */ |
587 | 587 | public function &displayTarea($text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1) |
@@ -625,11 +625,11 @@ discard block |
||
625 | 625 | * Filters textarea form data submitted for preview |
626 | 626 | * |
627 | 627 | * @param string $text |
628 | - * @param bool|int $html allow html? |
|
629 | - * @param bool|int $smiley allow smileys? |
|
630 | - * @param bool|int $xcode allow xoopscode? |
|
631 | - * @param bool|int $image allow inline images? |
|
632 | - * @param bool|int $br convert linebreaks? |
|
628 | + * @param integer $html allow html? |
|
629 | + * @param integer $smiley allow smileys? |
|
630 | + * @param integer $xcode allow xoopscode? |
|
631 | + * @param integer $image allow inline images? |
|
632 | + * @param integer $br convert linebreaks? |
|
633 | 633 | * @return string |
634 | 634 | */ |
635 | 635 | public function &previewTarea($text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1) |
@@ -661,7 +661,7 @@ discard block |
||
661 | 661 | * MyTextSanitizer::codePreConv() |
662 | 662 | * |
663 | 663 | * @param mixed $text |
664 | - * @param mixed $xcode |
|
664 | + * @param integer $xcode |
|
665 | 665 | * @return mixed |
666 | 666 | */ |
667 | 667 | public function codePreConv($text, $xcode = 1) |
@@ -697,8 +697,8 @@ discard block |
||
697 | 697 | * MyTextSanitizer::codeConv() |
698 | 698 | * |
699 | 699 | * @param mixed $text |
700 | - * @param mixed $xcode |
|
701 | - * @return mixed |
|
700 | + * @param integer $xcode |
|
701 | + * @return string |
|
702 | 702 | */ |
703 | 703 | public function codeConv($text, $xcode = 1) |
704 | 704 | { |
@@ -714,7 +714,7 @@ discard block |
||
714 | 714 | /** |
715 | 715 | * MyTextSanitizer::executeExtensions() |
716 | 716 | * |
717 | - * @return bool |
|
717 | + * @return boolean|null |
|
718 | 718 | */ |
719 | 719 | public function executeExtensions() |
720 | 720 | { |
@@ -799,8 +799,8 @@ discard block |
||
799 | 799 | * MyTextSanitizer::codeSanitizer() |
800 | 800 | * |
801 | 801 | * @param mixed $str |
802 | - * @param mixed $image |
|
803 | - * @return mixed|string |
|
802 | + * @param integer $image |
|
803 | + * @return string |
|
804 | 804 | */ |
805 | 805 | public function codeSanitizer($str, $image = 1) |
806 | 806 | { |
@@ -817,8 +817,8 @@ discard block |
||
817 | 817 | * @param mixed $text |
818 | 818 | * @param integer $allowhtml |
819 | 819 | * @param integer $smiley |
820 | - * @param mixed $bbcode |
|
821 | - * @return mixed|string |
|
820 | + * @param integer $bbcode |
|
821 | + * @return string |
|
822 | 822 | */ |
823 | 823 | public function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) |
824 | 824 | { |
@@ -848,8 +848,8 @@ discard block |
||
848 | 848 | * @param mixed $text |
849 | 849 | * @param integer $allowhtml |
850 | 850 | * @param integer $smiley |
851 | - * @param mixed $bbcode |
|
852 | - * @return mixed|string |
|
851 | + * @param integer $bbcode |
|
852 | + * @return string |
|
853 | 853 | */ |
854 | 854 | public function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) |
855 | 855 | { |
@@ -892,8 +892,8 @@ discard block |
||
892 | 892 | * MyTextSanitizer::makeTboxData4Show() |
893 | 893 | * |
894 | 894 | * @param mixed $text |
895 | - * @param mixed $smiley |
|
896 | - * @return mixed|string |
|
895 | + * @param integer $smiley |
|
896 | + * @return string |
|
897 | 897 | */ |
898 | 898 | public function makeTboxData4Show($text, $smiley = 0) |
899 | 899 | { |
@@ -920,8 +920,8 @@ discard block |
||
920 | 920 | * MyTextSanitizer::makeTboxData4Preview() |
921 | 921 | * |
922 | 922 | * @param mixed $text |
923 | - * @param mixed $smiley |
|
924 | - * @return mixed|string |
|
923 | + * @param integer $smiley |
|
924 | + * @return string |
|
925 | 925 | */ |
926 | 926 | public function makeTboxData4Preview($text, $smiley = 0) |
927 | 927 | { |
@@ -965,8 +965,8 @@ discard block |
||
965 | 965 | * @param mixed $text |
966 | 966 | * @param integer $html |
967 | 967 | * @param integer $smiley |
968 | - * @param mixed $xcode |
|
969 | - * @return mixed|string |
|
968 | + * @param integer $xcode |
|
969 | + * @return string |
|
970 | 970 | */ |
971 | 971 | public function &makeTareaData4Show(&$text, $html = 1, $smiley = 1, $xcode = 1) |
972 | 972 | { |
@@ -995,8 +995,8 @@ discard block |
||
995 | 995 | * @param mixed $text |
996 | 996 | * @param integer $html |
997 | 997 | * @param integer $smiley |
998 | - * @param mixed $xcode |
|
999 | - * @return mixed|string |
|
998 | + * @param integer $xcode |
|
999 | + * @return string |
|
1000 | 1000 | */ |
1001 | 1001 | public function &makeTareaData4Preview(&$text, $html = 1, $smiley = 1, $xcode = 1) |
1002 | 1002 | { |
@@ -212,7 +212,7 @@ |
||
212 | 212 | /** |
213 | 213 | * Constructor |
214 | 214 | * @param $caption |
215 | - * @param $name |
|
215 | + * @param string $name |
|
216 | 216 | * @param $groupId |
217 | 217 | * @param null $values |
218 | 218 | */ |