@@ -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, |
@@ -85,6 +85,9 @@ discard block |
||
| 85 | 85 | } |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | + /** |
|
| 89 | + * @param string $file |
|
| 90 | + */ |
|
| 88 | 91 | private function getWriteableCacheFile($file) |
| 89 | 92 | { |
| 90 | 93 | return $this->getCacheFile($file, true); |
@@ -95,6 +98,9 @@ discard block |
||
| 95 | 98 | return $this->getCacheDir($file, $forWrite) . '/' . md5($file); |
| 96 | 99 | } |
| 97 | 100 | |
| 101 | + /** |
|
| 102 | + * @param boolean $forWrite |
|
| 103 | + */ |
|
| 98 | 104 | private function getCacheDir($file, $forWrite) |
| 99 | 105 | { |
| 100 | 106 | // use the first 2 characters of the hash as a directory prefix |
@@ -110,11 +116,17 @@ discard block |
||
| 110 | 116 | return $storageDir; |
| 111 | 117 | } |
| 112 | 118 | |
| 119 | + /** |
|
| 120 | + * @param string $storageFile |
|
| 121 | + */ |
|
| 113 | 122 | private function acquireReadLock($storageFile) |
| 114 | 123 | { |
| 115 | 124 | return $this->acquireLock(LOCK_SH, $storageFile); |
| 116 | 125 | } |
| 117 | 126 | |
| 127 | + /** |
|
| 128 | + * @param string $storageFile |
|
| 129 | + */ |
|
| 118 | 130 | private function acquireWriteLock($storageFile) |
| 119 | 131 | { |
| 120 | 132 | $rc = $this->acquireLock(LOCK_EX, $storageFile); |
@@ -125,6 +137,9 @@ discard block |
||
| 125 | 137 | return $rc; |
| 126 | 138 | } |
| 127 | 139 | |
| 140 | + /** |
|
| 141 | + * @param integer $type |
|
| 142 | + */ |
|
| 128 | 143 | private function acquireLock($type, $storageFile) |
| 129 | 144 | { |
| 130 | 145 | $mode = $type == LOCK_EX ? "w" : "r"; |
@@ -141,6 +156,9 @@ discard block |
||
| 141 | 156 | return true; |
| 142 | 157 | } |
| 143 | 158 | |
| 159 | + /** |
|
| 160 | + * @param string $storageFile |
|
| 161 | + */ |
|
| 144 | 162 | public function unlock($storageFile) |
| 145 | 163 | { |
| 146 | 164 | if ($this->fh) { |
@@ -178,7 +178,7 @@ |
||
| 178 | 178 | * Used by the IO lib and also the batch processing. |
| 179 | 179 | * |
| 180 | 180 | * @param $respData |
| 181 | - * @param $headerSize |
|
| 181 | + * @param boolean $headerSize |
|
| 182 | 182 | * @return array |
| 183 | 183 | */ |
| 184 | 184 | public function parseHttpResponse($respData, $headerSize) |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | /** |
| 41 | 41 | * Execute a apiHttpRequest |
| 42 | 42 | * |
| 43 | - * @param Google_HttpRequest $request the http request to be executed |
|
| 43 | + * @param Google_Http_Request $request the http request to be executed |
|
| 44 | 44 | * @return Google_HttpRequest http request with the response http code, |
| 45 | 45 | * response headers and response body filled in |
| 46 | 46 | * @throws Google_IOException on curl or IO error |
@@ -146,6 +146,9 @@ discard block |
||
| 146 | 146 | // NO-OP |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | + /** |
|
| 150 | + * @return integer |
|
| 151 | + */ |
|
| 149 | 152 | private function getHttpResponseCode($response_headers) |
| 150 | 153 | { |
| 151 | 154 | $header_count = count($response_headers); |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | /** |
| 117 | 117 | * Given a variable name, discover its type. |
| 118 | 118 | * |
| 119 | - * @param $name |
|
| 119 | + * @param string $name |
|
| 120 | 120 | * @param $item |
| 121 | 121 | * @return object The object from the item. |
| 122 | 122 | */ |