@@ -40,9 +40,9 @@ |
||
| 40 | 40 | /** @return string */ |
| 41 | 41 | public function getPathname() |
| 42 | 42 | { |
| 43 | - $filename = $this->temp . DIRECTORY_SEPARATOR . md5(microtime(true)) . '.xml'; |
|
| 43 | + $filename = $this->temp.DIRECTORY_SEPARATOR.md5(microtime(true)).'.xml'; |
|
| 44 | 44 | file_put_contents($filename, $this->getXml()); |
| 45 | - register_shutdown_function(function () use ($filename) { |
|
| 45 | + register_shutdown_function(function() use ($filename) { |
|
| 46 | 46 | @unlink($filename); |
| 47 | 47 | }); |
| 48 | 48 | return $filename; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | public function download($token, $url) |
| 60 | 60 | { |
| 61 | - return $this->request($token, function (GuzzleHttp\Client $client) use ($url) { |
|
| 61 | + return $this->request($token, function(GuzzleHttp\Client $client) use ($url) { |
|
| 62 | 62 | return $client->request('GET', $url, $this->downloadOptions); |
| 63 | 63 | }); |
| 64 | 64 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $newPost[] = ['name' => 'file', 'contents' => fopen($filename, 'r')]; |
| 74 | 74 | |
| 75 | 75 | /* @var $response GuzzleHttp\Psr7\Stream */ |
| 76 | - $response = $this->request($token, function (GuzzleHttp\Client $client) use ($url, $newPost) { |
|
| 76 | + $response = $this->request($token, function(GuzzleHttp\Client $client) use ($url, $newPost) { |
|
| 77 | 77 | return $client->request('POST', $url, [GuzzleHttp\RequestOptions::MULTIPART => $newPost]); |
| 78 | 78 | }); |
| 79 | 79 | return new Pay\XMLResponse($response->getContents()); |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | throw $e; |
| 97 | 97 | } elseif ($i >= $this->limitLoop) { |
| 98 | 98 | fclose($file); |
| 99 | - throw new Fio\QueueLimitException('You have limit up requests to server ' . $this->limitLoop); |
|
| 99 | + throw new Fio\QueueLimitException('You have limit up requests to server '.$this->limitLoop); |
|
| 100 | 100 | } |
| 101 | 101 | self::sleep($tempFile); |
| 102 | 102 | $next = true; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | { |
| 124 | 124 | $key = substr($token, 10, -10); |
| 125 | 125 | if (!isset(self::$tokens[$key])) { |
| 126 | - self::$tokens[$key] = $this->tempDir . DIRECTORY_SEPARATOR . md5($key); |
|
| 126 | + self::$tokens[$key] = $this->tempDir.DIRECTORY_SEPARATOR.md5($key); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | return self::$tokens[$key]; |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | private static function safeProtocol($filename) |
| 133 | 133 | { |
| 134 | - return Utils\SafeStream::PROTOCOL . '://' . $filename; |
|
| 134 | + return Utils\SafeStream::PROTOCOL.'://'.$filename; |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | } |
@@ -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) { |