@@ -269,6 +269,7 @@ discard block |
||
269 | 269 | |
270 | 270 | /** |
271 | 271 | * {@inheritDoc} |
272 | + * @param string $key |
|
272 | 273 | */ |
273 | 274 | public function createStream($key) |
274 | 275 | { |
@@ -281,6 +282,7 @@ discard block |
||
281 | 282 | |
282 | 283 | /** |
283 | 284 | * {@inheritDoc} |
285 | + * @param string $key |
|
284 | 286 | */ |
285 | 287 | public function createFile($key) |
286 | 288 | { |
@@ -686,6 +686,11 @@ discard block |
||
686 | 686 | * --------------------------------------------------------------------------------------------- |
687 | 687 | */ |
688 | 688 | |
689 | + /** |
|
690 | + * @param double $v1 |
|
691 | + * @param double $v2 |
|
692 | + * @param integer $vh |
|
693 | + */ |
|
689 | 694 | private function hue_to_rgb($v1, $v2, $vh) |
690 | 695 | { |
691 | 696 | $vh = $vh < 0 ? $vh + 1 : ($vh > 1 ? $vh - 1 : $vh); |
@@ -700,6 +705,10 @@ discard block |
||
700 | 705 | return intval(floor(floatval($n) + 0.5), 10); |
701 | 706 | } |
702 | 707 | |
708 | + /** |
|
709 | + * @param integer $min |
|
710 | + * @param integer $max |
|
711 | + */ |
|
703 | 712 | private function clamp_number($n, $min, $max) |
704 | 713 | { |
705 | 714 | return min(max($n, $min), $max); |
@@ -728,7 +737,7 @@ discard block |
||
728 | 737 | * |
729 | 738 | * @param string $str |
730 | 739 | * @param int $start index |
731 | - * @param int|bool $end index (optional) |
|
740 | + * @param integer $end index (optional) |
|
732 | 741 | * @return string |
733 | 742 | */ |
734 | 743 | private function str_slice($str, $start = 0, $end = FALSE) |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | /** |
244 | 244 | * When the object gets serialized only include specific object members. |
245 | 245 | * |
246 | - * @return array |
|
246 | + * @return string[] |
|
247 | 247 | */ |
248 | 248 | public function __sleep() |
249 | 249 | { |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | * |
403 | 403 | * Will throw exceptions for each php error. |
404 | 404 | * |
405 | - * @return mixed Returns a string containing the previously defined error handler (if any) |
|
405 | + * @return null|callable Returns a string containing the previously defined error handler (if any) |
|
406 | 406 | */ |
407 | 407 | public function registerErrorHandler($throwErrorExceptions = false) |
408 | 408 | { |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | /** |
449 | 449 | * Register FirePHP as your exception handler |
450 | 450 | * |
451 | - * @return mixed Returns the name of the previously defined exception handler, |
|
451 | + * @return callable Returns the name of the previously defined exception handler, |
|
452 | 452 | * or NULL on error. |
453 | 453 | * If no previous handler was defined, NULL is also returned. |
454 | 454 | */ |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | * |
535 | 535 | * @param string $name |
536 | 536 | * @param array $options OPTIONAL Instructions on how to log the group |
537 | - * @return true |
|
537 | + * @return boolean |
|
538 | 538 | * @throws Exception |
539 | 539 | */ |
540 | 540 | public function group($name, $options = null) |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | /** |
560 | 560 | * Ends a group you have started before |
561 | 561 | * |
562 | - * @return true |
|
562 | + * @return boolean |
|
563 | 563 | * @throws Exception |
564 | 564 | */ |
565 | 565 | public function groupEnd() |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | * @see FirePHP::LOG |
574 | 574 | * @param mixes $object |
575 | 575 | * @param string $label |
576 | - * @return true |
|
576 | + * @return boolean |
|
577 | 577 | * @throws Exception |
578 | 578 | */ |
579 | 579 | public function log($object, $label = null, $options = array()) |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | * @see FirePHP::INFO |
588 | 588 | * @param mixes $object |
589 | 589 | * @param string $label |
590 | - * @return true |
|
590 | + * @return boolean |
|
591 | 591 | * @throws Exception |
592 | 592 | */ |
593 | 593 | public function info($object, $label = null, $options = array()) |
@@ -601,7 +601,7 @@ discard block |
||
601 | 601 | * @see FirePHP::WARN |
602 | 602 | * @param mixes $object |
603 | 603 | * @param string $label |
604 | - * @return true |
|
604 | + * @return boolean |
|
605 | 605 | * @throws Exception |
606 | 606 | */ |
607 | 607 | public function warn($object, $label = null, $options = array()) |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | * @see FirePHP::ERROR |
616 | 616 | * @param mixes $object |
617 | 617 | * @param string $label |
618 | - * @return true |
|
618 | + * @return boolean |
|
619 | 619 | * @throws Exception |
620 | 620 | */ |
621 | 621 | public function error($object, $label = null, $options = array()) |
@@ -629,7 +629,7 @@ discard block |
||
629 | 629 | * @see FirePHP::DUMP |
630 | 630 | * @param string $key |
631 | 631 | * @param mixed $variable |
632 | - * @return true |
|
632 | + * @return boolean |
|
633 | 633 | * @throws Exception |
634 | 634 | */ |
635 | 635 | public function dump($key, $variable, $options = array()) |
@@ -651,7 +651,7 @@ discard block |
||
651 | 651 | * |
652 | 652 | * @see FirePHP::TRACE |
653 | 653 | * @param string $label |
654 | - * @return true |
|
654 | + * @return boolean |
|
655 | 655 | * @throws Exception |
656 | 656 | */ |
657 | 657 | public function trace($label) |
@@ -665,7 +665,7 @@ discard block |
||
665 | 665 | * @see FirePHP::TABLE |
666 | 666 | * @param string $label |
667 | 667 | * @param string $table |
668 | - * @return true |
|
668 | + * @return boolean |
|
669 | 669 | * @throws Exception |
670 | 670 | */ |
671 | 671 | public function table($label, $table, $options = array()) |
@@ -1207,6 +1207,7 @@ discard block |
||
1207 | 1207 | /** |
1208 | 1208 | * Get a request header |
1209 | 1209 | * |
1210 | + * @param string $name |
|
1210 | 1211 | * @return string|false |
1211 | 1212 | */ |
1212 | 1213 | protected function getRequestHeader($name) |
@@ -1285,7 +1286,7 @@ discard block |
||
1285 | 1286 | * protected and private visibility |
1286 | 1287 | * |
1287 | 1288 | * @param object $object The object to be encoded |
1288 | - * @param integer $Depth The current traversal depth |
|
1289 | + * @param integer $maxDepth The current traversal depth |
|
1289 | 1290 | * @return array All members of the object |
1290 | 1291 | */ |
1291 | 1292 | protected function encodeObject($object, $objectDepth = 1, $arrayDepth = 1, $maxDepth = 1) |
@@ -210,6 +210,9 @@ discard block |
||
210 | 210 | return $instance->min($js, $filename); |
211 | 211 | } |
212 | 212 | |
213 | + /** |
|
214 | + * @param string $filename |
|
215 | + */ |
|
213 | 216 | private function min($js, $filename) |
214 | 217 | { |
215 | 218 | try |
@@ -225,6 +228,9 @@ discard block |
||
225 | 228 | return false; |
226 | 229 | } |
227 | 230 | |
231 | + /** |
|
232 | + * @param JSNode $n |
|
233 | + */ |
|
228 | 234 | public function parseTree($n, $noBlockGrouping = false) |
229 | 235 | { |
230 | 236 | $s = ''; |
@@ -663,6 +669,9 @@ discard block |
||
663 | 669 | return $s; |
664 | 670 | } |
665 | 671 | |
672 | + /** |
|
673 | + * @param string $string |
|
674 | + */ |
|
666 | 675 | private function isValidIdentifier($string) |
667 | 676 | { |
668 | 677 | return preg_match('/^[a-zA-Z_][a-zA-Z0-9_]*$/', $string) && !in_array($string, $this->reserved); |
@@ -727,12 +736,18 @@ discard block |
||
727 | 736 | TOKEN_CONDCOMMENT_START => 1, TOKEN_CONDCOMMENT_END => 1 |
728 | 737 | ); |
729 | 738 | |
739 | + /** |
|
740 | + * @param JSMinPlus $minifier |
|
741 | + */ |
|
730 | 742 | public function __construct($minifier=null) |
731 | 743 | { |
732 | 744 | $this->minifier = $minifier; |
733 | 745 | $this->t = new JSTokenizer(); |
734 | 746 | } |
735 | 747 | |
748 | + /** |
|
749 | + * @param integer $l |
|
750 | + */ |
|
736 | 751 | public function parse($s, $f, $l) |
737 | 752 | { |
738 | 753 | // initialize tokenizer |
@@ -746,6 +761,9 @@ discard block |
||
746 | 761 | return $n; |
747 | 762 | } |
748 | 763 | |
764 | + /** |
|
765 | + * @param JSCompilerContext $x |
|
766 | + */ |
|
749 | 767 | private function Script($x) |
750 | 768 | { |
751 | 769 | $n = $this->Statements($x); |
@@ -1109,6 +1127,10 @@ discard block |
||
1109 | 1127 | return $n; |
1110 | 1128 | } |
1111 | 1129 | |
1130 | + /** |
|
1131 | + * @param boolean $requireName |
|
1132 | + * @param integer $functionForm |
|
1133 | + */ |
|
1112 | 1134 | private function FunctionDefinition($x, $requireName, $functionForm) |
1113 | 1135 | { |
1114 | 1136 | $f = new JSNode($this->t); |
@@ -1575,6 +1597,10 @@ discard block |
||
1575 | 1597 | } |
1576 | 1598 | |
1577 | 1599 | // Statement stack and nested statement handler. |
1600 | + |
|
1601 | + /** |
|
1602 | + * @param JSNode $node |
|
1603 | + */ |
|
1578 | 1604 | private function nest($x, $node, $end = false) |
1579 | 1605 | { |
1580 | 1606 | array_push($x->stmtStack, $node); |
@@ -1639,6 +1665,9 @@ discard block |
||
1639 | 1665 | public $funDecls = array(); |
1640 | 1666 | public $varDecls = array(); |
1641 | 1667 | |
1668 | + /** |
|
1669 | + * @param boolean $inFunction |
|
1670 | + */ |
|
1642 | 1671 | public function __construct($inFunction) |
1643 | 1672 | { |
1644 | 1673 | $this->inFunction = $inFunction; |
@@ -1657,6 +1686,9 @@ discard block |
||
1657 | 1686 | public $funDecls = array(); |
1658 | 1687 | public $varDecls = array(); |
1659 | 1688 | |
1689 | + /** |
|
1690 | + * @param JSTokenizer $t |
|
1691 | + */ |
|
1660 | 1692 | public function __construct($t, $type=0) |
1661 | 1693 | { |
1662 | 1694 | if ($token = $t->currentToken()) |
@@ -1768,6 +1800,9 @@ discard block |
||
1768 | 1800 | $this->scanOperand = true; |
1769 | 1801 | } |
1770 | 1802 | |
1803 | + /** |
|
1804 | + * @param integer|null $chunksize |
|
1805 | + */ |
|
1771 | 1806 | public function getInput($chunksize) |
1772 | 1807 | { |
1773 | 1808 | if ($chunksize) |
@@ -153,7 +153,7 @@ |
||
153 | 153 | * |
154 | 154 | * Any controller options are documented in that controller's setupSources() method. |
155 | 155 | * |
156 | - * @param mixed $controller instance of subclass of Minify_Controller_Base or string |
|
156 | + * @param string $controller instance of subclass of Minify_Controller_Base or string |
|
157 | 157 | * name of controller. E.g. 'Files' |
158 | 158 | * |
159 | 159 | * @param array $options controller/serve options |
@@ -96,6 +96,9 @@ |
||
96 | 96 | return implode("\n", $output); |
97 | 97 | } |
98 | 98 | |
99 | + /** |
|
100 | + * @param string $tmpFile |
|
101 | + */ |
|
99 | 102 | private static function _getCmd($userOptions, $tmpFile) |
100 | 103 | { |
101 | 104 | $o = array_merge( |
@@ -212,7 +212,7 @@ |
||
212 | 212 | * |
213 | 213 | * @param string $path |
214 | 214 | * |
215 | - * @return mixed path with no trailing slash |
|
215 | + * @return string path with no trailing slash |
|
216 | 216 | */ |
217 | 217 | protected static function _realpath($path) |
218 | 218 | { |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | /** |
148 | 148 | * Get unique string for a set of sources |
149 | 149 | * |
150 | - * @param array $sources Minify_Source instances |
|
150 | + * @param Minify_Source[] $sources Minify_Source instances |
|
151 | 151 | * |
152 | 152 | * @return string |
153 | 153 | */ |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | * |
167 | 167 | * This is called if the user doesn't pass in a 'contentType' options |
168 | 168 | * |
169 | - * @param array $sources Minify_Source instances |
|
169 | + * @param Minify_Source[] $sources Minify_Source instances |
|
170 | 170 | * |
171 | 171 | * @return string content type. e.g. 'text/css' |
172 | 172 | */ |
@@ -86,6 +86,10 @@ discard block |
||
86 | 86 | return self::_minify('css', $css, $options); |
87 | 87 | } |
88 | 88 | |
89 | + /** |
|
90 | + * @param string $type |
|
91 | + * @param string $content |
|
92 | + */ |
|
89 | 93 | private static function _minify($type, $content, $options) |
90 | 94 | { |
91 | 95 | self::_prepare(); |
@@ -101,6 +105,9 @@ discard block |
||
101 | 105 | return implode("\n", $output); |
102 | 106 | } |
103 | 107 | |
108 | + /** |
|
109 | + * @param string $tmpFile |
|
110 | + */ |
|
104 | 111 | private static function _getCmd($userOptions, $type, $tmpFile) |
105 | 112 | { |
106 | 113 | $o = array_merge( |