@@ -51,6 +51,9 @@ |
||
51 | 51 | return $this->get('base'); |
52 | 52 | } |
53 | 53 | |
54 | + /** |
|
55 | + * @param string $base |
|
56 | + */ |
|
54 | 57 | public function setBase($base) |
55 | 58 | { |
56 | 59 | $this->set('base', $base); |
@@ -280,6 +280,9 @@ discard block |
||
280 | 280 | |
281 | 281 | // ----- Privates ----- |
282 | 282 | |
283 | + /** |
|
284 | + * @param string $cache_file |
|
285 | + */ |
|
283 | 286 | function _isRecompileNeeded($cache_file) |
284 | 287 | { |
285 | 288 | // If there is no cache file, we obviously need to recompile. |
@@ -486,6 +489,9 @@ discard block |
||
486 | 489 | return $data; |
487 | 490 | } |
488 | 491 | |
492 | + /** |
|
493 | + * @param string $data |
|
494 | + */ |
|
489 | 495 | function _unchunk($data) |
490 | 496 | { |
491 | 497 | $fp = 0; |
@@ -502,6 +508,9 @@ discard block |
||
502 | 508 | return $outData; |
503 | 509 | } |
504 | 510 | |
511 | + /** |
|
512 | + * @param string $data |
|
513 | + */ |
|
505 | 514 | function _parseXml($data) |
506 | 515 | { |
507 | 516 | $xml = new SimpleXMLElement($data); |
@@ -509,6 +518,9 @@ discard block |
||
509 | 518 | return $this->_parseXmlHelper($xml); |
510 | 519 | } |
511 | 520 | |
521 | + /** |
|
522 | + * @param SimpleXMLElement $xml |
|
523 | + */ |
|
512 | 524 | function _parseXmlHelper($xml) |
513 | 525 | { |
514 | 526 | $tree = null; |
@@ -392,8 +392,8 @@ discard block |
||
392 | 392 | * @param string $property Property of the declaration |
393 | 393 | * @param string $value Value of the declaration |
394 | 394 | * @param boolean $isImportant Is the !important flag is set? |
395 | - * @param boolean $IsLast Is the declaration the last one of the block? |
|
396 | - * @return void |
|
395 | + * @param boolean $isLast Is the declaration the last one of the block? |
|
396 | + * @return aCssToken |
|
397 | 397 | */ |
398 | 398 | public function __construct($property, $value, $isImportant = false, $isLast = false) |
399 | 399 | { |
@@ -629,7 +629,7 @@ discard block |
||
629 | 629 | /** |
630 | 630 | * Implements {@link aMinifierPlugin::getTriggerTokens()} |
631 | 631 | * |
632 | - * @return array |
|
632 | + * @return string[] |
|
633 | 633 | */ |
634 | 634 | public function getTriggerTokens() |
635 | 635 | { |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | /** |
751 | 751 | * Implements {@link aCssParserPlugin::getTriggerChars()}. |
752 | 752 | * |
753 | - * @return array |
|
753 | + * @return string[] |
|
754 | 754 | */ |
755 | 755 | public function getTriggerChars() |
756 | 756 | { |
@@ -760,7 +760,7 @@ discard block |
||
760 | 760 | /** |
761 | 761 | * Implements {@link aCssParserPlugin::getTriggerStates()}. |
762 | 762 | * |
763 | - * @return array |
|
763 | + * @return boolean |
|
764 | 764 | */ |
765 | 765 | public function getTriggerStates() |
766 | 766 | { |
@@ -773,7 +773,7 @@ discard block |
||
773 | 773 | * @param integer $index Current index |
774 | 774 | * @param string $char Current char |
775 | 775 | * @param string $previousChar Previous char |
776 | - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and |
|
776 | + * @return boolean TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and |
|
777 | 777 | * break the processing |
778 | 778 | */ |
779 | 779 | public function parse($index, $char, $previousChar, $state) |
@@ -832,7 +832,7 @@ discard block |
||
832 | 832 | /** |
833 | 833 | * Implements {@link aCssParserPlugin::getTriggerChars()}. |
834 | 834 | * |
835 | - * @return array |
|
835 | + * @return string[] |
|
836 | 836 | */ |
837 | 837 | public function getTriggerChars() |
838 | 838 | { |
@@ -842,7 +842,7 @@ discard block |
||
842 | 842 | /** |
843 | 843 | * Implements {@link aCssParserPlugin::getTriggerStates()}. |
844 | 844 | * |
845 | - * @return array |
|
845 | + * @return boolean |
|
846 | 846 | */ |
847 | 847 | public function getTriggerStates() |
848 | 848 | { |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | * @param integer $index Current index |
856 | 856 | * @param string $char Current char |
857 | 857 | * @param string $previousChar Previous char |
858 | - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and |
|
858 | + * @return boolean TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and |
|
859 | 859 | * break the processing |
860 | 860 | */ |
861 | 861 | public function parse($index, $char, $previousChar, $state) |
@@ -1021,8 +1021,8 @@ discard block |
||
1021 | 1021 | /** |
1022 | 1022 | * Set the properties of a ruleset token. |
1023 | 1023 | * |
1024 | - * @param array $selectors Selectors of the ruleset |
|
1025 | - * @return void |
|
1024 | + * @param string[] $selectors Selectors of the ruleset |
|
1025 | + * @return aCssToken |
|
1026 | 1026 | */ |
1027 | 1027 | public function __construct(array $selectors = []) |
1028 | 1028 | { |
@@ -1058,7 +1058,7 @@ discard block |
||
1058 | 1058 | /** |
1059 | 1059 | * Implements {@link aCssParserPlugin::getTriggerChars()}. |
1060 | 1060 | * |
1061 | - * @return array |
|
1061 | + * @return string[] |
|
1062 | 1062 | */ |
1063 | 1063 | public function getTriggerChars() |
1064 | 1064 | { |
@@ -1068,7 +1068,7 @@ discard block |
||
1068 | 1068 | /** |
1069 | 1069 | * Implements {@link aCssParserPlugin::getTriggerStates()}. |
1070 | 1070 | * |
1071 | - * @return array |
|
1071 | + * @return string[] |
|
1072 | 1072 | */ |
1073 | 1073 | public function getTriggerStates() |
1074 | 1074 | { |
@@ -1088,7 +1088,7 @@ discard block |
||
1088 | 1088 | * @param integer $index Current index |
1089 | 1089 | * @param string $char Current char |
1090 | 1090 | * @param string $previousChar Previous char |
1091 | - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and |
|
1091 | + * @return boolean TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and |
|
1092 | 1092 | * break the processing |
1093 | 1093 | */ |
1094 | 1094 | public function parse($index, $char, $previousChar, $state) |
@@ -1197,7 +1197,7 @@ discard block |
||
1197 | 1197 | * @param mixed $mediaTypes Media types of the declaration |
1198 | 1198 | * @param boolean $isImportant Is the !important flag is set |
1199 | 1199 | * @param boolean $isLast Is the declaration the last one of the ruleset |
1200 | - * @return void |
|
1200 | + * @return aCssToken |
|
1201 | 1201 | */ |
1202 | 1202 | public function __construct($property, $value, $mediaTypes = null, $isImportant = false, $isLast = false) |
1203 | 1203 | { |
@@ -1554,7 +1554,6 @@ discard block |
||
1554 | 1554 | /** |
1555 | 1555 | * Returns a plugin by class name. |
1556 | 1556 | * |
1557 | - * @param string $name Class name of the plugin |
|
1558 | 1557 | * @return aCssParserPlugin |
1559 | 1558 | */ |
1560 | 1559 | public function getPlugin($class) |
@@ -2004,7 +2003,7 @@ discard block |
||
2004 | 2003 | /** |
2005 | 2004 | * Returns a plugin by class name. |
2006 | 2005 | * |
2007 | - * @param string $name Class name of the plugin |
|
2006 | + * @param string $class |
|
2008 | 2007 | * @return aCssMinifierPlugin |
2009 | 2008 | */ |
2010 | 2009 | public function getPlugin($class) |
@@ -2481,7 +2480,7 @@ discard block |
||
2481 | 2480 | /** |
2482 | 2481 | * Implements {@link aCssParserPlugin::getTriggerChars()}. |
2483 | 2482 | * |
2484 | - * @return array |
|
2483 | + * @return string[] |
|
2485 | 2484 | */ |
2486 | 2485 | public function getTriggerChars() |
2487 | 2486 | { |
@@ -2491,7 +2490,7 @@ discard block |
||
2491 | 2490 | /** |
2492 | 2491 | * Implements {@link aCssParserPlugin::getTriggerStates()}. |
2493 | 2492 | * |
2494 | - * @return array |
|
2493 | + * @return boolean |
|
2495 | 2494 | */ |
2496 | 2495 | public function getTriggerStates() |
2497 | 2496 | { |
@@ -2577,7 +2576,9 @@ discard block |
||
2577 | 2576 | * |
2578 | 2577 | * @param string $message Error message |
2579 | 2578 | * @param string $source Corresponding line [optional] |
2580 | - * @return void |
|
2579 | + * @param string $file |
|
2580 | + * @param integer $line |
|
2581 | + * @return CssError |
|
2581 | 2582 | */ |
2582 | 2583 | public function __construct($file, $line, $message, $source = "") |
2583 | 2584 | { |
@@ -2652,7 +2653,7 @@ discard block |
||
2652 | 2653 | /** |
2653 | 2654 | * Implements {@link aMinifierPlugin::getTriggerTokens()} |
2654 | 2655 | * |
2655 | - * @return array |
|
2656 | + * @return string[] |
|
2656 | 2657 | */ |
2657 | 2658 | public function getTriggerTokens() |
2658 | 2659 | { |
@@ -2885,7 +2886,7 @@ discard block |
||
2885 | 2886 | /** |
2886 | 2887 | * Implements {@link aMinifierPlugin::getTriggerTokens()} |
2887 | 2888 | * |
2888 | - * @return array |
|
2889 | + * @return string[] |
|
2889 | 2890 | */ |
2890 | 2891 | public function getTriggerTokens() |
2891 | 2892 | { |
@@ -3192,7 +3193,7 @@ discard block |
||
3192 | 3193 | * declaratiopn property "-ms-filter". |
3193 | 3194 | * |
3194 | 3195 | * @param aCssToken $token |
3195 | - * @return array |
|
3196 | + * @return CssRulesetDeclarationToken[] |
|
3196 | 3197 | */ |
3197 | 3198 | private static function filter($token) |
3198 | 3199 | { |
@@ -3207,7 +3208,7 @@ discard block |
||
3207 | 3208 | * Transforms "opacity: {value}" into browser specific counterparts. |
3208 | 3209 | * |
3209 | 3210 | * @param aCssToken $token |
3210 | - * @return array |
|
3211 | + * @return CssRulesetDeclarationToken[] |
|
3211 | 3212 | */ |
3212 | 3213 | private static function opacity($token) |
3213 | 3214 | { |
@@ -3360,7 +3361,7 @@ discard block |
||
3360 | 3361 | /** |
3361 | 3362 | * Implements {@link aMinifierPlugin::getTriggerTokens()} |
3362 | 3363 | * |
3363 | - * @return array |
|
3364 | + * @return string[] |
|
3364 | 3365 | */ |
3365 | 3366 | public function getTriggerTokens() |
3366 | 3367 | { |
@@ -3526,7 +3527,7 @@ discard block |
||
3526 | 3527 | /** |
3527 | 3528 | * Implements {@link aMinifierPlugin::getTriggerTokens()} |
3528 | 3529 | * |
3529 | - * @return array |
|
3530 | + * @return string[] |
|
3530 | 3531 | */ |
3531 | 3532 | public function getTriggerTokens() |
3532 | 3533 | { |
@@ -3603,7 +3604,7 @@ discard block |
||
3603 | 3604 | /** |
3604 | 3605 | * Implements {@link aMinifierPlugin::getTriggerTokens()} |
3605 | 3606 | * |
3606 | - * @return array |
|
3607 | + * @return string[] |
|
3607 | 3608 | */ |
3608 | 3609 | public function getTriggerTokens() |
3609 | 3610 | { |
@@ -3651,7 +3652,7 @@ discard block |
||
3651 | 3652 | /** |
3652 | 3653 | * Implements {@link aMinifierPlugin::getTriggerTokens()} |
3653 | 3654 | * |
3654 | - * @return array |
|
3655 | + * @return string[] |
|
3655 | 3656 | */ |
3656 | 3657 | public function getTriggerTokens() |
3657 | 3658 | { |
@@ -3714,7 +3715,7 @@ discard block |
||
3714 | 3715 | /** |
3715 | 3716 | * Implements {@link aMinifierPlugin::getTriggerTokens()} |
3716 | 3717 | * |
3717 | - * @return array |
|
3718 | + * @return string[] |
|
3718 | 3719 | */ |
3719 | 3720 | public function getTriggerTokens() |
3720 | 3721 | { |
@@ -3749,7 +3750,7 @@ discard block |
||
3749 | 3750 | * Set the properties of a comment token. |
3750 | 3751 | * |
3751 | 3752 | * @param string $comment Comment including comment delimiters |
3752 | - * @return void |
|
3753 | + * @return aCssToken |
|
3753 | 3754 | */ |
3754 | 3755 | public function __construct($comment) |
3755 | 3756 | { |
@@ -3784,7 +3785,7 @@ discard block |
||
3784 | 3785 | /** |
3785 | 3786 | * Implements {@link aCssParserPlugin::getTriggerChars()}. |
3786 | 3787 | * |
3787 | - * @return array |
|
3788 | + * @return string[] |
|
3788 | 3789 | */ |
3789 | 3790 | public function getTriggerChars() |
3790 | 3791 | { |
@@ -3794,7 +3795,7 @@ discard block |
||
3794 | 3795 | /** |
3795 | 3796 | * Implements {@link aCssParserPlugin::getTriggerStates()}. |
3796 | 3797 | * |
3797 | - * @return array |
|
3798 | + * @return boolean |
|
3798 | 3799 | */ |
3799 | 3800 | public function getTriggerStates() |
3800 | 3801 | { |
@@ -3814,7 +3815,7 @@ discard block |
||
3814 | 3815 | * @param integer $index Current index |
3815 | 3816 | * @param string $char Current char |
3816 | 3817 | * @param string $previousChar Previous char |
3817 | - * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and |
|
3818 | + * @return boolean TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and |
|
3818 | 3819 | * break the processing |
3819 | 3820 | */ |
3820 | 3821 | public function parse($index, $char, $previousChar, $state) |
@@ -3859,7 +3860,7 @@ discard block |
||
3859 | 3860 | * Set the properties of a @variables at-rule token. |
3860 | 3861 | * |
3861 | 3862 | * @param array $mediaTypes Media types |
3862 | - * @return void |
|
3863 | + * @return aCssToken |
|
3863 | 3864 | */ |
3864 | 3865 | public function __construct($mediaTypes = null) |
3865 | 3866 | { |
@@ -3895,7 +3896,7 @@ discard block |
||
3895 | 3896 | /** |
3896 | 3897 | * Implements {@link aCssParserPlugin::getTriggerChars()}. |
3897 | 3898 | * |
3898 | - * @return array |
|
3899 | + * @return string[] |
|
3899 | 3900 | */ |
3900 | 3901 | public function getTriggerChars() |
3901 | 3902 | { |
@@ -3905,7 +3906,7 @@ discard block |
||
3905 | 3906 | /** |
3906 | 3907 | * Implements {@link aCssParserPlugin::getTriggerStates()}. |
3907 | 3908 | * |
3908 | - * @return array |
|
3909 | + * @return string[] |
|
3909 | 3910 | */ |
3910 | 3911 | public function getTriggerStates() |
3911 | 3912 | { |
@@ -4043,7 +4044,7 @@ discard block |
||
4043 | 4044 | * Sets the properties of the @page at-rule. |
4044 | 4045 | * |
4045 | 4046 | * @param string $selector Selector |
4046 | - * @return void |
|
4047 | + * @return aCssToken |
|
4047 | 4048 | */ |
4048 | 4049 | public function __construct($selector = "") |
4049 | 4050 | { |
@@ -4079,7 +4080,7 @@ discard block |
||
4079 | 4080 | /** |
4080 | 4081 | * Implements {@link aCssParserPlugin::getTriggerChars()}. |
4081 | 4082 | * |
4082 | - * @return array |
|
4083 | + * @return string[] |
|
4083 | 4084 | */ |
4084 | 4085 | public function getTriggerChars() |
4085 | 4086 | { |
@@ -4089,7 +4090,7 @@ discard block |
||
4089 | 4090 | /** |
4090 | 4091 | * Implements {@link aCssParserPlugin::getTriggerStates()}. |
4091 | 4092 | * |
4092 | - * @return array |
|
4093 | + * @return string[] |
|
4093 | 4094 | */ |
4094 | 4095 | public function getTriggerStates() |
4095 | 4096 | { |
@@ -4209,7 +4210,7 @@ discard block |
||
4209 | 4210 | * Sets the properties of the @media at-rule. |
4210 | 4211 | * |
4211 | 4212 | * @param array $mediaTypes Media types |
4212 | - * @return void |
|
4213 | + * @return aCssToken |
|
4213 | 4214 | */ |
4214 | 4215 | public function __construct(array $mediaTypes = []) |
4215 | 4216 | { |
@@ -4246,7 +4247,7 @@ discard block |
||
4246 | 4247 | /** |
4247 | 4248 | * Implements {@link aCssParserPlugin::getTriggerChars()}. |
4248 | 4249 | * |
4249 | - * @return array |
|
4250 | + * @return string[] |
|
4250 | 4251 | */ |
4251 | 4252 | public function getTriggerChars() |
4252 | 4253 | { |
@@ -4256,7 +4257,7 @@ discard block |
||
4256 | 4257 | /** |
4257 | 4258 | * Implements {@link aCssParserPlugin::getTriggerStates()}. |
4258 | 4259 | * |
4259 | - * @return array |
|
4260 | + * @return string[] |
|
4260 | 4261 | */ |
4261 | 4262 | public function getTriggerStates() |
4262 | 4263 | { |
@@ -4342,8 +4343,9 @@ discard block |
||
4342 | 4343 | /** |
4343 | 4344 | * Sets the properties of the @page at-rule. |
4344 | 4345 | * |
4345 | - * @param string $selector Selector |
|
4346 | - * @return void |
|
4346 | + * @param string $name |
|
4347 | + * @param string $atRuleName |
|
4348 | + * @return aCssToken |
|
4347 | 4349 | */ |
4348 | 4350 | public function __construct($name, $atRuleName = null) |
4349 | 4351 | { |
@@ -4386,8 +4388,8 @@ discard block |
||
4386 | 4388 | /** |
4387 | 4389 | * Set the properties of a ruleset token. |
4388 | 4390 | * |
4389 | - * @param array $selectors Selectors of the ruleset |
|
4390 | - * @return void |
|
4391 | + * @param string[] $selectors Selectors of the ruleset |
|
4392 | + * @return aCssToken |
|
4391 | 4393 | */ |
4392 | 4394 | public function __construct(array $selectors = []) |
4393 | 4395 | { |
@@ -4461,7 +4463,7 @@ discard block |
||
4461 | 4463 | /** |
4462 | 4464 | * Implements {@link aCssParserPlugin::getTriggerChars()}. |
4463 | 4465 | * |
4464 | - * @return array |
|
4466 | + * @return string[] |
|
4465 | 4467 | */ |
4466 | 4468 | public function getTriggerChars() |
4467 | 4469 | { |
@@ -4471,7 +4473,7 @@ discard block |
||
4471 | 4473 | /** |
4472 | 4474 | * Implements {@link aCssParserPlugin::getTriggerStates()}. |
4473 | 4475 | * |
4474 | - * @return array |
|
4476 | + * @return string[] |
|
4475 | 4477 | */ |
4476 | 4478 | public function getTriggerStates() |
4477 | 4479 | { |
@@ -4635,7 +4637,7 @@ discard block |
||
4635 | 4637 | * |
4636 | 4638 | * @param string $import Import path |
4637 | 4639 | * @param array $mediaTypes Media types |
4638 | - * @return void |
|
4640 | + * @return aCssToken |
|
4639 | 4641 | */ |
4640 | 4642 | public function __construct($import, $mediaTypes) |
4641 | 4643 | { |
@@ -4672,7 +4674,7 @@ discard block |
||
4672 | 4674 | /** |
4673 | 4675 | * Implements {@link aCssParserPlugin::getTriggerChars()}. |
4674 | 4676 | * |
4675 | - * @return array |
|
4677 | + * @return string[] |
|
4676 | 4678 | */ |
4677 | 4679 | public function getTriggerChars() |
4678 | 4680 | { |
@@ -4682,7 +4684,7 @@ discard block |
||
4682 | 4684 | /** |
4683 | 4685 | * Implements {@link aCssParserPlugin::getTriggerStates()}. |
4684 | 4686 | * |
4685 | - * @return array |
|
4687 | + * @return string[] |
|
4686 | 4688 | */ |
4687 | 4689 | public function getTriggerStates() |
4688 | 4690 | { |
@@ -4778,7 +4780,7 @@ discard block |
||
4778 | 4780 | /** |
4779 | 4781 | * Implements {@link aCssParserPlugin::getTriggerChars()}. |
4780 | 4782 | * |
4781 | - * @return array |
|
4783 | + * @return string[] |
|
4782 | 4784 | */ |
4783 | 4785 | public function getTriggerChars() |
4784 | 4786 | { |
@@ -4788,7 +4790,7 @@ discard block |
||
4788 | 4790 | /** |
4789 | 4791 | * Implements {@link aCssParserPlugin::getTriggerStates()}. |
4790 | 4792 | * |
4791 | - * @return array |
|
4793 | + * @return string[] |
|
4792 | 4794 | */ |
4793 | 4795 | public function getTriggerStates() |
4794 | 4796 | { |
@@ -4914,7 +4916,7 @@ discard block |
||
4914 | 4916 | * Set the properties of @charset at-rule token. |
4915 | 4917 | * |
4916 | 4918 | * @param string $charset Charset of the @charset at-rule token |
4917 | - * @return void |
|
4919 | + * @return aCssToken |
|
4918 | 4920 | */ |
4919 | 4921 | public function __construct($charset) |
4920 | 4922 | { |
@@ -4949,7 +4951,7 @@ discard block |
||
4949 | 4951 | /** |
4950 | 4952 | * Implements {@link aCssParserPlugin::getTriggerChars()}. |
4951 | 4953 | * |
4952 | - * @return array |
|
4954 | + * @return string[] |
|
4953 | 4955 | */ |
4954 | 4956 | public function getTriggerChars() |
4955 | 4957 | { |
@@ -4959,7 +4961,7 @@ discard block |
||
4959 | 4961 | /** |
4960 | 4962 | * Implements {@link aCssParserPlugin::getTriggerStates()}. |
4961 | 4963 | * |
4962 | - * @return array |
|
4964 | + * @return string[] |
|
4963 | 4965 | */ |
4964 | 4966 | public function getTriggerStates() |
4965 | 4967 | { |
@@ -118,6 +118,10 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | // apply all parsing routines |
121 | + |
|
122 | + /** |
|
123 | + * @param string $script |
|
124 | + */ |
|
121 | 125 | private function _pack($script) |
122 | 126 | { |
123 | 127 | for ($i = 0; isset($this->_parsers[$i]); $i++) { |
@@ -130,6 +134,9 @@ discard block |
||
130 | 134 | // keep a list of parsing functions, they'll be executed all at once |
131 | 135 | private $_parsers = []; |
132 | 136 | |
137 | + /** |
|
138 | + * @param string $parser |
|
139 | + */ |
|
133 | 140 | private function _addParser($parser) |
134 | 141 | { |
135 | 142 | $this->_parsers[] = $parser; |
@@ -225,6 +232,10 @@ discard block |
||
225 | 232 | } |
226 | 233 | } |
227 | 234 | |
235 | + /** |
|
236 | + * @param string $regexp |
|
237 | + * @param string $encode |
|
238 | + */ |
|
228 | 239 | private function _analyze($script, $regexp, $encode) |
229 | 240 | { |
230 | 241 | // analyse |
@@ -407,6 +418,10 @@ discard block |
||
407 | 418 | } |
408 | 419 | |
409 | 420 | // mmm.. ..which one do i need ?? |
421 | + |
|
422 | + /** |
|
423 | + * @param integer $ascii |
|
424 | + */ |
|
410 | 425 | private function _getEncoder($ascii) |
411 | 426 | { |
412 | 427 | return $ascii > 10 ? $ascii > 36 ? $ascii > 62 ? |
@@ -456,6 +471,9 @@ discard block |
||
456 | 471 | return $res . chr(($charCode % $this->_encoding) + 161); |
457 | 472 | } |
458 | 473 | |
474 | + /** |
|
475 | + * @param string $string |
|
476 | + */ |
|
459 | 477 | private function _safeRegExp($string) |
460 | 478 | { |
461 | 479 | return '/' . preg_replace('/\$/', '\\\$', $string) . '/'; |
@@ -487,6 +505,9 @@ discard block |
||
487 | 505 | return '\x' . ((string)dechex(ord($match))); |
488 | 506 | } |
489 | 507 | |
508 | + /** |
|
509 | + * @param string $aName |
|
510 | + */ |
|
490 | 511 | private function _getJSFunction($aName) |
491 | 512 | { |
492 | 513 | if (defined('self::JSFUNCTION' . $aName)) { |
@@ -611,6 +632,9 @@ discard block |
||
611 | 632 | private $QUOTE = '/\'/'; |
612 | 633 | private $DELETED = '/\\x01[^\\x01]*\\x01/';//g |
613 | 634 | |
635 | + /** |
|
636 | + * @param string $expression |
|
637 | + */ |
|
614 | 638 | public function add($expression, $replacement = '') |
615 | 639 | { |
616 | 640 | // count the number of sub-expressions |
@@ -761,6 +785,10 @@ discard block |
||
761 | 785 | private $buffer; |
762 | 786 | |
763 | 787 | // encode escaped characters |
788 | + |
|
789 | + /** |
|
790 | + * @param string $escapeChar |
|
791 | + */ |
|
764 | 792 | private function _escape($string, $escapeChar) |
765 | 793 | { |
766 | 794 | if ($escapeChar) { |
@@ -784,6 +812,10 @@ discard block |
||
784 | 812 | } |
785 | 813 | |
786 | 814 | // decode escaped characters |
815 | + |
|
816 | + /** |
|
817 | + * @param string $escapeChar |
|
818 | + */ |
|
787 | 819 | private function _unescape($string, $escapeChar) |
788 | 820 | { |
789 | 821 | if ($escapeChar) { |
@@ -815,6 +847,11 @@ discard block |
||
815 | 847 | return $this->buffer['escapeChar'] . $temp; |
816 | 848 | } |
817 | 849 | |
850 | + /** |
|
851 | + * @param string $string |
|
852 | + * |
|
853 | + * @return string |
|
854 | + */ |
|
818 | 855 | private function _internalEscape($string) |
819 | 856 | { |
820 | 857 | return preg_replace($this->ESCAPE, '', $string); |
@@ -89,6 +89,9 @@ discard block |
||
89 | 89 | |
90 | 90 | class qrstr |
91 | 91 | { |
92 | + /** |
|
93 | + * @param string $repl |
|
94 | + */ |
|
92 | 95 | public static function set(&$srctab, $x, $y, $repl, $replLen = false) |
93 | 96 | { |
94 | 97 | $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false) ? substr($repl, 0, $replLen) : $repl, $x, |
@@ -219,6 +222,10 @@ discard block |
||
219 | 222 | } |
220 | 223 | |
221 | 224 | //---------------------------------------------------------------------- |
225 | + |
|
226 | + /** |
|
227 | + * @param boolean $outfile |
|
228 | + */ |
|
222 | 229 | public static function log($outfile, $err) |
223 | 230 | { |
224 | 231 | if (QR_LOG_DIR !== false) { |
@@ -245,6 +252,10 @@ discard block |
||
245 | 252 | } |
246 | 253 | |
247 | 254 | //---------------------------------------------------------------------- |
255 | + |
|
256 | + /** |
|
257 | + * @param string $markerId |
|
258 | + */ |
|
248 | 259 | public static function markTime($markerId) |
249 | 260 | { |
250 | 261 | list($usec, $sec) = explode(" ", microtime()); |
@@ -397,18 +408,30 @@ discard block |
||
397 | 408 | } |
398 | 409 | |
399 | 410 | //---------------------------------------------------------------------- |
411 | + |
|
412 | + /** |
|
413 | + * @param integer $version |
|
414 | + */ |
|
400 | 415 | public static function getWidth($version) |
401 | 416 | { |
402 | 417 | return self::$capacity[$version][QRCAP_WIDTH]; |
403 | 418 | } |
404 | 419 | |
405 | 420 | //---------------------------------------------------------------------- |
421 | + |
|
422 | + /** |
|
423 | + * @param integer $version |
|
424 | + */ |
|
406 | 425 | public static function getRemainder($version) |
407 | 426 | { |
408 | 427 | return self::$capacity[$version][QRCAP_REMINDER]; |
409 | 428 | } |
410 | 429 | |
411 | 430 | //---------------------------------------------------------------------- |
431 | + |
|
432 | + /** |
|
433 | + * @param integer $size |
|
434 | + */ |
|
412 | 435 | public static function getMinimumVersion($size, $level) |
413 | 436 | { |
414 | 437 | |
@@ -529,6 +552,9 @@ discard block |
||
529 | 552 | //---------------------------------------------------------------------- |
530 | 553 | // CACHEABLE!!! |
531 | 554 | |
555 | + /** |
|
556 | + * @param integer $version |
|
557 | + */ |
|
532 | 558 | public static function getEccSpec($version, $level, array &$spec) |
533 | 559 | { |
534 | 560 | if (count($spec) < 5) { |
@@ -935,12 +961,20 @@ discard block |
||
935 | 961 | } |
936 | 962 | |
937 | 963 | //---------------------------------------------------------------------- |
964 | + |
|
965 | + /** |
|
966 | + * @param string $code |
|
967 | + */ |
|
938 | 968 | public static function unserial($code) |
939 | 969 | { |
940 | 970 | return explode("\n", gzuncompress($code)); |
941 | 971 | } |
942 | 972 | |
943 | 973 | //---------------------------------------------------------------------- |
974 | + |
|
975 | + /** |
|
976 | + * @param integer $version |
|
977 | + */ |
|
944 | 978 | public static function newFrame($version) |
945 | 979 | { |
946 | 980 | if ($version < 1 || $version > QRSPEC_VERSION_MAX) { |
@@ -1354,6 +1388,10 @@ discard block |
||
1354 | 1388 | } |
1355 | 1389 | |
1356 | 1390 | //---------------------------------------------------------------------- |
1391 | + |
|
1392 | + /** |
|
1393 | + * @param integer $version |
|
1394 | + */ |
|
1357 | 1395 | public function encodeBitStream($version) |
1358 | 1396 | { |
1359 | 1397 | try { |
@@ -1444,6 +1482,10 @@ discard block |
||
1444 | 1482 | } |
1445 | 1483 | |
1446 | 1484 | //---------------------------------------------------------------------- |
1485 | + |
|
1486 | + /** |
|
1487 | + * @param integer $version |
|
1488 | + */ |
|
1447 | 1489 | public function setVersion($version) |
1448 | 1490 | { |
1449 | 1491 | if ($version < 0 || $version > QRSPEC_VERSION_MAX) { |
@@ -1484,6 +1526,12 @@ discard block |
||
1484 | 1526 | } |
1485 | 1527 | |
1486 | 1528 | //---------------------------------------------------------------------- |
1529 | + |
|
1530 | + /** |
|
1531 | + * @param QRinput $mode |
|
1532 | + * @param integer $size |
|
1533 | + * @param integer $data |
|
1534 | + */ |
|
1487 | 1535 | public function append($mode, $size, $data) |
1488 | 1536 | { |
1489 | 1537 | try { |
@@ -1701,6 +1749,10 @@ discard block |
||
1701 | 1749 | ]; |
1702 | 1750 | |
1703 | 1751 | //---------------------------------------------------------------------- |
1752 | + |
|
1753 | + /** |
|
1754 | + * @param integer $c |
|
1755 | + */ |
|
1704 | 1756 | public static function lookAnTable($c) |
1705 | 1757 | { |
1706 | 1758 | return (($c > 127) ? -1 : self::$anTable[$c]); |
@@ -1798,6 +1850,10 @@ discard block |
||
1798 | 1850 | } |
1799 | 1851 | |
1800 | 1852 | //---------------------------------------------------------------------- |
1853 | + |
|
1854 | + /** |
|
1855 | + * @param integer $version |
|
1856 | + */ |
|
1801 | 1857 | public function estimateBitStreamSize($version) |
1802 | 1858 | { |
1803 | 1859 | $bits = 0; |
@@ -1927,6 +1983,10 @@ discard block |
||
1927 | 1983 | } |
1928 | 1984 | |
1929 | 1985 | //---------------------------------------------------------------------- |
1986 | + |
|
1987 | + /** |
|
1988 | + * @param QRbitstream $bstream |
|
1989 | + */ |
|
1930 | 1990 | public function appendPaddingBit(&$bstream) |
1931 | 1991 | { |
1932 | 1992 | $bits = $bstream->size(); |
@@ -2252,6 +2312,10 @@ discard block |
||
2252 | 2312 | public $modeHint; |
2253 | 2313 | |
2254 | 2314 | //---------------------------------------------------------------------- |
2315 | + |
|
2316 | + /** |
|
2317 | + * @param QRinput $input |
|
2318 | + */ |
|
2255 | 2319 | public function __construct($dataStr, $input, $modeHint) |
2256 | 2320 | { |
2257 | 2321 | $this->dataStr = $dataStr; |
@@ -2260,6 +2324,10 @@ discard block |
||
2260 | 2324 | } |
2261 | 2325 | |
2262 | 2326 | //---------------------------------------------------------------------- |
2327 | + |
|
2328 | + /** |
|
2329 | + * @param string $str |
|
2330 | + */ |
|
2263 | 2331 | public static function isdigitat($str, $pos) |
2264 | 2332 | { |
2265 | 2333 | if ($pos >= strlen($str)) { |
@@ -2270,6 +2338,10 @@ discard block |
||
2270 | 2338 | } |
2271 | 2339 | |
2272 | 2340 | //---------------------------------------------------------------------- |
2341 | + |
|
2342 | + /** |
|
2343 | + * @param string $str |
|
2344 | + */ |
|
2273 | 2345 | public static function isalnumat($str, $pos) |
2274 | 2346 | { |
2275 | 2347 | if ($pos >= strlen($str)) { |
@@ -2397,6 +2469,10 @@ discard block |
||
2397 | 2469 | } |
2398 | 2470 | |
2399 | 2471 | //---------------------------------------------------------------------- |
2472 | + |
|
2473 | + /** |
|
2474 | + * @return integer |
|
2475 | + */ |
|
2400 | 2476 | public function eatKanji() |
2401 | 2477 | { |
2402 | 2478 | $p = 0; |
@@ -2756,6 +2832,13 @@ discard block |
||
2756 | 2832 | public static $items = []; |
2757 | 2833 | |
2758 | 2834 | //---------------------------------------------------------------------- |
2835 | + |
|
2836 | + /** |
|
2837 | + * @param integer $symsize |
|
2838 | + * @param integer $gfpoly |
|
2839 | + * @param integer $fcr |
|
2840 | + * @param integer $prim |
|
2841 | + */ |
|
2759 | 2842 | public static function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) |
2760 | 2843 | { |
2761 | 2844 | foreach (self::$items as $rs) { |
@@ -2949,6 +3032,10 @@ discard block |
||
2949 | 3032 | } |
2950 | 3033 | |
2951 | 3034 | //---------------------------------------------------------------------- |
3035 | + |
|
3036 | + /** |
|
3037 | + * @param string $code |
|
3038 | + */ |
|
2952 | 3039 | public static function unserial($code) |
2953 | 3040 | { |
2954 | 3041 | $codeArr = []; |
@@ -3012,6 +3099,10 @@ discard block |
||
3012 | 3099 | } |
3013 | 3100 | |
3014 | 3101 | //---------------------------------------------------------------------- |
3102 | + |
|
3103 | + /** |
|
3104 | + * @param integer $length |
|
3105 | + */ |
|
3015 | 3106 | public function calcN1N3($length) |
3016 | 3107 | { |
3017 | 3108 | $demerit = 0; |
@@ -3333,6 +3424,10 @@ discard block |
||
3333 | 3424 | public $data; |
3334 | 3425 | |
3335 | 3426 | //---------------------------------------------------------------------- |
3427 | + |
|
3428 | + /** |
|
3429 | + * @param integer $mask |
|
3430 | + */ |
|
3336 | 3431 | public function encodeMask(QRinput $input, $mask) |
3337 | 3432 | { |
3338 | 3433 | if ($input->getVersion() < 0 || $input->getVersion() > QRSPEC_VERSION_MAX) { |
@@ -3414,6 +3509,11 @@ discard block |
||
3414 | 3509 | } |
3415 | 3510 | |
3416 | 3511 | //---------------------------------------------------------------------- |
3512 | + |
|
3513 | + /** |
|
3514 | + * @param integer $version |
|
3515 | + * @param integer $level |
|
3516 | + */ |
|
3417 | 3517 | public function encodeString8bit($string, $version, $level) |
3418 | 3518 | { |
3419 | 3519 | if (string == null) { |
@@ -3438,6 +3538,12 @@ discard block |
||
3438 | 3538 | } |
3439 | 3539 | |
3440 | 3540 | //---------------------------------------------------------------------- |
3541 | + |
|
3542 | + /** |
|
3543 | + * @param integer $version |
|
3544 | + * @param integer $level |
|
3545 | + * @param boolean $casesensitive |
|
3546 | + */ |
|
3441 | 3547 | public function encodeString($string, $version, $level, $hint, $casesensitive) |
3442 | 3548 | { |
3443 | 3549 | |
@@ -3461,6 +3567,10 @@ discard block |
||
3461 | 3567 | } |
3462 | 3568 | |
3463 | 3569 | //---------------------------------------------------------------------- |
3570 | + |
|
3571 | + /** |
|
3572 | + * @param integer $level |
|
3573 | + */ |
|
3464 | 3574 | public static function png( |
3465 | 3575 | $text, |
3466 | 3576 | $outfile = false, |
@@ -127,6 +127,9 @@ |
||
127 | 127 | Ajde_Cache::getInstance()->updateHash($this->hash()); |
128 | 128 | } |
129 | 129 | |
130 | + /** |
|
131 | + * @param string $name |
|
132 | + */ |
|
130 | 133 | public function setModel($name, $object) |
131 | 134 | { |
132 | 135 | $this->set($name, serialize($object)); |
@@ -17,7 +17,7 @@ |
||
17 | 17 | |
18 | 18 | /** |
19 | 19 | * |
20 | - * @return UserModel |
|
20 | + * @return boolean |
|
21 | 21 | */ |
22 | 22 | public function loadCurrent() |
23 | 23 | { |
@@ -45,6 +45,10 @@ discard block |
||
45 | 45 | return $cart; |
46 | 46 | } |
47 | 47 | |
48 | + /** |
|
49 | + * @param string $entity |
|
50 | + * @param integer $id |
|
51 | + */ |
|
48 | 52 | public function load($entity, $id) |
49 | 53 | { |
50 | 54 | return $this->loadByFields([ |
@@ -59,11 +63,17 @@ discard block |
||
59 | 63 | return (int)parent::getQty(); |
60 | 64 | } |
61 | 65 | |
66 | + /** |
|
67 | + * @param integer $qty |
|
68 | + */ |
|
62 | 69 | public function addQty($qty) |
63 | 70 | { |
64 | 71 | $this->setQty($this->getQty() + (int)$qty); |
65 | 72 | } |
66 | 73 | |
74 | + /** |
|
75 | + * @param string $entityName |
|
76 | + */ |
|
67 | 77 | public function setEntityById($entityName, $id) |
68 | 78 | { |
69 | 79 | try { |
@@ -107,7 +117,7 @@ discard block |
||
107 | 117 | |
108 | 118 | /** |
109 | 119 | * |
110 | - * @param string $entity |
|
120 | + * @param string $entityName |
|
111 | 121 | * @return Ajde_Model |
112 | 122 | */ |
113 | 123 | protected function _getEntityModel($entityName) |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
71 | - * @param $rest_resource |
|
72 | - * @param $body |
|
71 | + * @param string $rest_resource |
|
72 | + * @param string $body |
|
73 | 73 | * |
74 | 74 | * @return object |
75 | 75 | */ |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | /** |
84 | 84 | * Retrieves a single object from the REST API. |
85 | 85 | * |
86 | - * @param $rest_resource |
|
86 | + * @param string $rest_resource |
|
87 | 87 | * @param string $id Id of the object to retrieve. |
88 | 88 | * |
89 | 89 | * @return object |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | /** |
100 | 100 | * Get a collection of objects from the REST API. |
101 | 101 | * |
102 | - * @param $rest_resource |
|
102 | + * @param string $rest_resource |
|
103 | 103 | * @param int $offset |
104 | 104 | * @param int $limit |
105 | 105 | * |