@@ -23,7 +23,7 @@ |
||
23 | 23 | * @param string $string |
24 | 24 | * @param HTMLPurifier_Config $config |
25 | 25 | * @param HTMLPurifier_Context $context |
26 | - * @return bool|string |
|
26 | + * @return string|false |
|
27 | 27 | */ |
28 | 28 | public function validate($string, $config, $context) |
29 | 29 | { |
@@ -13,7 +13,7 @@ |
||
13 | 13 | * @param string $aIP |
14 | 14 | * @param HTMLPurifier_Config $config |
15 | 15 | * @param HTMLPurifier_Context $context |
16 | - * @return bool|string |
|
16 | + * @return false|string |
|
17 | 17 | */ |
18 | 18 | public function validate($aIP, $config, $context) |
19 | 19 | { |
@@ -80,7 +80,7 @@ |
||
80 | 80 | /** |
81 | 81 | * Check imptotal |
82 | 82 | * |
83 | - * @return bool |
|
83 | + * @return boolean|null |
|
84 | 84 | */ |
85 | 85 | public function check_imptotal() |
86 | 86 | { |
@@ -80,7 +80,7 @@ |
||
80 | 80 | /** |
81 | 81 | * Check imptotal |
82 | 82 | * |
83 | - * @return bool |
|
83 | + * @return boolean|null |
|
84 | 84 | */ |
85 | 85 | public function check_imptotal() |
86 | 86 | { |
@@ -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) |
@@ -622,11 +622,11 @@ discard block |
||
622 | 622 | * Filters textarea form data submitted for preview |
623 | 623 | * |
624 | 624 | * @param string $text |
625 | - * @param bool|int $html allow html? |
|
626 | - * @param bool|int $smiley allow smileys? |
|
627 | - * @param bool|int $xcode allow xoopscode? |
|
628 | - * @param bool|int $image allow inline images? |
|
629 | - * @param bool|int $br convert linebreaks? |
|
625 | + * @param integer $html allow html? |
|
626 | + * @param integer $smiley allow smileys? |
|
627 | + * @param integer $xcode allow xoopscode? |
|
628 | + * @param integer $image allow inline images? |
|
629 | + * @param integer $br convert linebreaks? |
|
630 | 630 | * @return string |
631 | 631 | */ |
632 | 632 | public function &previewTarea($text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1) |
@@ -657,8 +657,8 @@ discard block |
||
657 | 657 | /** |
658 | 658 | * MyTextSanitizer::codePreConv() |
659 | 659 | * |
660 | - * @param mixed $text |
|
661 | - * @param mixed $xcode |
|
660 | + * @param string $text |
|
661 | + * @param integer $xcode |
|
662 | 662 | * @return mixed |
663 | 663 | */ |
664 | 664 | public function codePreConv($text, $xcode = 1) |
@@ -694,8 +694,8 @@ discard block |
||
694 | 694 | * MyTextSanitizer::codeConv() |
695 | 695 | * |
696 | 696 | * @param mixed $text |
697 | - * @param mixed $xcode |
|
698 | - * @return mixed |
|
697 | + * @param integer $xcode |
|
698 | + * @return string |
|
699 | 699 | */ |
700 | 700 | public function codeConv($text, $xcode = 1) |
701 | 701 | { |
@@ -711,7 +711,7 @@ discard block |
||
711 | 711 | /** |
712 | 712 | * MyTextSanitizer::executeExtensions() |
713 | 713 | * |
714 | - * @return bool |
|
714 | + * @return boolean|null |
|
715 | 715 | */ |
716 | 716 | public function executeExtensions() |
717 | 717 | { |
@@ -795,8 +795,8 @@ discard block |
||
795 | 795 | * MyTextSanitizer::codeSanitizer() |
796 | 796 | * |
797 | 797 | * @param mixed $str |
798 | - * @param mixed $image |
|
799 | - * @return mixed|string |
|
798 | + * @param integer $image |
|
799 | + * @return string |
|
800 | 800 | */ |
801 | 801 | public function codeSanitizer($str, $image = 1) |
802 | 802 | { |
@@ -813,8 +813,8 @@ discard block |
||
813 | 813 | * @param mixed $text |
814 | 814 | * @param integer $allowhtml |
815 | 815 | * @param integer $smiley |
816 | - * @param mixed $bbcode |
|
817 | - * @return mixed|string |
|
816 | + * @param integer $bbcode |
|
817 | + * @return string |
|
818 | 818 | */ |
819 | 819 | public function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) |
820 | 820 | { |
@@ -844,8 +844,8 @@ discard block |
||
844 | 844 | * @param mixed $text |
845 | 845 | * @param integer $allowhtml |
846 | 846 | * @param integer $smiley |
847 | - * @param mixed $bbcode |
|
848 | - * @return mixed|string |
|
847 | + * @param integer $bbcode |
|
848 | + * @return string |
|
849 | 849 | */ |
850 | 850 | public function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) |
851 | 851 | { |
@@ -888,8 +888,8 @@ discard block |
||
888 | 888 | * MyTextSanitizer::makeTboxData4Show() |
889 | 889 | * |
890 | 890 | * @param mixed $text |
891 | - * @param mixed $smiley |
|
892 | - * @return mixed|string |
|
891 | + * @param integer $smiley |
|
892 | + * @return string |
|
893 | 893 | */ |
894 | 894 | public function makeTboxData4Show($text, $smiley = 0) |
895 | 895 | { |
@@ -916,8 +916,8 @@ discard block |
||
916 | 916 | * MyTextSanitizer::makeTboxData4Preview() |
917 | 917 | * |
918 | 918 | * @param mixed $text |
919 | - * @param mixed $smiley |
|
920 | - * @return mixed|string |
|
919 | + * @param integer $smiley |
|
920 | + * @return string |
|
921 | 921 | */ |
922 | 922 | public function makeTboxData4Preview($text, $smiley = 0) |
923 | 923 | { |
@@ -961,8 +961,8 @@ discard block |
||
961 | 961 | * @param mixed $text |
962 | 962 | * @param integer $html |
963 | 963 | * @param integer $smiley |
964 | - * @param mixed $xcode |
|
965 | - * @return mixed|string |
|
964 | + * @param integer $xcode |
|
965 | + * @return string |
|
966 | 966 | */ |
967 | 967 | public function &makeTareaData4Show(&$text, $html = 1, $smiley = 1, $xcode = 1) |
968 | 968 | { |
@@ -991,8 +991,8 @@ discard block |
||
991 | 991 | * @param mixed $text |
992 | 992 | * @param integer $html |
993 | 993 | * @param integer $smiley |
994 | - * @param mixed $xcode |
|
995 | - * @return mixed|string |
|
994 | + * @param integer $xcode |
|
995 | + * @return string |
|
996 | 996 | */ |
997 | 997 | public function &makeTareaData4Preview(&$text, $html = 1, $smiley = 1, $xcode = 1) |
998 | 998 | { |
@@ -252,7 +252,7 @@ |
||
252 | 252 | /** |
253 | 253 | * @param string $css_file |
254 | 254 | * |
255 | - * @return array |
|
255 | + * @return string[] |
|
256 | 256 | */ |
257 | 257 | public function loadCss($css_file = 'style.css') |
258 | 258 | { |
@@ -97,7 +97,7 @@ |
||
97 | 97 | * Get Object |
98 | 98 | * |
99 | 99 | * @param int $id |
100 | - * @return object |
|
100 | + * @return null|XoopsRank |
|
101 | 101 | */ |
102 | 102 | public function get($id = 0) |
103 | 103 | { |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | * @param string $sourceName template file name |
110 | 110 | * @param string $fileName configuration file name |
111 | 111 | * |
112 | - * @return true|string true on success, error message on failure |
|
112 | + * @return string|boolean true on success, error message on failure |
|
113 | 113 | */ |
114 | 114 | function writeConfigurationFile($vars, $path, $sourceName, $fileName) |
115 | 115 | { |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | * |
153 | 153 | * @param string $filename file or directory name |
154 | 154 | * |
155 | - * @return array|false false on error, or array of file stat information |
|
155 | + * @return string false on error, or array of file stat information |
|
156 | 156 | */ |
157 | 157 | function getStats($filename) |
158 | 158 | { |
@@ -795,6 +795,9 @@ discard block |
||
795 | 795 | |
796 | 796 | // from getid3.lib.php |
797 | 797 | |
798 | + /** |
|
799 | + * @param double $floatnumber |
|
800 | + */ |
|
798 | 801 | function trunc($floatnumber) { |
799 | 802 | // truncates a floating-point number at the decimal point |
800 | 803 | // returns int (if possible, otherwise float) |
@@ -811,6 +814,9 @@ discard block |
||
811 | 814 | return $truncatednumber; |
812 | 815 | } |
813 | 816 | |
817 | + /** |
|
818 | + * @param string $byteword |
|
819 | + */ |
|
814 | 820 | function LittleEndian2Int($byteword) { |
815 | 821 | $intvalue = 0; |
816 | 822 | $byteword = strrev($byteword); |
@@ -834,11 +840,17 @@ discard block |
||
834 | 840 | return $binvalue; |
835 | 841 | } |
836 | 842 | |
843 | + /** |
|
844 | + * @param string $rawdata |
|
845 | + */ |
|
837 | 846 | function FixedPoint2_30($rawdata) { |
838 | 847 | $binarystring = $this->BigEndian2Bin($rawdata); |
839 | 848 | return $this->Bin2Dec(substr($binarystring, 0, 2)) + (float) ($this->Bin2Dec(substr($binarystring, 2, 30)) / 1073741824); |
840 | 849 | } |
841 | 850 | |
851 | + /** |
|
852 | + * @param string $binstring |
|
853 | + */ |
|
842 | 854 | function Bin2Dec($binstring, $signed=false) { |
843 | 855 | $signmult = 1; |
844 | 856 | if ($signed) { |