@@ -55,6 +55,9 @@ |
||
| 55 | 55 | return $cookieParameters; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | + /** |
|
| 59 | + * @param string $url |
|
| 60 | + */ |
|
| 58 | 61 | private function validateUrl($url) |
| 59 | 62 | { |
| 60 | 63 | $scheme = str_replace('*', '', explode('://', $url)[0]); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | * @param array $config Optional array of ecs/instance profile credentials |
| 62 | 62 | * provider options. |
| 63 | 63 | * |
| 64 | - * @return callable |
|
| 64 | + * @return \Closure |
|
| 65 | 65 | */ |
| 66 | 66 | public static function defaultProvider(array $config = []) |
| 67 | 67 | { |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | * |
| 82 | 82 | * @param CredentialsInterface $creds |
| 83 | 83 | * |
| 84 | - * @return callable |
|
| 84 | + * @return \Closure |
|
| 85 | 85 | */ |
| 86 | 86 | public static function fromCredentials(CredentialsInterface $creds) |
| 87 | 87 | { |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | * variadic providers one after the other until a provider returns |
| 98 | 98 | * credentials. |
| 99 | 99 | * |
| 100 | - * @return callable |
|
| 100 | + * @return \Closure |
|
| 101 | 101 | */ |
| 102 | 102 | public static function chain() |
| 103 | 103 | { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * |
| 125 | 125 | * @param callable $provider Credentials provider function to wrap. |
| 126 | 126 | * |
| 127 | - * @return callable |
|
| 127 | + * @return \Closure |
|
| 128 | 128 | */ |
| 129 | 129 | public static function memoize(callable $provider) |
| 130 | 130 | { |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | * @param CacheInterface $cache Cache to store credentials |
| 174 | 174 | * @param string|null $cacheKey (optional) Cache key to use |
| 175 | 175 | * |
| 176 | - * @return callable |
|
| 176 | + * @return \Closure |
|
| 177 | 177 | */ |
| 178 | 178 | public static function cache( |
| 179 | 179 | callable $provider, |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | * Provider that creates credentials from environment variables |
| 210 | 210 | * AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN. |
| 211 | 211 | * |
| 212 | - * @return callable |
|
| 212 | + * @return \Closure |
|
| 213 | 213 | */ |
| 214 | 214 | public static function env() |
| 215 | 215 | { |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | * Credential provider that creates credentials using assume role |
| 262 | 262 | * |
| 263 | 263 | * @param array $config Array of configuration data |
| 264 | - * @return callable |
|
| 264 | + * @return AssumeRoleCredentialProvider |
|
| 265 | 265 | * @see Aws\Credentials\AssumeRoleCredentialProvider for $config details. |
| 266 | 266 | */ |
| 267 | 267 | public static function assumeRole(array $config=[]) |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | * @param string|null $filename If provided, uses a custom filename rather |
| 279 | 279 | * than looking in the home directory. |
| 280 | 280 | * |
| 281 | - * @return callable |
|
| 281 | + * @return \Closure |
|
| 282 | 282 | */ |
| 283 | 283 | public static function ini($profile = null, $filename = null) |
| 284 | 284 | { |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | * - 'default' profile in '.aws/credentials' file |
| 328 | 328 | * - 'profile default' profile in '.aws/config' file |
| 329 | 329 | * |
| 330 | - * @return array |
|
| 330 | + * @return \Closure[] |
|
| 331 | 331 | */ |
| 332 | 332 | private static function localCredentialProviders() |
| 333 | 333 | { |
@@ -74,6 +74,9 @@ |
||
| 74 | 74 | return self::SERVER_URI . $creds_uri; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | + /** |
|
| 78 | + * @param string $response |
|
| 79 | + */ |
|
| 77 | 80 | private function decodeResult($response) |
| 78 | 81 | { |
| 79 | 82 | $result = json_decode($response, true); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | * Creates a middleware that updates a command with the content and tree |
| 117 | 117 | * hash headers for upload operations. |
| 118 | 118 | * |
| 119 | - * @return callable |
|
| 119 | + * @return \Closure |
|
| 120 | 120 | * @throws CouldNotCreateChecksumException if the body is not seekable. |
| 121 | 121 | */ |
| 122 | 122 | private function getChecksumsMiddleware() |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | /** |
| 189 | 189 | * Creates a middleware that adds the API version header for all requests. |
| 190 | 190 | * |
| 191 | - * @return callable |
|
| 191 | + * @return \Closure |
|
| 192 | 192 | */ |
| 193 | 193 | private function getApiVersionMiddleware() |
| 194 | 194 | { |
@@ -86,6 +86,9 @@ discard block |
||
| 86 | 86 | ); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | + /** |
|
| 90 | + * @return Psr7Request |
|
| 91 | + */ |
|
| 89 | 92 | private function createGuzzleRequest(Psr7Request $psrRequest, array $options) |
| 90 | 93 | { |
| 91 | 94 | $ringConfig = []; |
@@ -128,6 +131,10 @@ discard block |
||
| 128 | 131 | if (is_callable($statsCallback)) { |
| 129 | 132 | $request->getEmitter()->on( |
| 130 | 133 | 'end', |
| 134 | + |
|
| 135 | + /** |
|
| 136 | + * @return Psr7Request |
|
| 137 | + */ |
|
| 131 | 138 | function (EndEvent $event) use ($statsCallback) { |
| 132 | 139 | $statsCallback($event->getTransferInfo()); |
| 133 | 140 | } |
@@ -292,10 +292,10 @@ discard block |
||
| 292 | 292 | /** |
| 293 | 293 | * Splices a function into the middleware list at a specific position. |
| 294 | 294 | * |
| 295 | - * @param $findName |
|
| 296 | - * @param $withName |
|
| 295 | + * @param callable $findName |
|
| 296 | + * @param string $withName |
|
| 297 | 297 | * @param callable $middleware |
| 298 | - * @param $before |
|
| 298 | + * @param boolean $before |
|
| 299 | 299 | */ |
| 300 | 300 | private function splice($findName, $withName, callable $middleware, $before) |
| 301 | 301 | { |
@@ -368,6 +368,9 @@ discard block |
||
| 368 | 368 | } |
| 369 | 369 | } |
| 370 | 370 | |
| 371 | + /** |
|
| 372 | + * @param string $name |
|
| 373 | + */ |
|
| 371 | 374 | private function removeByName($name) |
| 372 | 375 | { |
| 373 | 376 | if (!isset($this->named[$name])) { |
@@ -379,6 +382,10 @@ discard block |
||
| 379 | 382 | $this->steps[$step] = array_values( |
| 380 | 383 | array_filter( |
| 381 | 384 | $this->steps[$step], |
| 385 | + |
|
| 386 | + /** |
|
| 387 | + * @param string $tuple |
|
| 388 | + */ |
|
| 382 | 389 | function ($tuple) use ($name) { |
| 383 | 390 | return $tuple[1] !== $name; |
| 384 | 391 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * @param \Aws\Api\Service $service |
| 34 | 34 | * @param callable|null $bytesGenerator |
| 35 | 35 | * |
| 36 | - * @return callable |
|
| 36 | + * @return \Closure |
|
| 37 | 37 | */ |
| 38 | 38 | public static function wrap( |
| 39 | 39 | Service $service, |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | /** |
| 100 | 100 | * This function decides the PHP function used in generating random bytes. |
| 101 | 101 | * |
| 102 | - * @return callable|null |
|
| 102 | + * @return string|null |
|
| 103 | 103 | */ |
| 104 | 104 | private function findCompatibleRandomSource() |
| 105 | 105 | { |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | * @param string $bodyParameter |
| 22 | 22 | * @param string $sourceParameter |
| 23 | 23 | * |
| 24 | - * @return callable |
|
| 24 | + * @return \Closure |
|
| 25 | 25 | */ |
| 26 | 26 | public static function sourceFile( |
| 27 | 27 | Service $api, |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * |
| 63 | 63 | * @param Service $api API being accessed. |
| 64 | 64 | * |
| 65 | - * @return callable |
|
| 65 | + * @return \Closure |
|
| 66 | 66 | */ |
| 67 | 67 | public static function validation(Service $api, Validator $validator = null) |
| 68 | 68 | { |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | * |
| 89 | 89 | * @param callable $serializer Function used to serialize a request for a |
| 90 | 90 | * command. |
| 91 | - * @return callable |
|
| 91 | + * @return \Closure |
|
| 92 | 92 | */ |
| 93 | 93 | public static function requestBuilder(callable $serializer) |
| 94 | 94 | { |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * object and returns a |
| 110 | 110 | * SignatureInterface. |
| 111 | 111 | * |
| 112 | - * @return callable |
|
| 112 | + * @return \Closure |
|
| 113 | 113 | */ |
| 114 | 114 | public static function signer(callable $credProvider, callable $signatureFunction) |
| 115 | 115 | { |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | * |
| 143 | 143 | * @param callable $fn Tap function |
| 144 | 144 | * |
| 145 | - * @return callable |
|
| 145 | + * @return \Closure |
|
| 146 | 146 | */ |
| 147 | 147 | public static function tap(callable $fn) |
| 148 | 148 | { |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | * @param bool $stats Whether to collect statistics on retries and the |
| 173 | 173 | * associated delay. |
| 174 | 174 | * |
| 175 | - * @return callable |
|
| 175 | + * @return \Closure |
|
| 176 | 176 | */ |
| 177 | 177 | public static function retry( |
| 178 | 178 | callable $decider = null, |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | * This is a uniquely generated UUID to identify initial and subsequent |
| 194 | 194 | * retries as part of a complete request lifecycle. |
| 195 | 195 | * |
| 196 | - * @return callable |
|
| 196 | + * @return \Closure |
|
| 197 | 197 | */ |
| 198 | 198 | public static function invocationId() |
| 199 | 199 | { |
@@ -215,9 +215,9 @@ discard block |
||
| 215 | 215 | * request body's URI is available. It then checks the file extension of the |
| 216 | 216 | * URI to determine the mime-type. |
| 217 | 217 | * |
| 218 | - * @param array $operations Operations that Content-Type should be added to. |
|
| 218 | + * @param string[] $operations Operations that Content-Type should be added to. |
|
| 219 | 219 | * |
| 220 | - * @return callable |
|
| 220 | + * @return \Closure |
|
| 221 | 221 | */ |
| 222 | 222 | public static function contentType(array $operations) |
| 223 | 223 | { |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | * |
| 249 | 249 | * @param History $history History container to store entries. |
| 250 | 250 | * |
| 251 | - * @return callable |
|
| 251 | + * @return \Closure |
|
| 252 | 252 | */ |
| 253 | 253 | public static function history(History $history) |
| 254 | 254 | { |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | * @param callable $f Map function that accepts a RequestInterface and |
| 281 | 281 | * returns a RequestInterface. |
| 282 | 282 | * |
| 283 | - * @return callable |
|
| 283 | + * @return \Closure |
|
| 284 | 284 | */ |
| 285 | 285 | public static function mapRequest(callable $f) |
| 286 | 286 | { |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | * @param callable $f Map function that accepts a command and returns a |
| 302 | 302 | * command. |
| 303 | 303 | * |
| 304 | - * @return callable |
|
| 304 | + * @return \Closure |
|
| 305 | 305 | */ |
| 306 | 306 | public static function mapCommand(callable $f) |
| 307 | 307 | { |
@@ -321,7 +321,7 @@ discard block |
||
| 321 | 321 | * @param callable $f Map function that accepts an Aws\ResultInterface and |
| 322 | 322 | * returns an Aws\ResultInterface. |
| 323 | 323 | * |
| 324 | - * @return callable |
|
| 324 | + * @return \Closure |
|
| 325 | 325 | */ |
| 326 | 326 | public static function mapResult(callable $f) |
| 327 | 327 | { |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | * Based on the config and service-specific workflow info, creates a |
| 197 | 197 | * `Promise` for an `UploadState` object. |
| 198 | 198 | * |
| 199 | - * @return PromiseInterface A `Promise` that resolves to an `UploadState`. |
|
| 199 | + * @return UploadState A `Promise` that resolves to an `UploadState`. |
|
| 200 | 200 | */ |
| 201 | 201 | private function determineState() |
| 202 | 202 | { |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | * |
| 260 | 260 | * @param array $errors Errors from upload operations are added to this. |
| 261 | 261 | * |
| 262 | - * @return callable |
|
| 262 | + * @return \Closure |
|
| 263 | 263 | */ |
| 264 | 264 | private function getResultHandler(&$errors = []) |
| 265 | 265 | { |