@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | public function __construct($transactionClass = null) |
| 27 | 27 | { |
| 28 | 28 | if ($transactionClass === null) { |
| 29 | - $transactionClass = __NAMESPACE__ . '\Transaction'; |
|
| 29 | + $transactionClass = __NAMESPACE__.'\Transaction'; |
|
| 30 | 30 | } |
| 31 | 31 | $this->transactionClass = $transactionClass; |
| 32 | 32 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | { |
| 43 | 43 | $transaction = $this->createTransactionObject($dateFormat); |
| 44 | 44 | foreach (self::metaProperty($transaction) as $id => $meta) { |
| 45 | - $value = isset($data->{'column' . $id}) ? $data->{'column' . $id}->value : null; |
|
| 45 | + $value = isset($data->{'column'.$id}) ? $data->{'column'.$id}->value : null; |
|
| 46 | 46 | $transaction->bindProperty($meta['name'], $meta['type'], $value); |
| 47 | 47 | } |
| 48 | 48 | return $transaction; |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | if (array_key_exists($name, $this->properties)) { |
| 28 | 28 | return $this->properties[$name]; |
| 29 | 29 | } |
| 30 | - throw new Fio\TransactionPropertyException('Property does not exists. ' . $name); |
|
| 30 | + throw new Fio\TransactionPropertyException('Property does not exists. '.$name); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | public function clearTemporaryValues() |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | public function bindProperty($name, $type, $value) |
| 39 | 39 | { |
| 40 | - $method = 'set' . ucfirst($name); |
|
| 40 | + $method = 'set'.ucfirst($name); |
|
| 41 | 41 | if (method_exists($this, $method)) { |
| 42 | 42 | $value = $this->{$method}($value); |
| 43 | 43 | } elseif ($value !== null) { |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | public function download($token, $url) |
| 68 | 68 | { |
| 69 | - return $this->request($token, function (GuzzleHttp\Client $client) use ($url) { |
|
| 69 | + return $this->request($token, function(GuzzleHttp\Client $client) use ($url) { |
|
| 70 | 70 | return $client->request('GET', $url, $this->downloadOptions); |
| 71 | 71 | }, 'download'); |
| 72 | 72 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | } |
| 84 | 84 | $newPost[] = ['name' => 'file', 'contents' => fopen($filename, 'r')]; |
| 85 | 85 | |
| 86 | - $response = $this->request($token, function (GuzzleHttp\Client $client) use ($url, $newPost) { |
|
| 86 | + $response = $this->request($token, function(GuzzleHttp\Client $client) use ($url, $newPost) { |
|
| 87 | 87 | return $client->request('POST', $url, [GuzzleHttp\RequestOptions::MULTIPART => $newPost]); |
| 88 | 88 | }, 'upload'); |
| 89 | 89 | return self::createXmlResponse($response); |
@@ -114,12 +114,12 @@ discard block |
||
| 114 | 114 | throw $e; |
| 115 | 115 | } elseif ($i >= $this->limitLoop) { |
| 116 | 116 | fclose($file); |
| 117 | - throw new Fio\QueueLimitException('You have limit up requests to server ' . $this->limitLoop); |
|
| 117 | + throw new Fio\QueueLimitException('You have limit up requests to server '.$this->limitLoop); |
|
| 118 | 118 | } |
| 119 | 119 | self::sleep($tempFile); |
| 120 | 120 | $next = true; |
| 121 | 121 | } catch (GuzzleHttp\Exception\ServerException $e) { |
| 122 | - if($e->hasResponse()) { |
|
| 122 | + if ($e->hasResponse()) { |
|
| 123 | 123 | self::detectDownloadResponse($e->getResponse()); |
| 124 | 124 | } |
| 125 | 125 | throw self::createServiceUnavailableException(); |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | { |
| 171 | 171 | $key = substr($token, 10, -10); |
| 172 | 172 | if (!isset(self::$tokens[$key])) { |
| 173 | - self::$tokens[$key] = $this->tempDir . DIRECTORY_SEPARATOR . md5($key); |
|
| 173 | + self::$tokens[$key] = $this->tempDir.DIRECTORY_SEPARATOR.md5($key); |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | return self::$tokens[$key]; |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | |
| 179 | 179 | private static function safeProtocol($filename) |
| 180 | 180 | { |
| 181 | - return Utils\SafeStream::PROTOCOL . '://' . $filename; |
|
| 181 | + return Utils\SafeStream::PROTOCOL.'://'.$filename; |
|
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | /** |