@@ -64,6 +64,9 @@ discard block |
||
64 | 64 | |
65 | 65 | /////////////////////////////////////////////////////////////////////////////////////////////////// |
66 | 66 | |
67 | +/** |
|
68 | + * @param string $lpszFileName |
|
69 | + */ |
|
67 | 70 | function gif_outputAsBmp($gif, $lpszFileName, $bgColor = -1) |
68 | 71 | { |
69 | 72 | if (!isset($gif) || (@get_class($gif) <> 'cgif') || !$gif->loaded() || ($lpszFileName == '')) { |
@@ -186,6 +189,10 @@ discard block |
||
186 | 189 | |
187 | 190 | /////////////////////////////////////////////////////////////////////////// |
188 | 191 | |
192 | + /** |
|
193 | + * @param string $data |
|
194 | + * @param integer $datLen |
|
195 | + */ |
|
189 | 196 | function deCompress($data, &$datLen) |
190 | 197 | { |
191 | 198 | $stLen = strlen($data); |
@@ -210,6 +217,11 @@ discard block |
||
210 | 217 | |
211 | 218 | /////////////////////////////////////////////////////////////////////////// |
212 | 219 | |
220 | + /** |
|
221 | + * @param boolean $bInit |
|
222 | + * |
|
223 | + * @return integer |
|
224 | + */ |
|
213 | 225 | function LZWCommand(&$data, $bInit) |
214 | 226 | { |
215 | 227 | if ($bInit) { |
@@ -392,6 +404,10 @@ discard block |
||
392 | 404 | |
393 | 405 | /////////////////////////////////////////////////////////////////////////// |
394 | 406 | |
407 | + /** |
|
408 | + * @param string $lpData |
|
409 | + * @param integer $num |
|
410 | + */ |
|
395 | 411 | function load($lpData, $num) |
396 | 412 | { |
397 | 413 | $this->m_nColors = 0; |
@@ -504,6 +520,9 @@ discard block |
||
504 | 520 | |
505 | 521 | /////////////////////////////////////////////////////////////////////////// |
506 | 522 | |
523 | + /** |
|
524 | + * @param integer $hdrLen |
|
525 | + */ |
|
507 | 526 | function load($lpData, &$hdrLen) |
508 | 527 | { |
509 | 528 | $hdrLen = 0; |
@@ -541,6 +560,9 @@ discard block |
||
541 | 560 | |
542 | 561 | /////////////////////////////////////////////////////////////////////////// |
543 | 562 | |
563 | + /** |
|
564 | + * @param string $str |
|
565 | + */ |
|
544 | 566 | function w2i($str) |
545 | 567 | { |
546 | 568 | return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8); |
@@ -579,6 +601,10 @@ discard block |
||
579 | 601 | |
580 | 602 | /////////////////////////////////////////////////////////////////////////// |
581 | 603 | |
604 | + /** |
|
605 | + * @param string $lpData |
|
606 | + * @param integer $hdrLen |
|
607 | + */ |
|
582 | 608 | function load($lpData, &$hdrLen) |
583 | 609 | { |
584 | 610 | $hdrLen = 0; |
@@ -612,6 +638,9 @@ discard block |
||
612 | 638 | |
613 | 639 | /////////////////////////////////////////////////////////////////////////// |
614 | 640 | |
641 | + /** |
|
642 | + * @param string $str |
|
643 | + */ |
|
615 | 644 | function w2i($str) |
616 | 645 | { |
617 | 646 | return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8); |
@@ -649,6 +678,10 @@ discard block |
||
649 | 678 | |
650 | 679 | /////////////////////////////////////////////////////////////////////////// |
651 | 680 | |
681 | + /** |
|
682 | + * @param string $data |
|
683 | + * @param integer $datLen |
|
684 | + */ |
|
652 | 685 | function load($data, &$datLen) |
653 | 686 | { |
654 | 687 | $datLen = 0; |
@@ -696,6 +729,10 @@ discard block |
||
696 | 729 | |
697 | 730 | /////////////////////////////////////////////////////////////////////////// |
698 | 731 | |
732 | + /** |
|
733 | + * @param string $data |
|
734 | + * @param integer $extLen |
|
735 | + */ |
|
699 | 736 | function skipExt(&$data, &$extLen) |
700 | 737 | { |
701 | 738 | $extLen = 0; |
@@ -741,6 +778,9 @@ discard block |
||
741 | 778 | |
742 | 779 | /////////////////////////////////////////////////////////////////////////// |
743 | 780 | |
781 | + /** |
|
782 | + * @param string $str |
|
783 | + */ |
|
744 | 784 | function w2i($str) |
745 | 785 | { |
746 | 786 | return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8); |
@@ -814,6 +854,9 @@ discard block |
||
814 | 854 | |
815 | 855 | /////////////////////////////////////////////////////////////////////////// |
816 | 856 | |
857 | + /** |
|
858 | + * @param integer $iIndex |
|
859 | + */ |
|
817 | 860 | function loadFile($lpszFileName, $iIndex) |
818 | 861 | { |
819 | 862 | if ($iIndex < 0) { |
@@ -967,6 +1010,9 @@ discard block |
||
967 | 1010 | |
968 | 1011 | /////////////////////////////////////////////////////////////////////////// |
969 | 1012 | |
1013 | + /** |
|
1014 | + * @param integer $bgColor |
|
1015 | + */ |
|
970 | 1016 | function getPng($bgColor) |
971 | 1017 | { |
972 | 1018 | $out = ''; |
@@ -116,7 +116,7 @@ |
||
116 | 116 | /** |
117 | 117 | * Execute the filter |
118 | 118 | * |
119 | - * @return bool |
|
119 | + * @return boolean|null |
|
120 | 120 | */ |
121 | 121 | public function execute() |
122 | 122 | { |
@@ -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 | { |
@@ -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 | { |
@@ -458,6 +458,9 @@ discard block |
||
458 | 458 | const CHARACTR = 4; |
459 | 459 | const EOF = 5; |
460 | 460 | |
461 | + /** |
|
462 | + * @param string $data |
|
463 | + */ |
|
461 | 464 | public function __construct($data) |
462 | 465 | { |
463 | 466 | $this->data = $data; |
@@ -478,6 +481,9 @@ discard block |
||
478 | 481 | return $this->tree->save(); |
479 | 482 | } |
480 | 483 | |
484 | + /** |
|
485 | + * @return string |
|
486 | + */ |
|
481 | 487 | private function char() |
482 | 488 | { |
483 | 489 | return ($this->char < $this->EOF) |
@@ -485,6 +491,11 @@ discard block |
||
485 | 491 | : false; |
486 | 492 | } |
487 | 493 | |
494 | + /** |
|
495 | + * @param integer $s |
|
496 | + * |
|
497 | + * @return string |
|
498 | + */ |
|
488 | 499 | private function character($s, $l = 0) |
489 | 500 | { |
490 | 501 | if ($s + $l < $this->EOF) { |
@@ -496,6 +507,10 @@ discard block |
||
496 | 507 | } |
497 | 508 | } |
498 | 509 | |
510 | + /** |
|
511 | + * @param string $char_class |
|
512 | + * @param integer $start |
|
513 | + */ |
|
499 | 514 | private function characters($char_class, $start) |
500 | 515 | { |
501 | 516 | return preg_replace('#^([' . $char_class . ']+).*#s', '\\1', substr($this->data, $start)); |
@@ -4645,6 +4660,9 @@ discard block |
||
4645 | 4660 | } |
4646 | 4661 | } |
4647 | 4662 | |
4663 | + /** |
|
4664 | + * @param string[] $elements |
|
4665 | + */ |
|
4648 | 4666 | private function clearStackToTableContext($elements) |
4649 | 4667 | { |
4650 | 4668 | /* When the steps above require the UA to clear the stack back to a |
@@ -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')) { |