@@ -27,6 +27,10 @@ discard block |
||
27 | 27 | private $privateKey; |
28 | 28 | |
29 | 29 | // Creates a new signer from a .p12 file. |
30 | + |
|
31 | + /** |
|
32 | + * @param string $password |
|
33 | + */ |
|
30 | 34 | function __construct($p12, $password) { |
31 | 35 | if (!function_exists('openssl_x509_read')) { |
32 | 36 | throw new Exception( |
@@ -57,6 +61,9 @@ discard block |
||
57 | 61 | } |
58 | 62 | } |
59 | 63 | |
64 | + /** |
|
65 | + * @param string $data |
|
66 | + */ |
|
60 | 67 | function sign($data) { |
61 | 68 | if(version_compare(PHP_VERSION, '5.3.0') < 0) { |
62 | 69 | throw new Google_AuthException( |
@@ -51,8 +51,8 @@ |
||
51 | 51 | * Verifies the signature on data. |
52 | 52 | * |
53 | 53 | * Returns true if the signature is valid, false otherwise. |
54 | - * @param $data |
|
55 | - * @param $signature |
|
54 | + * @param string $data |
|
55 | + * @param string $signature |
|
56 | 56 | * @throws Google_AuthException |
57 | 57 | * @return bool |
58 | 58 | */ |
@@ -37,6 +37,9 @@ discard block |
||
37 | 37 | return file_exists($storageFile . '.lock'); |
38 | 38 | } |
39 | 39 | |
40 | + /** |
|
41 | + * @param string $storageFile |
|
42 | + */ |
|
40 | 43 | private function createLock($storageFile) { |
41 | 44 | $storageDir = dirname($storageFile); |
42 | 45 | if (! is_dir($storageDir)) { |
@@ -57,6 +60,9 @@ discard block |
||
57 | 60 | @unlink($storageFile . '.lock'); |
58 | 61 | } |
59 | 62 | |
63 | + /** |
|
64 | + * @param string $storageFile |
|
65 | + */ |
|
60 | 66 | private function waitForLock($storageFile) { |
61 | 67 | // 20 x 250 = 5 seconds |
62 | 68 | $tries = 20; |
@@ -81,6 +87,9 @@ discard block |
||
81 | 87 | return $this->path . '/' . substr($hash, 0, 2); |
82 | 88 | } |
83 | 89 | |
90 | + /** |
|
91 | + * @param string $hash |
|
92 | + */ |
|
84 | 93 | private function getCacheFile($hash) { |
85 | 94 | return $this->getCacheDir($hash) . '/' . $hash; |
86 | 95 | } |
@@ -93,7 +93,7 @@ |
||
93 | 93 | * Retrieves the authenticated user's list of accounts. (accounts.list) |
94 | 94 | * |
95 | 95 | * @param array $optParams Optional parameters. |
96 | - * @return Google_AccountsList |
|
96 | + * @return Google_Accounts |
|
97 | 97 | */ |
98 | 98 | public function listAccounts($optParams = array()) { |
99 | 99 | $params = array(); |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | * @opt_param string filter Filters to be run on the report. |
213 | 213 | * @opt_param string startIndex Index of the first row of report data to return. |
214 | 214 | * @opt_param string dimension Dimensions to base the report on. |
215 | - * @return Google_Report |
|
215 | + * @return Google_AdsenseReportsGenerateResponse |
|
216 | 216 | */ |
217 | 217 | public function generate($endDate, $startDate, $optParams = array()) { |
218 | 218 | $params = array('endDate' => $endDate, 'startDate' => $startDate); |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | /** |
258 | 258 | * Get information about the selected associated AdSense account. (accounts.get) |
259 | 259 | * |
260 | - * @param string $accountId Account to get information about. |
|
260 | + * @param integer $accountId Account to get information about. |
|
261 | 261 | * @param array $optParams Optional parameters. |
262 | 262 | * @return Google_Account |
263 | 263 | */ |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | * @opt_param string filter Filters to be run on the report. |
506 | 506 | * @opt_param string startIndex Index of the first row of report data to return. |
507 | 507 | * @opt_param string dimension Dimensions to base the report on. |
508 | - * @return Google_Report |
|
508 | + * @return Google_AdsenseReportsGenerateResponse |
|
509 | 509 | */ |
510 | 510 | public function generate($accountId, $startDate, $endDate, $optParams = array()) { |
511 | 511 | $params = array('accountId' => $accountId, 'startDate' => $startDate, 'endDate' => $endDate); |
@@ -241,7 +241,7 @@ |
||
241 | 241 | /** |
242 | 242 | * Get information about the selected AdSense account. (accounts.get) |
243 | 243 | * |
244 | - * @param string $accountId Account to get information about. |
|
244 | + * @param integer $accountId Account to get information about. |
|
245 | 245 | * @param array $optParams Optional parameters. |
246 | 246 | * |
247 | 247 | * @opt_param bool tree Whether the tree of sub accounts should be returned. |
@@ -319,7 +319,7 @@ |
||
319 | 319 | * @opt_param string maxResults Maximum number of comments to include in the result. |
320 | 320 | * @opt_param string pageToken Continuation token if request is paged. |
321 | 321 | * @opt_param bool fetchBodies Whether the body content of the comments is included. |
322 | - * @return Google_CommentList |
|
322 | + * @return Google_CommentFeed |
|
323 | 323 | */ |
324 | 324 | public function listComments($blogId, $postId, $optParams = array()) { |
325 | 325 | $params = array('blogId' => $blogId, 'postId' => $postId); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | * @opt_param string pageToken A continuation token that allows pagination. |
124 | 124 | * @opt_param string maxResults The maximum number of activities to include in the response. |
125 | 125 | * @opt_param string hl Specifies the interface language (host language) of your user interface. |
126 | - * @return Google_ActivityList |
|
126 | + * @return Google_ActivityFeed |
|
127 | 127 | */ |
128 | 128 | public function listActivities($userId, $collection, $optParams = array()) { |
129 | 129 | $params = array('userId' => $userId, 'collection' => $collection); |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | * Retrieves an existing comment. (comments.get) |
446 | 446 | * |
447 | 447 | * @param string $commentId ID of the comment to get. |
448 | - * @param array $optParams Optional parameters. |
|
448 | + * @param string $optParams Optional parameters. |
|
449 | 449 | * |
450 | 450 | * @opt_param string hl Specifies the interface language (host language) of your user interface. |
451 | 451 | * @return Google_Comment |
@@ -464,13 +464,13 @@ discard block |
||
464 | 464 | * Retrieves a list of comments, possibly filtered. (comments.list) |
465 | 465 | * |
466 | 466 | * @param string $activityId The ID of the activity containing the comments. |
467 | - * @param array $optParams Optional parameters. |
|
467 | + * @param string $optParams Optional parameters. |
|
468 | 468 | * |
469 | 469 | * @opt_param string orderBy Sort search results. |
470 | 470 | * @opt_param string pageToken A continuation token that allows pagination. |
471 | 471 | * @opt_param string maxResults The maximum number of activities to include in the response. |
472 | 472 | * @opt_param string hl Specifies the interface language (host language) of your user interface. |
473 | - * @return Google_CommentList |
|
473 | + * @return Google_CommentFeed |
|
474 | 474 | */ |
475 | 475 | public function listComments($activityId, $optParams = array()) { |
476 | 476 | $params = array('activityId' => $activityId); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | * List all of the comments for an activity. (comments.list) |
103 | 103 | * |
104 | 104 | * @param string $activityId The ID of the activity to get comments for. |
105 | - * @param array $optParams Optional parameters. |
|
105 | + * @param string $optParams Optional parameters. |
|
106 | 106 | * |
107 | 107 | * @opt_param string pageToken The continuation token, used to page through large result sets. To get the next page of results, set this parameter to the value of "nextPageToken" from the previous response. |
108 | 108 | * @opt_param string maxResults The maximum number of comments to include in the response, used for paging. For any response, the actual number returned may be less than the specified maxResults. |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | * Get a comment. (comments.get) |
124 | 124 | * |
125 | 125 | * @param string $commentId The ID of the comment to get. |
126 | - * @param array $optParams Optional parameters. |
|
126 | + * @param string $optParams Optional parameters. |
|
127 | 127 | * @return Google_Comment |
128 | 128 | */ |
129 | 129 | public function get($commentId, $optParams = array()) { |