@@ -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 | { |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * |
| 54 | 54 | * @param int $maxRetries |
| 55 | 55 | * |
| 56 | - * @return callable |
|
| 56 | + * @return \Closure |
|
| 57 | 57 | */ |
| 58 | 58 | public static function createDefaultDecider($maxRetries = 3) |
| 59 | 59 | { |
@@ -159,11 +159,17 @@ discard block |
||
| 159 | 159 | return $handler($command, $request)->then($g, $g); |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | + /** |
|
| 163 | + * @param integer $retries |
|
| 164 | + */ |
|
| 162 | 165 | private function addRetryHeader($request, $retries, $delayBy) |
| 163 | 166 | { |
| 164 | 167 | return $request->withHeader('aws-sdk-retry', "{$retries}/{$delayBy}"); |
| 165 | 168 | } |
| 166 | 169 | |
| 170 | + /** |
|
| 171 | + * @param integer $retries |
|
| 172 | + */ |
|
| 167 | 173 | private function updateStats($retries, $delay, array &$stats) |
| 168 | 174 | { |
| 169 | 175 | if (!isset($stats['total_retry_delay'])) { |
@@ -105,6 +105,10 @@ |
||
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | + /** |
|
| 109 | + * @param integer $partNumber |
|
| 110 | + * @param double $partsCount |
|
| 111 | + */ |
|
| 108 | 112 | private function createPart($partNumber, $partsCount) |
| 109 | 113 | { |
| 110 | 114 | $defaultPartSize = $this->determinePartSize(); |
@@ -286,6 +286,9 @@ |
||
| 286 | 286 | }); |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | + /** |
|
| 290 | + * @return string |
|
| 291 | + */ |
|
| 289 | 292 | private function getCacheKey($bucketName) |
| 290 | 293 | { |
| 291 | 294 | return "aws:s3:{$bucketName}:location"; |
@@ -205,6 +205,9 @@ discard block |
||
| 205 | 205 | return $this->body->write($data); |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | + /** |
|
| 209 | + * @param string $path |
|
| 210 | + */ |
|
| 208 | 211 | public function unlink($path) |
| 209 | 212 | { |
| 210 | 213 | $this->initProtocol($path); |
@@ -263,6 +266,9 @@ discard block |
||
| 263 | 266 | $this->protocol = $parts[0] ?: 's3'; |
| 264 | 267 | } |
| 265 | 268 | |
| 269 | + /** |
|
| 270 | + * @param string $path |
|
| 271 | + */ |
|
| 266 | 272 | private function createStat($path, $flags) |
| 267 | 273 | { |
| 268 | 274 | $this->initProtocol($path); |
@@ -442,7 +448,7 @@ discard block |
||
| 442 | 448 | /** |
| 443 | 449 | * This method is called in response to rewinddir() |
| 444 | 450 | * |
| 445 | - * @return boolean true on success |
|
| 451 | + * @return boolean|null true on success |
|
| 446 | 452 | */ |
| 447 | 453 | public function dir_rewinddir() |
| 448 | 454 | { |
@@ -558,6 +564,7 @@ discard block |
||
| 558 | 564 | /** |
| 559 | 565 | * Validates the provided stream arguments for fopen and returns an array |
| 560 | 566 | * of errors. |
| 567 | + * @param string $mode |
|
| 561 | 568 | */ |
| 562 | 569 | private function validate($path, $mode) |
| 563 | 570 | { |
@@ -214,6 +214,9 @@ discard block |
||
| 214 | 214 | return rtrim(str_replace('\\', '/', $path), '/'); |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | + /** |
|
| 218 | + * @param string $uri |
|
| 219 | + */ |
|
| 217 | 220 | private function resolveUri($uri) |
| 218 | 221 | { |
| 219 | 222 | $resolved = []; |
@@ -380,6 +383,9 @@ discard block |
||
| 380 | 383 | return $relative_file_path; |
| 381 | 384 | } |
| 382 | 385 | |
| 386 | + /** |
|
| 387 | + * @param resource $debug |
|
| 388 | + */ |
|
| 383 | 389 | private function addDebugToBefore($debug) |
| 384 | 390 | { |
| 385 | 391 | $before = $this->before; |
@@ -174,6 +174,12 @@ |
||
| 174 | 174 | return '/' . str_replace('%2F', '/', $doubleEncoded); |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | + /** |
|
| 178 | + * @param string $longDate |
|
| 179 | + * @param string $creq |
|
| 180 | + * |
|
| 181 | + * @return string |
|
| 182 | + */ |
|
| 177 | 183 | private function createStringToSign($longDate, $credentialScope, $creq) |
| 178 | 184 | { |
| 179 | 185 | $hash = hash('sha256', $creq); |
@@ -121,6 +121,9 @@ discard block |
||
| 121 | 121 | $this->prevInput = $entry; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | + /** |
|
| 125 | + * @param double $start |
|
| 126 | + */ |
|
| 124 | 127 | private function stepOutput($start, $entry) |
| 125 | 128 | { |
| 126 | 129 | static $keys = ['result', 'error']; |
@@ -130,6 +133,9 @@ discard block |
||
| 130 | 133 | $this->prevOutput = $entry; |
| 131 | 134 | } |
| 132 | 135 | |
| 136 | + /** |
|
| 137 | + * @param string $title |
|
| 138 | + */ |
|
| 133 | 139 | private function compareStep(array $a, array $b, $title, array $keys) |
| 134 | 140 | { |
| 135 | 141 | $changes = []; |
@@ -280,6 +286,9 @@ discard block |
||
| 280 | 286 | } |
| 281 | 287 | } |
| 282 | 288 | |
| 289 | + /** |
|
| 290 | + * @param string $value |
|
| 291 | + */ |
|
| 283 | 292 | private function write($value) |
| 284 | 293 | { |
| 285 | 294 | if ($this->config['scrub_auth']) { |
@@ -226,7 +226,7 @@ |
||
| 226 | 226 | * |
| 227 | 227 | * @param string $path |
| 228 | 228 | * |
| 229 | - * @return resource |
|
| 229 | + * @return boolean |
|
| 230 | 230 | */ |
| 231 | 231 | public function createWriteStream($path) |
| 232 | 232 | { |