@@ -32,21 +32,21 @@ discard block |
||
| 32 | 32 | $this->temp = $temp ?: sys_get_temp_dir(); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * @param string $name Configured account name from AccountCollection |
|
| 37 | - * @return Fio\FioRead |
|
| 38 | - * @throws Fio\AccountException |
|
| 39 | - */ |
|
| 35 | + /** |
|
| 36 | + * @param string $name Configured account name from AccountCollection |
|
| 37 | + * @return Fio\FioRead |
|
| 38 | + * @throws Fio\AccountException |
|
| 39 | + */ |
|
| 40 | 40 | public function createFioRead($name = null) |
| 41 | 41 | { |
| 42 | 42 | return new Fio\FioRead($this->getQueue(), $this->getAccount($name), $this->createReader()); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - /** |
|
| 46 | - * @param string $name Configured account name from AccountCollection |
|
| 47 | - * @return Fio\FioPay |
|
| 48 | - * @throws Fio\AccountException |
|
| 49 | - */ |
|
| 45 | + /** |
|
| 46 | + * @param string $name Configured account name from AccountCollection |
|
| 47 | + * @return Fio\FioPay |
|
| 48 | + * @throws Fio\AccountException |
|
| 49 | + */ |
|
| 50 | 50 | public function createFioPay($name = null) |
| 51 | 51 | { |
| 52 | 52 | return new Fio\FioPay( |
@@ -63,12 +63,12 @@ discard block |
||
| 63 | 63 | return new Fio\Request\Queue($this->temp); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - /** |
|
| 67 | - * @param array $accounts |
|
| 68 | - * @return Fio\Account\AccountCollection |
|
| 69 | - * @throws Fio\AccountException |
|
| 70 | - */ |
|
| 71 | - protected function createAccountCollection(array $accounts) |
|
| 66 | + /** |
|
| 67 | + * @param array $accounts |
|
| 68 | + * @return Fio\Account\AccountCollection |
|
| 69 | + * @throws Fio\AccountException |
|
| 70 | + */ |
|
| 71 | + protected function createAccountCollection(array $accounts) |
|
| 72 | 72 | { |
| 73 | 73 | return Fio\Account\AccountCollectionFactory::create($accounts); |
| 74 | 74 | } |
@@ -78,11 +78,11 @@ discard block |
||
| 78 | 78 | return $this->accountCollection; |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - /** |
|
| 82 | - * @param string $name Configured account name from AccountCollection |
|
| 83 | - * @return Fio\Account\FioAccount |
|
| 84 | - * @throws Fio\AccountException |
|
| 85 | - */ |
|
| 81 | + /** |
|
| 82 | + * @param string $name Configured account name from AccountCollection |
|
| 83 | + * @return Fio\Account\FioAccount |
|
| 84 | + * @throws Fio\AccountException |
|
| 85 | + */ |
|
| 86 | 86 | final protected function getAccount($name) |
| 87 | 87 | { |
| 88 | 88 | if ($name) { |
@@ -70,11 +70,11 @@ discard block |
||
| 70 | 70 | }, 'download'); |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - /** |
|
| 74 | - * @return Pay\IResponse |
|
| 75 | - * @throws Fio\QueueLimitException |
|
| 76 | - * @throws Fio\ServiceUnavailableException |
|
| 77 | - */ |
|
| 73 | + /** |
|
| 74 | + * @return Pay\IResponse |
|
| 75 | + * @throws Fio\QueueLimitException |
|
| 76 | + * @throws Fio\ServiceUnavailableException |
|
| 77 | + */ |
|
| 78 | 78 | public function upload($url, $token, array $post, $filename) |
| 79 | 79 | { |
| 80 | 80 | $newPost = []; |
@@ -119,11 +119,11 @@ discard block |
||
| 119 | 119 | self::sleep($tempFile); |
| 120 | 120 | $next = true; |
| 121 | 121 | } catch (GuzzleHttp\Exception\ServerException $e) { |
| 122 | - if($e->hasResponse()) { |
|
| 123 | - self::detectDownloadResponse( $e->getResponse() ); |
|
| 124 | - } |
|
| 125 | - throw new Fio\ServiceUnavailableException('Service is currently unavailable'); |
|
| 126 | - } |
|
| 122 | + if($e->hasResponse()) { |
|
| 123 | + self::detectDownloadResponse( $e->getResponse() ); |
|
| 124 | + } |
|
| 125 | + throw new Fio\ServiceUnavailableException('Service is currently unavailable'); |
|
| 126 | + } |
|
| 127 | 127 | } while ($next); |
| 128 | 128 | fclose($file); |
| 129 | 129 | touch($tempFile); |
@@ -135,11 +135,11 @@ discard block |
||
| 135 | 135 | return $response->getBody(); |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - /** |
|
| 139 | - * @param $response |
|
| 140 | - * @throws Fio\ServiceUnavailableException |
|
| 141 | - */ |
|
| 142 | - private static function detectDownloadResponse($response) |
|
| 138 | + /** |
|
| 139 | + * @param $response |
|
| 140 | + * @throws Fio\ServiceUnavailableException |
|
| 141 | + */ |
|
| 142 | + private static function detectDownloadResponse($response) |
|
| 143 | 143 | { |
| 144 | 144 | /* @var $contentTypeHeaders array */ |
| 145 | 145 | $contentTypeHeaders = $response->getHeader('Content-Type'); |