@@ -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'; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | /** |
90 | 90 | * @param HTMLPurifier_Config $config |
91 | - * @return bool |
|
91 | + * @return false|null |
|
92 | 92 | */ |
93 | 93 | public function flush($config) |
94 | 94 | { |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | /** |
113 | 113 | * @param HTMLPurifier_Config $config |
114 | - * @return bool |
|
114 | + * @return false|null |
|
115 | 115 | */ |
116 | 116 | public function cleanup($config) |
117 | 117 | { |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | * Decodes a JWT string into a PHP object. |
49 | 49 | * |
50 | 50 | * @param string $jwt The JWT |
51 | - * @param string|array $key The key, or map of keys. |
|
51 | + * @param string $key The key, or map of keys. |
|
52 | 52 | * If the algorithm used is asymmetric, this is the public key |
53 | - * @param array $allowed_algs List of supported verification algorithms |
|
53 | + * @param string[] $allowed_algs List of supported verification algorithms |
|
54 | 54 | * Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256' |
55 | 55 | * |
56 | 56 | * @return object The JWT's payload as a PHP object |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | * Sign a string with a given key and algorithm. |
175 | 175 | * |
176 | 176 | * @param string $msg The message to sign |
177 | - * @param string|resource $key The secret key |
|
177 | + * @param string $key The secret key |
|
178 | 178 | * @param string $alg The signing algorithm. |
179 | 179 | * Supported algorithms are 'HS256', 'HS384', 'HS512' and 'RS256' |
180 | 180 | * |
@@ -46,7 +46,7 @@ |
||
46 | 46 | * |
47 | 47 | * @param string $value A PHP value |
48 | 48 | * |
49 | - * @return bool True if the value would require double quotes |
|
49 | + * @return integer True if the value would require double quotes |
|
50 | 50 | */ |
51 | 51 | public static function requiresDoubleQuoting($value) |
52 | 52 | { |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | * |
215 | 215 | * @param string $scalar |
216 | 216 | * @param string $delimiters |
217 | - * @param array $stringDelimiters |
|
217 | + * @param string[] $stringDelimiters |
|
218 | 218 | * @param int &$i |
219 | 219 | * @param bool $evaluate |
220 | 220 | * @param array $references |
@@ -275,6 +275,7 @@ discard block |
||
275 | 275 | * |
276 | 276 | * @param string $scalar |
277 | 277 | * @param int &$i |
278 | + * @param integer $i |
|
278 | 279 | * |
279 | 280 | * @return string A YAML string |
280 | 281 | * |
@@ -314,6 +314,13 @@ |
||
314 | 314 | return empty($data) ? null : $data; |
315 | 315 | } |
316 | 316 | |
317 | + /** |
|
318 | + * @param integer $offset |
|
319 | + * @param null|string $yaml |
|
320 | + * @param boolean $exceptionOnInvalidType |
|
321 | + * @param boolean $objectSupport |
|
322 | + * @param boolean $objectForMap |
|
323 | + */ |
|
317 | 324 | private function parseBlock($offset, $yaml, $exceptionOnInvalidType, $objectSupport, $objectForMap) |
318 | 325 | { |
319 | 326 | $skippedLineNumbers = $this->skippedLineNumbers; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * @param integer $inline Nesting level where you switch to inline YAML |
45 | 45 | * @param integer $indent Number of spaces to indent for nested nodes |
46 | 46 | * |
47 | - * @return string|bool YAML string or false on error |
|
47 | + * @return string|false YAML string or false on error |
|
48 | 48 | */ |
49 | 49 | public static function dump($var, $inline = 4, $indent = 4) |
50 | 50 | { |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * @param integer $inline Nesting level where you switch to inline YAML |
129 | 129 | * @param integer $indent Number of spaces to indent for nested nodes |
130 | 130 | * |
131 | - * @return string|boolean YAML string or false on error |
|
131 | + * @return string|false YAML string or false on error |
|
132 | 132 | */ |
133 | 133 | public static function dumpWrapped($var, $inline = 4, $indent = 4) |
134 | 134 | { |
@@ -211,6 +211,9 @@ discard block |
||
211 | 211 | |
212 | 212 | /* Mailhide related code */ |
213 | 213 | |
214 | +/** |
|
215 | + * @param string $ky |
|
216 | + */ |
|
214 | 217 | function _recaptcha_aes_encrypt($val,$ky) { |
215 | 218 | if (! function_exists ("mcrypt_encrypt")) { |
216 | 219 | die ("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed."); |
@@ -222,6 +225,9 @@ discard block |
||
222 | 225 | } |
223 | 226 | |
224 | 227 | |
228 | +/** |
|
229 | + * @param null|string $x |
|
230 | + */ |
|
225 | 231 | function _recaptcha_mailhide_urlbase64 ($x) { |
226 | 232 | return strtr(base64_encode ($x), '+/', '-_'); |
227 | 233 | } |
@@ -68,7 +68,7 @@ |
||
68 | 68 | /** |
69 | 69 | * XoopsCaptcha::loadConfig() |
70 | 70 | * |
71 | - * @param mixed $filename |
|
71 | + * @param string $filename |
|
72 | 72 | * |
73 | 73 | * @return array |
74 | 74 | */ |