@@ -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; |
@@ -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); |
@@ -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 | * |
@@ -275,6 +275,9 @@ discard block |
||
275 | 275 | } |
276 | 276 | } |
277 | 277 | |
278 | + /** |
|
279 | + * @param string $status |
|
280 | + */ |
|
278 | 281 | private static function isPaid($status) |
279 | 282 | { |
280 | 283 | $status = strtolower($status); |
@@ -285,6 +288,9 @@ discard block |
||
285 | 288 | } |
286 | 289 | } |
287 | 290 | |
291 | + /** |
|
292 | + * @param string $status |
|
293 | + */ |
|
288 | 294 | private static function isRefused($status) |
289 | 295 | { |
290 | 296 | $status = strtolower($status); |
@@ -309,6 +315,10 @@ discard block |
||
309 | 315 | return $xml; |
310 | 316 | } |
311 | 317 | |
318 | + /** |
|
319 | + * @param DOMElement $element |
|
320 | + * @param DOMDocument $xml |
|
321 | + */ |
|
312 | 322 | private static function appendData(&$element, $xml, $data) |
313 | 323 | { |
314 | 324 | foreach ($data as $k => $v) { |
@@ -581,7 +581,7 @@ |
||
581 | 581 | * Get the UID of the connected user, or 0 |
582 | 582 | * if the Facebook user is not connected. |
583 | 583 | * |
584 | - * @return string the UID if available. |
|
584 | + * @return integer the UID if available. |
|
585 | 585 | */ |
586 | 586 | public function getUser() |
587 | 587 | { |
@@ -467,7 +467,7 @@ |
||
467 | 467 | * @param $required_audience the expected consumer of the token |
468 | 468 | * @param [$issuer] the expected issues, defaults to Google |
469 | 469 | * @param [$max_expiry] the max lifetime of a token, defaults to MAX_TOKEN_LIFETIME_SECS |
470 | - * @return token information if valid, false if not |
|
470 | + * @return Google_Auth_LoginTicket information if valid, false if not |
|
471 | 471 | */ |
472 | 472 | public function verifySignedJwtWithCerts( |
473 | 473 | $jwt, |