@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | /** |
| 224 | 224 | * Access the only instance of this class |
| 225 | 225 | * |
| 226 | - * @return object |
|
| 226 | + * @return MyTextSanitizer |
|
| 227 | 227 | * @static |
| 228 | 228 | * @staticvar object |
| 229 | 229 | */ |
@@ -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) |
@@ -623,11 +623,11 @@ discard block |
||
| 623 | 623 | * Filters textarea form data submitted for preview |
| 624 | 624 | * |
| 625 | 625 | * @param string $text |
| 626 | - * @param bool|int $html allow html? |
|
| 627 | - * @param bool|int $smiley allow smileys? |
|
| 628 | - * @param bool|int $xcode allow xoopscode? |
|
| 629 | - * @param bool|int $image allow inline images? |
|
| 630 | - * @param bool|int $br convert linebreaks? |
|
| 626 | + * @param integer $html allow html? |
|
| 627 | + * @param integer $smiley allow smileys? |
|
| 628 | + * @param integer $xcode allow xoopscode? |
|
| 629 | + * @param integer $image allow inline images? |
|
| 630 | + * @param integer $br convert linebreaks? |
|
| 631 | 631 | * @return string |
| 632 | 632 | */ |
| 633 | 633 | public function &previewTarea($text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1) |
@@ -658,8 +658,8 @@ discard block |
||
| 658 | 658 | /** |
| 659 | 659 | * MyTextSanitizer::codePreConv() |
| 660 | 660 | * |
| 661 | - * @param mixed $text |
|
| 662 | - * @param mixed $xcode |
|
| 661 | + * @param string $text |
|
| 662 | + * @param integer $xcode |
|
| 663 | 663 | * @return mixed |
| 664 | 664 | */ |
| 665 | 665 | public function codePreConv($text, $xcode = 1) |
@@ -695,8 +695,8 @@ discard block |
||
| 695 | 695 | * MyTextSanitizer::codeConv() |
| 696 | 696 | * |
| 697 | 697 | * @param mixed $text |
| 698 | - * @param mixed $xcode |
|
| 699 | - * @return mixed |
|
| 698 | + * @param integer $xcode |
|
| 699 | + * @return string |
|
| 700 | 700 | */ |
| 701 | 701 | public function codeConv($text, $xcode = 1) |
| 702 | 702 | { |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | /** |
| 713 | 713 | * MyTextSanitizer::executeExtensions() |
| 714 | 714 | * |
| 715 | - * @return bool |
|
| 715 | + * @return boolean|null |
|
| 716 | 716 | */ |
| 717 | 717 | public function executeExtensions() |
| 718 | 718 | { |
@@ -796,8 +796,8 @@ discard block |
||
| 796 | 796 | * MyTextSanitizer::codeSanitizer() |
| 797 | 797 | * |
| 798 | 798 | * @param mixed $str |
| 799 | - * @param mixed $image |
|
| 800 | - * @return mixed|string |
|
| 799 | + * @param integer $image |
|
| 800 | + * @return string |
|
| 801 | 801 | */ |
| 802 | 802 | public function codeSanitizer($str, $image = 1) |
| 803 | 803 | { |
@@ -814,8 +814,8 @@ discard block |
||
| 814 | 814 | * @param mixed $text |
| 815 | 815 | * @param integer $allowhtml |
| 816 | 816 | * @param integer $smiley |
| 817 | - * @param mixed $bbcode |
|
| 818 | - * @return mixed|string |
|
| 817 | + * @param integer $bbcode |
|
| 818 | + * @return string |
|
| 819 | 819 | */ |
| 820 | 820 | public function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) |
| 821 | 821 | { |
@@ -845,8 +845,8 @@ discard block |
||
| 845 | 845 | * @param mixed $text |
| 846 | 846 | * @param integer $allowhtml |
| 847 | 847 | * @param integer $smiley |
| 848 | - * @param mixed $bbcode |
|
| 849 | - * @return mixed|string |
|
| 848 | + * @param integer $bbcode |
|
| 849 | + * @return string |
|
| 850 | 850 | */ |
| 851 | 851 | public function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) |
| 852 | 852 | { |
@@ -889,8 +889,8 @@ discard block |
||
| 889 | 889 | * MyTextSanitizer::makeTboxData4Show() |
| 890 | 890 | * |
| 891 | 891 | * @param mixed $text |
| 892 | - * @param mixed $smiley |
|
| 893 | - * @return mixed|string |
|
| 892 | + * @param integer $smiley |
|
| 893 | + * @return string |
|
| 894 | 894 | */ |
| 895 | 895 | public function makeTboxData4Show($text, $smiley = 0) |
| 896 | 896 | { |
@@ -917,8 +917,8 @@ discard block |
||
| 917 | 917 | * MyTextSanitizer::makeTboxData4Preview() |
| 918 | 918 | * |
| 919 | 919 | * @param mixed $text |
| 920 | - * @param mixed $smiley |
|
| 921 | - * @return mixed|string |
|
| 920 | + * @param integer $smiley |
|
| 921 | + * @return string |
|
| 922 | 922 | */ |
| 923 | 923 | public function makeTboxData4Preview($text, $smiley = 0) |
| 924 | 924 | { |
@@ -962,8 +962,8 @@ discard block |
||
| 962 | 962 | * @param mixed $text |
| 963 | 963 | * @param integer $html |
| 964 | 964 | * @param integer $smiley |
| 965 | - * @param mixed $xcode |
|
| 966 | - * @return mixed|string |
|
| 965 | + * @param integer $xcode |
|
| 966 | + * @return string |
|
| 967 | 967 | */ |
| 968 | 968 | public function &makeTareaData4Show(&$text, $html = 1, $smiley = 1, $xcode = 1) |
| 969 | 969 | { |
@@ -992,8 +992,8 @@ discard block |
||
| 992 | 992 | * @param mixed $text |
| 993 | 993 | * @param integer $html |
| 994 | 994 | * @param integer $smiley |
| 995 | - * @param mixed $xcode |
|
| 996 | - * @return mixed|string |
|
| 995 | + * @param integer $xcode |
|
| 996 | + * @return string |
|
| 997 | 997 | */ |
| 998 | 998 | public function &makeTareaData4Preview(&$text, $html = 1, $smiley = 1, $xcode = 1) |
| 999 | 999 | { |
@@ -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 | { |
@@ -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) { |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * @param string $sourceName template file name |
| 111 | 111 | * @param string $fileName configuration file name |
| 112 | 112 | * |
| 113 | - * @return true|string true on success, error message on failure |
|
| 113 | + * @return string|boolean true on success, error message on failure |
|
| 114 | 114 | */ |
| 115 | 115 | function writeConfigurationFile($vars, $path, $sourceName, $fileName) |
| 116 | 116 | { |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | * |
| 154 | 154 | * @param string $filename file or directory name |
| 155 | 155 | * |
| 156 | - * @return array|false false on error, or array of file stat information |
|
| 156 | + * @return string false on error, or array of file stat information |
|
| 157 | 157 | */ |
| 158 | 158 | function getStats($filename) |
| 159 | 159 | { |
@@ -698,6 +698,9 @@ discard block |
||
| 698 | 698 | Output: |
| 699 | 699 | \*======================================================================*/ |
| 700 | 700 | |
| 701 | + /** |
|
| 702 | + * @param string $http_method |
|
| 703 | + */ |
|
| 701 | 704 | function _httprequest($url, $fp, $URI, $http_method, $content_type = "", $body = "") |
| 702 | 705 | { |
| 703 | 706 | $cookie_headers = ''; |
@@ -873,6 +876,9 @@ discard block |
||
| 873 | 876 | Output: |
| 874 | 877 | \*======================================================================*/ |
| 875 | 878 | |
| 879 | + /** |
|
| 880 | + * @param string $http_method |
|
| 881 | + */ |
|
| 876 | 882 | function _httpsrequest($url, $URI, $http_method, $content_type = "", $body = "") |
| 877 | 883 | { |
| 878 | 884 | if ($this->passcookies && $this->_redirectaddr) |
@@ -1106,6 +1112,10 @@ discard block |
||
| 1106 | 1112 | Output: post body |
| 1107 | 1113 | \*======================================================================*/ |
| 1108 | 1114 | |
| 1115 | + /** |
|
| 1116 | + * @param string $formvars |
|
| 1117 | + * @param string $formfiles |
|
| 1118 | + */ |
|
| 1109 | 1119 | function _prepare_post_body($formvars, $formfiles) |
| 1110 | 1120 | { |
| 1111 | 1121 | settype($formvars, "array"); |
@@ -39,7 +39,6 @@ |
||
| 39 | 39 | /** |
| 40 | 40 | * Parses a numeric or string representation of a corrdinate into a structure |
| 41 | 41 | * |
| 42 | - * @param string $coord Smart coordinate |
|
| 43 | 42 | * @return array Parsed smart coordinate |
| 44 | 43 | */ |
| 45 | 44 | public static function parse($c) |
@@ -34,6 +34,12 @@ |
||
| 34 | 34 | public $color; |
| 35 | 35 | public $handle; |
| 36 | 36 | |
| 37 | + /** |
|
| 38 | + * @param string $file |
|
| 39 | + * @param integer $size |
|
| 40 | + * @param integer $color |
|
| 41 | + * @param integer $bgcolor |
|
| 42 | + */ |
|
| 37 | 43 | public function __construct($file, $size, $color, $bgcolor = null) |
| 38 | 44 | { |
| 39 | 45 | $this->handle = imagepsloadfont($file); |
@@ -36,6 +36,11 @@ |
||
| 36 | 36 | public $size; |
| 37 | 37 | public $color; |
| 38 | 38 | |
| 39 | + /** |
|
| 40 | + * @param string $face |
|
| 41 | + * @param integer $size |
|
| 42 | + * @param integer $color |
|
| 43 | + */ |
|
| 39 | 44 | public function __construct($face, $size, $color) |
| 40 | 45 | { |
| 41 | 46 | $this->face = $face; |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | /** |
| 186 | 186 | * Output a header to browser. |
| 187 | 187 | * |
| 188 | - * @param $name Name of the header |
|
| 188 | + * @param string $name Name of the header |
|
| 189 | 189 | * @param $data Data |
| 190 | 190 | */ |
| 191 | 191 | protected function writeHeader($name, $data) |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | * Copies transparency information from $sourceImage. Optionally fills |
| 395 | 395 | * the image with the transparent color at (0, 0). |
| 396 | 396 | * |
| 397 | - * @param object $sourceImage |
|
| 397 | + * @param Image $sourceImage |
|
| 398 | 398 | * @param bool $fill True if you want to fill the image with transparent color |
| 399 | 399 | */ |
| 400 | 400 | public function copyTransparencyFrom($sourceImage, $fill = true) |
@@ -488,8 +488,8 @@ discard block |
||
| 488 | 488 | * $smaller = $image->resizeDown(100, 100, 'inside'); |
| 489 | 489 | * </code> |
| 490 | 490 | * |
| 491 | - * @param mixed $width The new width (smart coordinate), or null. |
|
| 492 | - * @param mixed $height The new height (smart coordinate), or null. |
|
| 491 | + * @param integer|null $width The new width (smart coordinate), or null. |
|
| 492 | + * @param integer|null $height The new height (smart coordinate), or null. |
|
| 493 | 493 | * @param string $fit 'inside', 'outside', 'fill' |
| 494 | 494 | * @param string $scale 'down', 'up', 'any' |
| 495 | 495 | * @return \WideImage\Image The resized image |
@@ -556,8 +556,8 @@ discard block |
||
| 556 | 556 | * </code> |
| 557 | 557 | * |
| 558 | 558 | * @param \WideImage\Image $overlay The overlay image |
| 559 | - * @param mixed $left Left position of the overlay, smart coordinate |
|
| 560 | - * @param mixed $top Top position of the overlay, smart coordinate |
|
| 559 | + * @param integer $left Left position of the overlay, smart coordinate |
|
| 560 | + * @param integer $top Top position of the overlay, smart coordinate |
|
| 561 | 561 | * @param int $pct The opacity of the overlay |
| 562 | 562 | * @return \WideImage\Image The merged image |
| 563 | 563 | */ |
@@ -652,8 +652,8 @@ discard block |
||
| 652 | 652 | * and white is fully opaque. |
| 653 | 653 | * |
| 654 | 654 | * @param \WideImage\Image $mask The mask image, greyscale |
| 655 | - * @param mixed $left Left coordinate, smart coordinate |
|
| 656 | - * @param mixed $top Top coordinate, smart coordinate |
|
| 655 | + * @param integer $left Left coordinate, smart coordinate |
|
| 656 | + * @param integer $top Top coordinate, smart coordinate |
|
| 657 | 657 | * @return \WideImage\Image The resulting image |
| 658 | 658 | **/ |
| 659 | 659 | public function applyMask($mask, $left = 0, $top = 0) |
@@ -708,10 +708,10 @@ discard block |
||
| 708 | 708 | * $cropped = $img->crop("center", "middle", 50, 30); // crops a 50x30 from the center of the image |
| 709 | 709 | * </code> |
| 710 | 710 | * |
| 711 | - * @param mixed $left Left-coordinate of the crop rect, smart coordinate |
|
| 712 | - * @param mixed $top Top-coordinate of the crop rect, smart coordinate |
|
| 713 | - * @param mixed $width Width of the crop rect, smart coordinate |
|
| 714 | - * @param mixed $height Height of the crop rect, smart coordinate |
|
| 711 | + * @param integer $left Left-coordinate of the crop rect, smart coordinate |
|
| 712 | + * @param integer $top Top-coordinate of the crop rect, smart coordinate |
|
| 713 | + * @param double $width Width of the crop rect, smart coordinate |
|
| 714 | + * @param double $height Height of the crop rect, smart coordinate |
|
| 715 | 715 | * @return \WideImage\Image The cropped image |
| 716 | 716 | **/ |
| 717 | 717 | public function crop($left = 0, $top = 0, $width = '100%', $height = '100%') |
@@ -956,7 +956,7 @@ discard block |
||
| 956 | 956 | /** |
| 957 | 957 | * Returns an array of serializable protected variables. Called automatically upon serialize(). |
| 958 | 958 | * |
| 959 | - * @return array |
|
| 959 | + * @return string[] |
|
| 960 | 960 | */ |
| 961 | 961 | public function __sleep() |
| 962 | 962 | { |