@@ -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) { |
@@ -108,6 +108,7 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | /** |
| 110 | 110 | * Adds the scopes available for a service |
| 111 | + * @param string $service |
|
| 111 | 112 | */ |
| 112 | 113 | public function addService($service, $version = false, $availableScopes = []) |
| 113 | 114 | { |
@@ -178,7 +179,7 @@ discard block |
||
| 178 | 179 | } |
| 179 | 180 | |
| 180 | 181 | /** |
| 181 | - * @return array |
|
| 182 | + * @return string |
|
| 182 | 183 | * @visible For Testing |
| 183 | 184 | */ |
| 184 | 185 | public function prepareScopes() |
@@ -223,7 +224,6 @@ discard block |
||
| 223 | 224 | /** |
| 224 | 225 | * Set the IO object |
| 225 | 226 | * |
| 226 | - * @param Google_Io_Abstract $auth |
|
| 227 | 227 | */ |
| 228 | 228 | public function setIo(Google_Io_Abstract $io) |
| 229 | 229 | { |
@@ -234,7 +234,6 @@ discard block |
||
| 234 | 234 | /** |
| 235 | 235 | * Set the Cache object |
| 236 | 236 | * |
| 237 | - * @param Google_Cache_Abstract $auth |
|
| 238 | 237 | */ |
| 239 | 238 | public function setCache(Google_Cache_Abstract $cache) |
| 240 | 239 | { |
@@ -425,7 +424,7 @@ discard block |
||
| 425 | 424 | * @param $required_audience the expected consumer of the token |
| 426 | 425 | * @param [$issuer] the expected issues, defaults to Google |
| 427 | 426 | * @param [$max_expiry] the max lifetime of a token, defaults to MAX_TOKEN_LIFETIME_SECS |
| 428 | - * @return token information if valid, false if not |
|
| 427 | + * @return Google_Auth_LoginTicket information if valid, false if not |
|
| 429 | 428 | */ |
| 430 | 429 | public function verifySignedJwt($id_token, $cert_location, $audience, $issuer, $max_expiry = null) |
| 431 | 430 | { |
@@ -449,7 +448,7 @@ discard block |
||
| 449 | 448 | * so that you can ask for more or less permission in the auth flow |
| 450 | 449 | * Set this before you call authenticate() though! |
| 451 | 450 | * |
| 452 | - * @param array $scopes , ie: array('https://www.googleapis.com/auth/plus.me', |
|
| 451 | + * @param string $scopes , ie: array('https://www.googleapis.com/auth/plus.me', |
|
| 453 | 452 | * 'https://www.googleapis.com/auth/moderator') |
| 454 | 453 | */ |
| 455 | 454 | public function setScopes($scopes) |
@@ -545,7 +544,7 @@ discard block |
||
| 545 | 544 | * Retrieve custom configuration for a specific class. |
| 546 | 545 | * |
| 547 | 546 | * @param $class string|object - class or instance of class to retrieve |
| 548 | - * @param $key string optional - key to retrieve |
|
| 547 | + * @param string $key string optional - key to retrieve |
|
| 549 | 548 | */ |
| 550 | 549 | public function getClassConfig($class, $key = null) |
| 551 | 550 | { |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | /** |
| 100 | 100 | * Set the base URL that query parameters will be added to. |
| 101 | 101 | * |
| 102 | - * @param $baseUrl string |
|
| 102 | + * @param string $baseUrl string |
|
| 103 | 103 | */ |
| 104 | 104 | public function setBaseUrl($baseUrl) |
| 105 | 105 | { |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | /** |
| 132 | 132 | * Set a new query parameter. |
| 133 | 133 | * |
| 134 | - * @param $key - string to set, does not need to be URL encoded |
|
| 134 | + * @param string $key - string to set, does not need to be URL encoded |
|
| 135 | 135 | * @param $value - string to set, does not need to be URL encoded |
| 136 | 136 | */ |
| 137 | 137 | public function setQueryParam($key, $value) |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | /** |
| 143 | - * @return string HTTP Response Code. |
|
| 143 | + * @return integer HTTP Response Code. |
|
| 144 | 144 | */ |
| 145 | 145 | public function getResponseHttpCode() |
| 146 | 146 | { |
@@ -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 | */ |
@@ -500,7 +500,7 @@ |
||
| 500 | 500 | * authenticated user. |
| 501 | 501 | * @param string $collection |
| 502 | 502 | * The collection to which to write moments. |
| 503 | - * @param Google_Moment $postBody |
|
| 503 | + * @param Google_Service_Plus_Moment $postBody |
|
| 504 | 504 | * @param array $optParams Optional parameters. |
| 505 | 505 | * |
| 506 | 506 | * @opt_param bool debug |