@@ -51,6 +51,10 @@ discard block |
||
| 51 | 51 | } |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | + /** |
|
| 55 | + * @param string $path |
|
| 56 | + * @param string $fileHash |
|
| 57 | + */ |
|
| 54 | 58 | private function initRequest($path, Psr7\Stream $stream, $fileHash, $params) { |
| 55 | 59 | $metaData = array( |
| 56 | 60 | 'expiration' => time() + $this->config->blockExpiration, |
@@ -78,6 +82,9 @@ discard block |
||
| 78 | 82 | return $initInfo; |
| 79 | 83 | } |
| 80 | 84 | |
| 85 | + /** |
|
| 86 | + * @param integer $blockId |
|
| 87 | + */ |
|
| 81 | 88 | private function blockUpload($blocksInfo, $blockId, Psr7\Stream $stream, $params = []) { |
| 82 | 89 | $startPosition = $blockId * $this->config->maxBlockSize; |
| 83 | 90 | $endPosition = $blockId >= $blocksInfo->blocks - 1 ? $stream->getSize() : $startPosition + $this->config->maxBlockSize; |
@@ -16,6 +16,9 @@ discard block |
||
| 16 | 16 | $this->config = $config; |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | + /** |
|
| 20 | + * @param string $source |
|
| 21 | + */ |
|
| 19 | 22 | public function process($source, $tasks) { |
| 20 | 23 | $encodedTasks = Util::base64Json($tasks); |
| 21 | 24 | |
@@ -43,6 +46,9 @@ discard block |
||
| 43 | 46 | } |
| 44 | 47 | |
| 45 | 48 | |
| 49 | + /** |
|
| 50 | + * @param string $path |
|
| 51 | + */ |
|
| 46 | 52 | public function query($taskIds, $path) { |
| 47 | 53 | $client = new Client([ |
| 48 | 54 | 'timeout' => $this->config->timeout, |
@@ -29,6 +29,9 @@ discard block |
||
| 29 | 29 | $this->endpoint = Config::$restApiEndPoint . '/' . $config->bucketName; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | + /** |
|
| 33 | + * @param string $method |
|
| 34 | + */ |
|
| 32 | 35 | public function request($method, $storagePath) { |
| 33 | 36 | $this->method = strtoupper($method); |
| 34 | 37 | $this->storagePath = '/' . ltrim($storagePath, '/'); |
@@ -37,7 +40,7 @@ discard block |
||
| 37 | 40 | |
| 38 | 41 | |
| 39 | 42 | /** |
| 40 | - * @param string|resource $file |
|
| 43 | + * @param Psr7\Stream $file |
|
| 41 | 44 | * |
| 42 | 45 | * @return $this |
| 43 | 46 | */ |
@@ -49,7 +52,7 @@ discard block |
||
| 49 | 52 | } |
| 50 | 53 | |
| 51 | 54 | /** |
| 52 | - * @return mixed|\Psr\Http\Message\ResponseInterface |
|
| 55 | + * @return \Psr\Http\Message\ResponseInterface |
|
| 53 | 56 | */ |
| 54 | 57 | public function send() { |
| 55 | 58 | $client = new Client([ |