@@ -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 |
@@ -108,7 +108,7 @@ |
||
108 | 108 | /** |
109 | 109 | * Prints a simple key/value row in a table. |
110 | 110 | * @param string $name Key |
111 | - * @param mixed $value Value |
|
111 | + * @param string $value Value |
|
112 | 112 | * @return string |
113 | 113 | */ |
114 | 114 | protected function row($name, $value) |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | |
54 | 54 | /** |
55 | 55 | * Sets default column and row size for textareas in sub-printers |
56 | - * @param $cols Integer columns of textarea, null to use default |
|
57 | - * @param $rows Integer rows of textarea, null to use default |
|
56 | + * @param integer $cols Integer columns of textarea, null to use default |
|
57 | + * @param integer $rows Integer rows of textarea, null to use default |
|
58 | 58 | */ |
59 | 59 | public function setTextareaDimensions($cols = null, $rows = null) |
60 | 60 | { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | /** |
86 | 86 | * Returns HTML output for a configuration form |
87 | - * @param HTMLPurifier_Config|array $config Configuration object of current form state, or an array |
|
87 | + * @param HTMLPurifier_Config $config Configuration object of current form state, or an array |
|
88 | 88 | * where [0] has an HTML namespace and [1] is being rendered. |
89 | 89 | * @param array|bool $allowed Optional namespace(s) and directives to restrict form to. |
90 | 90 | * @param bool $render_controls |
@@ -528,9 +528,10 @@ discard block |
||
528 | 528 | * being the current one) will be deleted. |
529 | 529 | * |
530 | 530 | * @param HTMLPurifier_Token|array|int|bool $token Token substitution value |
531 | - * @param HTMLPurifier_Injector|int $injector Injector that performed the substitution; default is if |
|
531 | + * @param integer $injector Injector that performed the substitution; default is if |
|
532 | 532 | * this is not an injector related operation. |
533 | 533 | * @throws HTMLPurifier_Exception |
534 | + * @return HTMLPurifier_Token |
|
534 | 535 | */ |
535 | 536 | protected function processToken($token, $injector = -1) |
536 | 537 | { |
@@ -577,6 +578,7 @@ discard block |
||
577 | 578 | * Inserts a token before the current token. Cursor now points to |
578 | 579 | * this token. You must reprocess after this. |
579 | 580 | * @param HTMLPurifier_Token $token |
581 | + * @return HTMLPurifier_Token |
|
580 | 582 | */ |
581 | 583 | private function insertBefore($token) |
582 | 584 | { |
@@ -25,6 +25,9 @@ discard block |
||
25 | 25 | |
26 | 26 | ### Simple Function Interface ### |
27 | 27 | |
28 | + /** |
|
29 | + * @param string $text |
|
30 | + */ |
|
28 | 31 | public static function defaultTransform($text) { |
29 | 32 | # |
30 | 33 | # Initialize the parser and return the result of its transform method. |
@@ -931,6 +934,10 @@ discard block |
||
931 | 934 | |
932 | 935 | protected $list_level = 0; |
933 | 936 | |
937 | + /** |
|
938 | + * @param string $list_str |
|
939 | + * @param string $marker_any_re |
|
940 | + */ |
|
934 | 941 | protected function processListItems($list_str, $marker_any_re) { |
935 | 942 | # |
936 | 943 | # Process the contents of a single ordered or unordered list, splitting it |
@@ -1034,6 +1041,9 @@ discard block |
||
1034 | 1041 | } |
1035 | 1042 | |
1036 | 1043 | |
1044 | + /** |
|
1045 | + * @param string $code |
|
1046 | + */ |
|
1037 | 1047 | protected function makeCodeSpan($code) { |
1038 | 1048 | # |
1039 | 1049 | # Create a code span markup for $code. Called from handleSpanToken. |
@@ -1311,6 +1321,9 @@ discard block |
||
1311 | 1321 | } |
1312 | 1322 | |
1313 | 1323 | |
1324 | + /** |
|
1325 | + * @return string |
|
1326 | + */ |
|
1314 | 1327 | protected function encodeAttribute($text) { |
1315 | 1328 | # |
1316 | 1329 | # Encode text for a double-quoted HTML attribute. This function |
@@ -1551,6 +1564,9 @@ discard block |
||
1551 | 1564 | # hanlde UTF-8 if the default function does not exist. |
1552 | 1565 | protected $utf8_strlen = 'mb_strlen'; |
1553 | 1566 | |
1567 | + /** |
|
1568 | + * @param string $text |
|
1569 | + */ |
|
1554 | 1570 | protected function detab($text) { |
1555 | 1571 | # |
1556 | 1572 | # Replace tabs with the appropriate amount of space. |
@@ -516,6 +516,12 @@ discard block |
||
516 | 516 | |
517 | 517 | return array($parsed, $text); |
518 | 518 | } |
519 | + |
|
520 | + /** |
|
521 | + * @param string $text |
|
522 | + * @param string $hash_method |
|
523 | + * @param boolean $md_attr |
|
524 | + */ |
|
519 | 525 | protected function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) { |
520 | 526 | # |
521 | 527 | # Parse HTML, calling _HashHTMLBlocks_InMarkdown for block tags. |
@@ -1077,6 +1083,10 @@ discard block |
||
1077 | 1083 | |
1078 | 1084 | return $this->_doTable_callback(array($matches[0], $head, $underline, $content)); |
1079 | 1085 | } |
1086 | + |
|
1087 | + /** |
|
1088 | + * @param string $alignname |
|
1089 | + */ |
|
1080 | 1090 | protected function _doTable_makeAlignAttr($alignname) |
1081 | 1091 | { |
1082 | 1092 | if (empty($this->table_align_class_tmpl)) |
@@ -1203,6 +1213,9 @@ discard block |
||
1203 | 1213 | } |
1204 | 1214 | |
1205 | 1215 | |
1216 | + /** |
|
1217 | + * @return string |
|
1218 | + */ |
|
1206 | 1219 | protected function processDefListItems($list_str) { |
1207 | 1220 | # |
1208 | 1221 | # Process the contents of a single definition list, splitting it |
@@ -194,11 +194,11 @@ |
||
194 | 194 | * Call each filter and return array with details of the formatted content. |
195 | 195 | * |
196 | 196 | * @param string $text the text to filter. |
197 | - * @param array $filter array of filters to use. |
|
197 | + * @param string[] $filter array of filters to use. |
|
198 | 198 | * |
199 | 199 | * @throws mos/TextFilter/Exception when filterd does not exists. |
200 | 200 | * |
201 | - * @return array with the formatted text and additional details. |
|
201 | + * @return \stdClass with the formatted text and additional details. |
|
202 | 202 | */ |
203 | 203 | public function parse($text, $filter) |
204 | 204 | { |
@@ -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 | { |
@@ -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 | { |