@@ -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]); |
@@ -79,6 +79,9 @@ discard block |
||
79 | 79 | return $signatureHash; |
80 | 80 | } |
81 | 81 | |
82 | + /** |
|
83 | + * @param string $resource |
|
84 | + */ |
|
82 | 85 | private function createCannedPolicy($resource, $expiration) |
83 | 86 | { |
84 | 87 | return json_encode([ |
@@ -93,6 +96,9 @@ discard block |
||
93 | 96 | ], JSON_UNESCAPED_SLASHES); |
94 | 97 | } |
95 | 98 | |
99 | + /** |
|
100 | + * @param string $policy |
|
101 | + */ |
|
96 | 102 | private function sign($policy) |
97 | 103 | { |
98 | 104 | $signature = ''; |
@@ -101,6 +107,9 @@ discard block |
||
101 | 107 | return $signature; |
102 | 108 | } |
103 | 109 | |
110 | + /** |
|
111 | + * @param string $policy |
|
112 | + */ |
|
104 | 113 | private function encode($policy) |
105 | 114 | { |
106 | 115 | return strtr(base64_encode($policy), '+=/', '-_~'); |
@@ -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); |
@@ -12,9 +12,9 @@ discard block |
||
12 | 12 | /** |
13 | 13 | * Returns a function that always returns the same value; |
14 | 14 | * |
15 | - * @param mixed $value Value to return. |
|
15 | + * @param FulfilledPromise $value Value to return. |
|
16 | 16 | * |
17 | - * @return callable |
|
17 | + * @return \Closure |
|
18 | 18 | */ |
19 | 19 | function constantly($value) |
20 | 20 | { |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | /** |
42 | 42 | * Applies a map function $f to each value in a collection. |
43 | 43 | * |
44 | - * @param mixed $iterable Iterable sequence of data. |
|
44 | + * @param \Iterator $iterable Iterable sequence of data. |
|
45 | 45 | * @param callable $f Map function to apply. |
46 | 46 | * |
47 | 47 | * @return \Generator |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * value in the sequence and yields the application of the map function to each |
59 | 59 | * value. |
60 | 60 | * |
61 | - * @param mixed $iterable Iterable sequence of data. |
|
61 | + * @param ResultPaginator $iterable Iterable sequence of data. |
|
62 | 62 | * @param callable $f Map function to apply. |
63 | 63 | * |
64 | 64 | * @return \Generator |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | * $fn = \Aws\or_chain($a, $b); |
108 | 108 | * echo $fn(1, 2); // 3 |
109 | 109 | * |
110 | - * @return callable |
|
110 | + * @return \Closure |
|
111 | 111 | */ |
112 | 112 | function or_chain() |
113 | 113 | { |
@@ -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 | { |