@@ -35,6 +35,9 @@ |
||
35 | 35 | { |
36 | 36 | protected static $cache = array(); |
37 | 37 | |
38 | + /** |
|
39 | + * @param string $operationName |
|
40 | + */ |
|
38 | 41 | public static function get($operationName) |
39 | 42 | { |
40 | 43 | $lcname = strtolower($operationName); |
@@ -355,7 +355,7 @@ |
||
355 | 355 | /** |
356 | 356 | * Throws exception if the handle isn't a valid GD resource |
357 | 357 | * |
358 | - * @param mixed $handle The variable to check |
|
358 | + * @param resource $handle The variable to check |
|
359 | 359 | */ |
360 | 360 | public static function assertValidImageHandle($handle) |
361 | 361 | { |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | //static $configs; |
28 | 28 | |
29 | 29 | /** |
30 | - * @param $name |
|
30 | + * @param string $name |
|
31 | 31 | * @param string $type |
32 | 32 | * |
33 | 33 | * @return bool |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | * Load core class |
92 | 92 | * |
93 | 93 | * @access private |
94 | - * @param $name |
|
94 | + * @param string $name |
|
95 | 95 | * @return bool|string |
96 | 96 | */ |
97 | 97 | public static function loadCore($name) |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | * Load Framework class |
126 | 126 | * |
127 | 127 | * @access private |
128 | - * @param $name |
|
128 | + * @param string $name |
|
129 | 129 | * @return bool|string |
130 | 130 | */ |
131 | 131 | public static function loadFramework($name) |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | /** |
21 | 21 | * xoops_getHandler() |
22 | 22 | * |
23 | - * @param mixed $name |
|
23 | + * @param string $name |
|
24 | 24 | * @param mixed $optional |
25 | 25 | * |
26 | 26 | * @return bool |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | /** |
54 | 54 | * xoops_getModuleHandler() |
55 | 55 | * |
56 | - * @param mixed $name |
|
56 | + * @param string $name |
|
57 | 57 | * @param mixed $module_dir |
58 | 58 | * @param mixed $optional |
59 | 59 | * @return bool |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | /** |
280 | 280 | * xoops_error |
281 | 281 | * |
282 | - * @param mixed $msg |
|
282 | + * @param string $msg |
|
283 | 283 | * @param string $title |
284 | 284 | * @return void |
285 | 285 | */ |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | * |
374 | 374 | * @param mixed $time |
375 | 375 | * @param string $timeoffset |
376 | - * @return int |
|
376 | + * @return double |
|
377 | 377 | */ |
378 | 378 | function xoops_getUserTimestamp($time, $timeoffset = '') |
379 | 379 | { |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | * formatURL() |
570 | 570 | * |
571 | 571 | * @param mixed $url |
572 | - * @return mixed|string |
|
572 | + * @return string |
|
573 | 573 | */ |
574 | 574 | function formatURL($url) |
575 | 575 | { |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | |
651 | 651 | /** |
652 | 652 | * Function to redirect a user to certain pages |
653 | - * @param $url |
|
653 | + * @param string $url |
|
654 | 654 | * @param int $time |
655 | 655 | * @param string $message |
656 | 656 | * @param bool $addredirect |
@@ -734,7 +734,7 @@ discard block |
||
734 | 734 | /** |
735 | 735 | * xoops_getenv() |
736 | 736 | * |
737 | - * @param mixed $key |
|
737 | + * @param string $key |
|
738 | 738 | * @return string |
739 | 739 | */ |
740 | 740 | function xoops_getenv($key) |
@@ -821,7 +821,7 @@ discard block |
||
821 | 821 | * xoops_getrank() |
822 | 822 | * |
823 | 823 | * @param integer $rank_id |
824 | - * @param mixed $posts |
|
824 | + * @param integer $posts |
|
825 | 825 | * @return |
826 | 826 | */ |
827 | 827 | function xoops_getrank($rank_id = 0, $posts = 0) |
@@ -1024,7 +1024,7 @@ discard block |
||
1024 | 1024 | /** |
1025 | 1025 | * xoops_getOption() |
1026 | 1026 | * |
1027 | - * @param mixed $option |
|
1027 | + * @param string $option |
|
1028 | 1028 | * @internal param string $type |
1029 | 1029 | * @deprecated |
1030 | 1030 | * @return string |
@@ -1045,7 +1045,7 @@ discard block |
||
1045 | 1045 | /** |
1046 | 1046 | * xoops_getConfigOption() |
1047 | 1047 | * |
1048 | - * @param mixed $option |
|
1048 | + * @param string $option |
|
1049 | 1049 | * @param string $type |
1050 | 1050 | * @internal param string $dirname |
1051 | 1051 | * @deprecated |
@@ -1077,7 +1077,7 @@ discard block |
||
1077 | 1077 | /** |
1078 | 1078 | * xoops_setConfigOption() |
1079 | 1079 | * |
1080 | - * @param mixed $option |
|
1080 | + * @param string $option |
|
1081 | 1081 | * @param null $new |
1082 | 1082 | * @return void |
1083 | 1083 | @deprecated |
@@ -1097,7 +1097,7 @@ discard block |
||
1097 | 1097 | * |
1098 | 1098 | * Method for module developers getting a module config item. This could be from any module requested. |
1099 | 1099 | * |
1100 | - * @param mixed $option |
|
1100 | + * @param string $option |
|
1101 | 1101 | * @param string $dirname |
1102 | 1102 | * @return bool |
1103 | 1103 | @deprecated |
@@ -188,6 +188,9 @@ |
||
188 | 188 | 'Xmf\\Yaml' => __DIR__ . '/..' . '/xoops/xmf/src/Xmf/Yaml.php', |
189 | 189 | ); |
190 | 190 | |
191 | + /** |
|
192 | + * @return callable |
|
193 | + */ |
|
191 | 194 | public static function getInitializer(ClassLoader $loader) |
192 | 195 | { |
193 | 196 | return \Closure::bind(function () use ($loader) { |
@@ -18,6 +18,9 @@ discard block |
||
18 | 18 | var $phpThumbObject = null; |
19 | 19 | |
20 | 20 | |
21 | + /** |
|
22 | + * @param string $message |
|
23 | + */ |
|
21 | 24 | function DebugMessage($message, $file='', $line='') { |
22 | 25 | if (is_object($this->phpThumbObject)) { |
23 | 26 | return $this->phpThumbObject->DebugMessage($message, $file, $line); |
@@ -752,6 +755,9 @@ discard block |
||
752 | 755 | } |
753 | 756 | |
754 | 757 | |
758 | + /** |
|
759 | + * @param phpthumb $phpThumbObject |
|
760 | + */ |
|
755 | 761 | public static function ImprovedImageRotate(&$gdimg_source, $rotate_angle=0, $config_background_hexcolor='FFFFFF', $bg=null, &$phpThumbObject) { |
756 | 762 | while ($rotate_angle < 0) { |
757 | 763 | $rotate_angle += 360; |
@@ -1049,6 +1055,10 @@ discard block |
||
1049 | 1055 | } |
1050 | 1056 | |
1051 | 1057 | |
1058 | + /** |
|
1059 | + * @param boolean $dither |
|
1060 | + * @param integer $ncolors |
|
1061 | + */ |
|
1052 | 1062 | public function ImageTrueColorToPalette2(&$image, $dither, $ncolors) { |
1053 | 1063 | // http://www.php.net/manual/en/function.imagetruecolortopalette.php |
1054 | 1064 | // zmorris at zsculpt dot com (17-Aug-2004 06:58) |
@@ -23,6 +23,9 @@ discard block |
||
23 | 23 | } |
24 | 24 | |
25 | 25 | |
26 | + /** |
|
27 | + * @param string $functionname |
|
28 | + */ |
|
26 | 29 | static function builtin_function_exists($functionname) { |
27 | 30 | if (function_exists('get_defined_functions')) { |
28 | 31 | static $get_defined_functions = array(); |
@@ -35,6 +38,10 @@ discard block |
||
35 | 38 | } |
36 | 39 | |
37 | 40 | |
41 | + /** |
|
42 | + * @param string $version1 |
|
43 | + * @param string $version2 |
|
44 | + */ |
|
38 | 45 | static function version_compare_replacement_sub($version1, $version2, $operator='') { |
39 | 46 | // If you specify the third optional operator argument, you can test for a particular relationship. |
40 | 47 | // The possible operators are: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne respectively. |
@@ -95,6 +102,9 @@ discard block |
||
95 | 102 | } |
96 | 103 | |
97 | 104 | |
105 | + /** |
|
106 | + * @param string $version2 |
|
107 | + */ |
|
98 | 108 | static function version_compare_replacement($version1, $version2, $operator='') { |
99 | 109 | if (function_exists('version_compare')) { |
100 | 110 | // built into PHP v4.1.0+ |
@@ -212,6 +222,9 @@ discard block |
||
212 | 222 | return array($newwidth, $newheight); |
213 | 223 | } |
214 | 224 | |
225 | + /** |
|
226 | + * @param string $string |
|
227 | + */ |
|
215 | 228 | static function HexCharDisplay($string) { |
216 | 229 | $len = strlen($string); |
217 | 230 | $output = ''; |
@@ -292,6 +305,10 @@ discard block |
||
292 | 305 | } |
293 | 306 | |
294 | 307 | |
308 | + /** |
|
309 | + * @param integer $width |
|
310 | + * @param integer $height |
|
311 | + */ |
|
295 | 312 | static function ScaleToFitInBox($width, $height, $maxwidth=null, $maxheight=null, $allow_enlarge=true, $allow_reduce=true) { |
296 | 313 | $maxwidth = (is_null($maxwidth) ? $width : $maxwidth); |
297 | 314 | $maxheight = (is_null($maxheight) ? $height : $maxheight); |
@@ -380,6 +397,12 @@ discard block |
||
380 | 397 | } |
381 | 398 | |
382 | 399 | |
400 | + /** |
|
401 | + * @param integer $src_x |
|
402 | + * @param integer $src_y |
|
403 | + * @param integer $src_w |
|
404 | + * @param integer $src_h |
|
405 | + */ |
|
383 | 406 | static function ImageCopyRespectAlpha(&$dst_im, &$src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $opacity_pct=100) { |
384 | 407 | $opacipct = $opacity_pct / 100; |
385 | 408 | for ($x = $src_x; $x < $src_w; $x++) { |
@@ -404,6 +427,10 @@ discard block |
||
404 | 427 | } |
405 | 428 | |
406 | 429 | |
430 | + /** |
|
431 | + * @param integer $old_width |
|
432 | + * @param integer $old_height |
|
433 | + */ |
|
407 | 434 | static function ProportionalResize($old_width, $old_height, $new_width=false, $new_height=false) { |
408 | 435 | $old_aspect_ratio = $old_width / $old_height; |
409 | 436 | if (($new_width === false) && ($new_height === false)) { |
@@ -427,6 +454,9 @@ discard block |
||
427 | 454 | } |
428 | 455 | |
429 | 456 | |
457 | + /** |
|
458 | + * @param string $function |
|
459 | + */ |
|
430 | 460 | static function FunctionIsDisabled($function) { |
431 | 461 | static $DisabledFunctions = null; |
432 | 462 | if (is_null($DisabledFunctions)) { |
@@ -447,6 +477,11 @@ discard block |
||
447 | 477 | } |
448 | 478 | |
449 | 479 | |
480 | + /** |
|
481 | + * @param string $command |
|
482 | + * |
|
483 | + * @return string |
|
484 | + */ |
|
450 | 485 | static function SafeExec($command) { |
451 | 486 | static $AllowedExecFunctions = array(); |
452 | 487 | if (empty($AllowedExecFunctions)) { |
@@ -623,6 +658,10 @@ discard block |
||
623 | 658 | return false; |
624 | 659 | } |
625 | 660 | |
661 | + /** |
|
662 | + * @param string $needle |
|
663 | + * @param string[] $haystack |
|
664 | + */ |
|
626 | 665 | static function CaseInsensitiveInArray($needle, $haystack) { |
627 | 666 | $needle = strtolower($needle); |
628 | 667 | foreach ($haystack as $key => $value) { |
@@ -635,6 +674,9 @@ discard block |
||
635 | 674 | return false; |
636 | 675 | } |
637 | 676 | |
677 | + /** |
|
678 | + * @param string $file |
|
679 | + */ |
|
638 | 680 | static function URLreadFsock($host, $file, &$errstr, $successonly=true, $port=80, $timeout=10) { |
639 | 681 | if (!function_exists('fsockopen') || phpthumb_functions::FunctionIsDisabled('fsockopen')) { |
640 | 682 | $errstr = 'fsockopen() unavailable'; |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | * |
108 | 108 | * @param array $trace [OPTIONAL] you can pass your own trace, otherwise, `debug_backtrace` will be called |
109 | 109 | * |
110 | - * @return mixed |
|
110 | + * @return string|null |
|
111 | 111 | */ |
112 | 112 | public static function trace( $trace = null ) |
113 | 113 | { |
@@ -305,6 +305,9 @@ discard block |
||
305 | 305 | return $shortenedName; |
306 | 306 | } |
307 | 307 | |
308 | + /** |
|
309 | + * @return string |
|
310 | + */ |
|
308 | 311 | public static function getIdeLink( $file, $line ) |
309 | 312 | { |
310 | 313 | return str_replace( array( '%f', '%l' ), array( $file, $line ), self::$fileLinkFormat ); |
@@ -317,7 +320,7 @@ discard block |
||
317 | 320 | * @param int $lineNumber the line to display |
318 | 321 | * @param int $padding surrounding lines to show besides the main one |
319 | 322 | * |
320 | - * @return bool|string |
|
323 | + * @return false|string |
|
321 | 324 | */ |
322 | 325 | private static function _showSource( $file, $lineNumber, $padding = 7 ) |
323 | 326 | { |
@@ -590,7 +593,7 @@ discard block |
||
590 | 593 | * |
591 | 594 | * @param $step |
592 | 595 | * |
593 | - * @return array |
|
596 | + * @return boolean |
|
594 | 597 | */ |
595 | 598 | private static function _stepIsInternal( $step ) |
596 | 599 | { |
@@ -723,7 +723,7 @@ |
||
723 | 723 | * xos_opal_Theme::renderMetas() |
724 | 724 | * |
725 | 725 | * @param mixed $type |
726 | - * @param mixed $return |
|
726 | + * @param boolean $return |
|
727 | 727 | * @return bool|string |
728 | 728 | */ |
729 | 729 | public function renderMetas($type = null, $return = false) |