@@ -361,7 +361,6 @@ |
||
361 | 361 | |
362 | 362 | /** |
363 | 363 | * Formats HTML/Javascript |
364 | - * @param DomNode $root |
|
365 | 364 | * @see format_html() |
366 | 365 | */ |
367 | 366 | function format(&$node) { |
@@ -857,7 +857,7 @@ |
||
857 | 857 | /** |
858 | 858 | * Evaluate {@link $result} |
859 | 859 | * @param bool $parent Evaluate parent nodes |
860 | - * @param bool|int $recursive |
|
860 | + * @param integer $recursive |
|
861 | 861 | * @return bool |
862 | 862 | * @internal Result of query is set in {@link $result} |
863 | 863 | * @access private |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | * Finds the next token using stopcharacters |
453 | 453 | * |
454 | 454 | * Used like: next_search('abc') or next_seach(array('a' => true, 'b' => true, 'c' => true)); |
455 | - * @param string|array $characters Characters to search for |
|
455 | + * @param string $characters Characters to search for |
|
456 | 456 | * @param bool $callback Should the function check the charmap after finding a character? |
457 | 457 | * @return int Next token ({@link TOK_NULL} if none) |
458 | 458 | */ |
@@ -528,7 +528,7 @@ discard block |
||
528 | 528 | * @param string|int $token Character or token to expect |
529 | 529 | * @param bool|int $do_next Go to next character before evaluating. 1 for next char, true to ignore whitespace |
530 | 530 | * @param bool|int $try_next Try next character if current doesn't match. 1 for next char, true to ignore whitespace |
531 | - * @param bool|int $next_on_match Go to next character after evaluating. 1 for next char, true to ignore whitespace |
|
531 | + * @param integer $next_on_match Go to next character after evaluating. 1 for next char, true to ignore whitespace |
|
532 | 532 | * @return bool |
533 | 533 | */ |
534 | 534 | protected function expect($token, $do_next = true, $try_next = false, $next_on_match = 1) { |
@@ -31,6 +31,9 @@ |
||
31 | 31 | */ |
32 | 32 | var $hierarchy = array(); |
33 | 33 | |
34 | + /** |
|
35 | + * @param boolean|null $self_close |
|
36 | + */ |
|
34 | 37 | protected function parse_hierarchy($self_close) { |
35 | 38 | if ($this->status['closing_tag']) { |
36 | 39 | $found = false; |
@@ -23,7 +23,6 @@ discard block |
||
23 | 23 | |
24 | 24 | /** |
25 | 25 | * Returns HTML DOM from file/website |
26 | - * @param string $str |
|
27 | 26 | * @param bool $return_root Return root node or return parser object |
28 | 27 | * @param bool $use_include_path Use include path search in file_get_contents |
29 | 28 | * @param resource $context Context resource used in file_get_contents (PHP >= 5.0.0) |
@@ -73,7 +72,7 @@ discard block |
||
73 | 72 | /** |
74 | 73 | * PHP alternative to array_fill_keys, for backwards compatibility |
75 | 74 | * @param array $keys |
76 | - * @param mixed $value |
|
75 | + * @param boolean $value |
|
77 | 76 | * @return array |
78 | 77 | */ |
79 | 78 | function array_fill_keys($keys, $value) { |
@@ -7,7 +7,7 @@ |
||
7 | 7 | * @package pQuery |
8 | 8 | */ |
9 | 9 | |
10 | -use pQuery\Html5Parser; |
|
10 | +use pQuery\Html5Parser; |
|
11 | 11 | use pQuery\HtmlFormatter; |
12 | 12 | |
13 | 13 | /** |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | /** |
46 | 46 | * Remove all child nodes of the set of matched elements from the DOM. |
47 | - * @return IQuery; |
|
47 | + * @return null| |
|
48 | 48 | */ |
49 | 49 | function clear(); |
50 | 50 | |
@@ -63,6 +63,7 @@ discard block |
||
63 | 63 | /** |
64 | 64 | * Determine whether any of the matched elements are assigned the given class. |
65 | 65 | * @param string $classname The name of the class to check. |
66 | + * @return boolean |
|
66 | 67 | */ |
67 | 68 | function hasClass($classname); |
68 | 69 | |
@@ -91,6 +92,7 @@ discard block |
||
91 | 92 | /** |
92 | 93 | * Remove the set of matched elements from the DOM. |
93 | 94 | * @param null|string $selector A css query to filter the set of removed nodes. |
95 | + * @return null| |
|
94 | 96 | */ |
95 | 97 | function remove($selector = null); |
96 | 98 | |
@@ -103,6 +105,7 @@ discard block |
||
103 | 105 | /** |
104 | 106 | * Remove a single class, multiple classes, or all classes from each element in the set of matched elements. |
105 | 107 | * @param string $classname The name of the class to remove. |
108 | + * @return null| |
|
106 | 109 | */ |
107 | 110 | function removeClass($classname); |
108 | 111 | |
@@ -114,7 +117,6 @@ discard block |
||
114 | 117 | |
115 | 118 | /** |
116 | 119 | * Returns the name of the element. |
117 | - * @param null|string $tagName A new tag name or null to return the current tag name. |
|
118 | 120 | */ |
119 | 121 | function tagName($value = null); |
120 | 122 |
@@ -195,6 +195,9 @@ discard block |
||
195 | 195 | $this->parser = new JSParser($this); |
196 | 196 | } |
197 | 197 | |
198 | + /** |
|
199 | + * @return string |
|
200 | + */ |
|
198 | 201 | public static function minify($js, $filename='') |
199 | 202 | { |
200 | 203 | static $instance; |
@@ -206,6 +209,9 @@ discard block |
||
206 | 209 | return $instance->min($js, $filename); |
207 | 210 | } |
208 | 211 | |
212 | + /** |
|
213 | + * @param string $filename |
|
214 | + */ |
|
209 | 215 | private function min($js, $filename) |
210 | 216 | { |
211 | 217 | try |
@@ -221,6 +227,9 @@ discard block |
||
221 | 227 | return false; |
222 | 228 | } |
223 | 229 | |
230 | + /** |
|
231 | + * @param JSNode $n |
|
232 | + */ |
|
224 | 233 | public function parseTree($n, $noBlockGrouping = false) |
225 | 234 | { |
226 | 235 | $s = ''; |
@@ -659,6 +668,9 @@ discard block |
||
659 | 668 | return $s; |
660 | 669 | } |
661 | 670 | |
671 | + /** |
|
672 | + * @param string $string |
|
673 | + */ |
|
662 | 674 | private function isValidIdentifier($string) |
663 | 675 | { |
664 | 676 | return preg_match('/^[a-zA-Z_][a-zA-Z0-9_]*$/', $string) && !in_array($string, $this->reserved); |
@@ -723,12 +735,18 @@ discard block |
||
723 | 735 | TOKEN_CONDCOMMENT_START => 1, TOKEN_CONDCOMMENT_END => 1 |
724 | 736 | ); |
725 | 737 | |
738 | + /** |
|
739 | + * @param JSMinPlus $minifier |
|
740 | + */ |
|
726 | 741 | public function __construct($minifier=null) |
727 | 742 | { |
728 | 743 | $this->minifier = $minifier; |
729 | 744 | $this->t = new JSTokenizer(); |
730 | 745 | } |
731 | 746 | |
747 | + /** |
|
748 | + * @param integer $l |
|
749 | + */ |
|
732 | 750 | public function parse($s, $f, $l) |
733 | 751 | { |
734 | 752 | // initialize tokenizer |
@@ -742,6 +760,9 @@ discard block |
||
742 | 760 | return $n; |
743 | 761 | } |
744 | 762 | |
763 | + /** |
|
764 | + * @param JSCompilerContext $x |
|
765 | + */ |
|
745 | 766 | private function Script($x) |
746 | 767 | { |
747 | 768 | $n = $this->Statements($x); |
@@ -1105,6 +1126,10 @@ discard block |
||
1105 | 1126 | return $n; |
1106 | 1127 | } |
1107 | 1128 | |
1129 | + /** |
|
1130 | + * @param boolean $requireName |
|
1131 | + * @param integer $functionForm |
|
1132 | + */ |
|
1108 | 1133 | private function FunctionDefinition($x, $requireName, $functionForm) |
1109 | 1134 | { |
1110 | 1135 | $f = new JSNode($this->t); |
@@ -1571,6 +1596,10 @@ discard block |
||
1571 | 1596 | } |
1572 | 1597 | |
1573 | 1598 | // Statement stack and nested statement handler. |
1599 | + |
|
1600 | + /** |
|
1601 | + * @param JSNode $node |
|
1602 | + */ |
|
1574 | 1603 | private function nest($x, $node, $end = false) |
1575 | 1604 | { |
1576 | 1605 | array_push($x->stmtStack, $node); |
@@ -1635,6 +1664,9 @@ discard block |
||
1635 | 1664 | public $funDecls = array(); |
1636 | 1665 | public $varDecls = array(); |
1637 | 1666 | |
1667 | + /** |
|
1668 | + * @param boolean $inFunction |
|
1669 | + */ |
|
1638 | 1670 | public function __construct($inFunction) |
1639 | 1671 | { |
1640 | 1672 | $this->inFunction = $inFunction; |
@@ -1653,6 +1685,9 @@ discard block |
||
1653 | 1685 | public $funDecls = array(); |
1654 | 1686 | public $varDecls = array(); |
1655 | 1687 | |
1688 | + /** |
|
1689 | + * @param JSTokenizer $t |
|
1690 | + */ |
|
1656 | 1691 | public function __construct($t, $type=0) |
1657 | 1692 | { |
1658 | 1693 | if ($token = $t->currentToken()) |
@@ -1764,6 +1799,9 @@ discard block |
||
1764 | 1799 | $this->scanOperand = true; |
1765 | 1800 | } |
1766 | 1801 | |
1802 | + /** |
|
1803 | + * @param integer|null $chunksize |
|
1804 | + */ |
|
1767 | 1805 | public function getInput($chunksize) |
1768 | 1806 | { |
1769 | 1807 | if ($chunksize) |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | /** |
362 | 362 | * Returns the node as string |
363 | 363 | * @param bool $attributes Print attributes (of child tags) |
364 | - * @param bool|int $recursive How many sub-levels of child tags to print. True for all. |
|
364 | + * @param boolean $recursive How many sub-levels of child tags to print. True for all. |
|
365 | 365 | * @param bool|int $content_only Only print text, false will print tags too. |
366 | 366 | * @return string |
367 | 367 | */ |
@@ -1021,7 +1021,6 @@ discard block |
||
1021 | 1021 | /** |
1022 | 1022 | * Insert childnode |
1023 | 1023 | * @param string|DomNode $tag Tagname or object |
1024 | - * @param int $offset Position to insert node, negative to count from end, null to append |
|
1025 | 1024 | * @return DomNode Added node |
1026 | 1025 | * @see addChild(); |
1027 | 1026 | */ |
@@ -1040,6 +1039,10 @@ discard block |
||
1040 | 1039 | #function &addText($text, &$offset) { |
1041 | 1040 | #php4e |
1042 | 1041 | #php5 |
1042 | + |
|
1043 | + /** |
|
1044 | + * @param string $text |
|
1045 | + */ |
|
1043 | 1046 | function &addText($text, &$offset = null) { |
1044 | 1047 | #php5e |
1045 | 1048 | return $this->addChild(new $this->childClass_Text($this, $text), $offset); |
@@ -1148,7 +1151,7 @@ discard block |
||
1148 | 1151 | |
1149 | 1152 | /** |
1150 | 1153 | * Delete a child node |
1151 | - * @param int|DomNode $child Child(index) to delete, negative to count from end |
|
1154 | + * @param DomNode $child Child(index) to delete, negative to count from end |
|
1152 | 1155 | * @param bool $soft_delete False to call {@link delete()} from child |
1153 | 1156 | */ |
1154 | 1157 | function deleteChild($child, $soft_delete = false) { |
@@ -1458,7 +1461,7 @@ discard block |
||
1458 | 1461 | |
1459 | 1462 | /** |
1460 | 1463 | * Add new class(es) |
1461 | - * @param string|array $className |
|
1464 | + * @param string $className |
|
1462 | 1465 | */ |
1463 | 1466 | function addClass($className) { |
1464 | 1467 | if (!is_array($className)) { |
@@ -1475,7 +1478,7 @@ discard block |
||
1475 | 1478 | |
1476 | 1479 | /** |
1477 | 1480 | * Remove clas(ses) |
1478 | - * @param string|array $className |
|
1481 | + * @param string $className |
|
1479 | 1482 | */ |
1480 | 1483 | function removeClass($className) { |
1481 | 1484 | if (!is_array($className)) { |
@@ -1752,9 +1755,6 @@ discard block |
||
1752 | 1755 | |
1753 | 1756 | /** |
1754 | 1757 | * Checks if node matches certain filters |
1755 | - * @param array $tags array(array( |
|
1756 | - * 'filter' => 'last-child', |
|
1757 | - * 'params' => '123')) |
|
1758 | 1758 | * @param array $custom_filters Custom map next to {@link $filter_map} |
1759 | 1759 | * @return bool |
1760 | 1760 | * @internal Used by selector class |
@@ -1783,7 +1783,6 @@ discard block |
||
1783 | 1783 | |
1784 | 1784 | /** |
1785 | 1785 | * Checks if node matches certain conditions |
1786 | - * @param array $tags array('tags' => array(tag_conditions), 'attributes' => array(attr_conditions), 'filters' => array(filter_conditions)) |
|
1787 | 1786 | * @param array $match Should conditions evaluate to true? |
1788 | 1787 | * @param array $custom_filters Custom map next to {@link $filter_map} |
1789 | 1788 | * @return bool |
@@ -1861,7 +1860,7 @@ discard block |
||
1861 | 1860 | * Finds children that match a certain tag |
1862 | 1861 | * @param string $tag |
1863 | 1862 | * @param string $compare "total"/"namespace"/"name" |
1864 | - * @param bool|int $recursive |
|
1863 | + * @param boolean $recursive |
|
1865 | 1864 | * @return array |
1866 | 1865 | */ |
1867 | 1866 | function getChildrenByTag($tag, $compare = 'total', $recursive = true) { |
@@ -1931,7 +1930,7 @@ discard block |
||
1931 | 1930 | * @param string $query |
1932 | 1931 | * @param int|bool $index True to return node instead of array if only 1 match, |
1933 | 1932 | * false to return array, int to return match at index, negative int to count from end |
1934 | - * @param bool|int $recursive |
|
1933 | + * @param boolean $recursive |
|
1935 | 1934 | * @param bool $check_self Include this node in search or only search child nodes |
1936 | 1935 | * @return DomNode[]|DomNode Returns an array of matching {@link DomNode} objects |
1937 | 1936 | * or a single {@link DomNode} if `$index` is not false. |
@@ -2297,7 +2296,7 @@ discard block |
||
2297 | 2296 | |
2298 | 2297 | /** |
2299 | 2298 | * Create a {@link DomNode} from its string representation. |
2300 | - * @param string|DomNode $content |
|
2299 | + * @param string $content |
|
2301 | 2300 | * @return DomNode |
2302 | 2301 | */ |
2303 | 2302 | protected function createNode($content) { |