@@ -35,6 +35,9 @@ |
||
| 35 | 35 | '%40', '%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C', |
| 36 | 36 | '%3B', '%3D']; |
| 37 | 37 | |
| 38 | + /** |
|
| 39 | + * @param string $template |
|
| 40 | + */ |
|
| 38 | 41 | public function expand($template, array $variables) |
| 39 | 42 | { |
| 40 | 43 | if (false === strpos($template, '{')) { |
@@ -118,6 +118,9 @@ discard block |
||
| 118 | 118 | $this->settle(self::REJECTED, $reason); |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | + /** |
|
| 122 | + * @param string $state |
|
| 123 | + */ |
|
| 121 | 124 | private function settle($state, $value) |
| 122 | 125 | { |
| 123 | 126 | if ($this->state !== self::PENDING) { |
@@ -164,11 +167,19 @@ discard block |
||
| 164 | 167 | } else { |
| 165 | 168 | // Resolve the handlers when the forwarded promise is resolved. |
| 166 | 169 | $value->then( |
| 170 | + |
|
| 171 | + /** |
|
| 172 | + * @param string $value |
|
| 173 | + */ |
|
| 167 | 174 | static function ($value) use ($handlers) { |
| 168 | 175 | foreach ($handlers as $handler) { |
| 169 | 176 | self::callHandler(1, $value, $handler); |
| 170 | 177 | } |
| 171 | 178 | }, |
| 179 | + |
|
| 180 | + /** |
|
| 181 | + * @param string $reason |
|
| 182 | + */ |
|
| 172 | 183 | static function ($reason) use ($handlers) { |
| 173 | 184 | foreach ($handlers as $handler) { |
| 174 | 185 | self::callHandler(2, $reason, $handler); |
@@ -148,6 +148,9 @@ |
||
| 148 | 148 | return isset($this->metadata[$key]) ? $this->metadata[$key] : null; |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | + /** |
|
| 152 | + * @param integer $length |
|
| 153 | + */ |
|
| 151 | 154 | private function pump($length) |
| 152 | 155 | { |
| 153 | 156 | if ($this->source) { |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | /** |
| 142 | - * @param mixed $param |
|
| 142 | + * @param string|null $param |
|
| 143 | 143 | * @return boolean |
| 144 | 144 | */ |
| 145 | 145 | private function isStringOrNull($param) |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | /** |
| 151 | - * @param mixed $param |
|
| 151 | + * @param string $param |
|
| 152 | 152 | * @return boolean |
| 153 | 153 | */ |
| 154 | 154 | private function isStringNotEmpty($param) |
@@ -179,6 +179,9 @@ |
||
| 179 | 179 | return $emptyPathUri; |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | + /** |
|
| 183 | + * @return string |
|
| 184 | + */ |
|
| 182 | 185 | private static function getRelativePath(UriInterface $base, UriInterface $target) |
| 183 | 186 | { |
| 184 | 187 | $sourceSegments = explode('/', $base->getPath()); |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | * @param array $options An array of options to set on this provider. |
| 147 | 147 | * Options include `clientId`, `clientSecret`, `redirectUri`, and `state`. |
| 148 | 148 | * Individual providers may introduce more options, as needed. |
| 149 | - * @return array The options to pass to the HttpClient constructor |
|
| 149 | + * @return string[] The options to pass to the HttpClient constructor |
|
| 150 | 150 | */ |
| 151 | 151 | protected function getAllowedClientOptions(array $options) |
| 152 | 152 | { |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | * |
| 565 | 565 | * @param string $method |
| 566 | 566 | * @param string $url |
| 567 | - * @param AccessTokenInterface|string $token |
|
| 567 | + * @param AccessToken $token |
|
| 568 | 568 | * @param array $options Any of "headers", "body", and "protocolVersion". |
| 569 | 569 | * @return RequestInterface |
| 570 | 570 | */ |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | * @param string $title Collection's title |
| 122 | 122 | * @param string $description Collection's description |
| 123 | 123 | * @param boolean $private Whether to make this collection private |
| 124 | - * @return Photo |
|
| 124 | + * @return Collection |
|
| 125 | 125 | */ |
| 126 | 126 | public static function create($title, $description = '', $private = false) |
| 127 | 127 | { |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | /** |
| 88 | 88 | * Refresh an expired token and generate a new AccessToken object. |
| 89 | 89 | * |
| 90 | - * @return \League\OAuth2\Client\Token\AccessToken|null |
|
| 90 | + * @return null|\League\OAuth2\Client\Token\AccessTokenInterface |
|
| 91 | 91 | */ |
| 92 | 92 | public function refreshToken() |
| 93 | 93 | { |