@@ -205,6 +205,7 @@ |
||
205 | 205 | /** |
206 | 206 | * Adds a module to the current doctype by first registering it, |
207 | 207 | * and then tacking it on to the active doctype |
208 | + * @param HTMLPurifier_HTMLModule $module |
|
208 | 209 | */ |
209 | 210 | public function addModule($module) |
210 | 211 | { |
@@ -65,7 +65,7 @@ |
||
65 | 65 | * deleted a node, and now need to see if this change affected any |
66 | 66 | * earlier nodes. Rewinding does not affect other injectors, and can |
67 | 67 | * result in infinite loops if not used carefully. |
68 | - * @param bool|int $offset |
|
68 | + * @param integer $offset |
|
69 | 69 | * @warning HTML Purifier will prevent you from fast-forwarding with this |
70 | 70 | * function. |
71 | 71 | */ |
@@ -328,7 +328,7 @@ |
||
328 | 328 | * Determines if a particular token requires an earlier inline token |
329 | 329 | * to get a paragraph. This should be used with _forwardUntilEndToken |
330 | 330 | * @param HTMLPurifier_Token $current |
331 | - * @return bool |
|
331 | + * @return boolean|null |
|
332 | 332 | */ |
333 | 333 | private function _checkNeedsP($current) |
334 | 334 | { |
@@ -341,6 +341,7 @@ |
||
341 | 341 | /** |
342 | 342 | * Takes a string of HTML (fragment or document) and returns the content |
343 | 343 | * @todo Consider making protected |
344 | + * @param string $html |
|
344 | 345 | */ |
345 | 346 | public function extractBody($html) |
346 | 347 | { |
@@ -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. |