@@ -213,6 +213,9 @@ |
||
| 213 | 213 | } |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | + /** |
|
| 217 | + * @param string $descriptor |
|
| 218 | + */ |
|
| 216 | 219 | private function validateRange(Shape $shape, $length, $descriptor) |
| 217 | 220 | { |
| 218 | 221 | if ($this->constraints['min']) { |
@@ -245,7 +245,7 @@ |
||
| 245 | 245 | * Parse the class name and setup the custom exception class of the client |
| 246 | 246 | * and return the "service" name of the client and "exception_class". |
| 247 | 247 | * |
| 248 | - * @return array |
|
| 248 | + * @return string[] |
|
| 249 | 249 | */ |
| 250 | 250 | private function parseClass() |
| 251 | 251 | { |
@@ -6,13 +6,10 @@ |
||
| 6 | 6 | use Aws\Api\Service; |
| 7 | 7 | use Aws\Credentials\Credentials; |
| 8 | 8 | use Aws\Credentials\CredentialsInterface; |
| 9 | -use Aws\Endpoint\Partition; |
|
| 10 | 9 | use Aws\Endpoint\PartitionEndpointProvider; |
| 11 | -use Aws\Endpoint\PartitionProviderInterface; |
|
| 12 | 10 | use Aws\Signature\SignatureProvider; |
| 13 | 11 | use Aws\Endpoint\EndpointProvider; |
| 14 | 12 | use Aws\Credentials\CredentialProvider; |
| 15 | -use GuzzleHttp\Promise; |
|
| 16 | 13 | use InvalidArgumentException as IAE; |
| 17 | 14 | use Psr\Http\Message\RequestInterface; |
| 18 | 15 | |
@@ -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]); |
@@ -1,15 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Aws\Credentials; |
| 3 | 3 | |
| 4 | -use Aws\Exception\AwsException; |
|
| 5 | 4 | use Aws\Exception\CredentialsException; |
| 6 | 5 | use Aws\Result; |
| 7 | 6 | use Aws\Sts\StsClient; |
| 8 | -use GuzzleHttp\Promise; |
|
| 9 | -use GuzzleHttp\Psr7\Request; |
|
| 10 | 7 | use GuzzleHttp\Promise\PromiseInterface; |
| 11 | -use GuzzleHttp\Psr7\Response; |
|
| 12 | -use Psr\Http\Message\ResponseInterface; |
|
| 13 | 8 | |
| 14 | 9 | /** |
| 15 | 10 | * Credential provider that provides credentials via assuming a role |
@@ -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); |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | namespace Aws\Credentials; |
| 3 | 3 | |
| 4 | 4 | use Aws\Exception\CredentialsException; |
| 5 | -use GuzzleHttp\Promise; |
|
| 6 | 5 | use GuzzleHttp\Psr7\Request; |
| 7 | 6 | use GuzzleHttp\Promise\PromiseInterface; |
| 8 | 7 | use Psr\Http\Message\ResponseInterface; |
@@ -1,7 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Aws\DynamoDb; |
| 3 | 3 | |
| 4 | -use Aws\AwsClientInterface; |
|
| 5 | 4 | use Aws\CommandInterface; |
| 6 | 5 | use Aws\CommandPool; |
| 7 | 6 | use Aws\Exception\AwsException; |
@@ -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 | { |