@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | public function getAccount(): string |
| 17 | 17 | { |
| 18 | - return $this->prefix() . $this->account; |
|
| 18 | + return $this->prefix().$this->account; |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | public function getAccountAndCode(): string |
| 35 | 35 | { |
| 36 | - return $this->getAccount() . $this->bankCode(); |
|
| 36 | + return $this->getAccount().$this->bankCode(); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | private function bankCode(): string |
| 47 | 47 | { |
| 48 | 48 | if ($this->bankCode !== '') { |
| 49 | - return '/' . $this->bankCode; |
|
| 49 | + return '/'.$this->bankCode; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | return $this->bankCode; |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | private function prefix(): string |
| 57 | 57 | { |
| 58 | 58 | if ($this->prefix !== '') { |
| 59 | - return $this->prefix . '-'; |
|
| 59 | + return $this->prefix.'-'; |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | return $this->prefix; |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | |
| 27 | - public static function date(int|string|\DateTimeInterface $date, string $format = 'Y-m-d'): string |
|
| 27 | + public static function date(int | string | \DateTimeInterface $date, string $format = 'Y-m-d'): string |
|
| 28 | 28 | { |
| 29 | 29 | return DateTime::from($date)->format($format); |
| 30 | 30 | } |
@@ -25,8 +25,8 @@ discard block |
||
| 25 | 25 | * Movements in date range. |
| 26 | 26 | */ |
| 27 | 27 | public function movements( |
| 28 | - int|string|\DateTimeInterface $from = '-1 week', |
|
| 29 | - int|string|\DateTimeInterface $to = 'now', |
|
| 28 | + int | string | \DateTimeInterface $from = '-1 week', |
|
| 29 | + int | string | \DateTimeInterface $to = 'now', |
|
| 30 | 30 | ): TransactionList |
| 31 | 31 | { |
| 32 | 32 | $data = $this->download('periods/%s/%s/%s/transactions.%s', Utils\Fio::date($from), Utils\Fio::date($to), $this->reader->getExtension()); |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | /** |
| 74 | 74 | * Set breakpoint to date. |
| 75 | 75 | */ |
| 76 | - public function setLastDate(int|string|\DateTimeInterface $date): ResponseInterface |
|
| 76 | + public function setLastDate(int | string | \DateTimeInterface $date): ResponseInterface |
|
| 77 | 77 | { |
| 78 | 78 | return $this->download('set-last-date/%s/%s/', Utils\Fio::date($date)); |
| 79 | 79 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | private function download(string $apiUrl, string ...$args): ResponseInterface |
| 89 | 89 | { |
| 90 | 90 | $token = $this->account->getToken(); |
| 91 | - $requestUrl = Utils\Fio::REST_URL . sprintf($apiUrl, $token, ...$args); |
|
| 91 | + $requestUrl = Utils\Fio::REST_URL.sprintf($apiUrl, $token, ...$args); |
|
| 92 | 92 | |
| 93 | 93 | return $this->queue->download($token, $requestUrl); |
| 94 | 94 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | { |
| 73 | 73 | $response = $this->request( |
| 74 | 74 | $params['token'], |
| 75 | - $this->requestFactory->post(Fio::REST_URL . 'import/', $params, $content), |
|
| 75 | + $this->requestFactory->post(Fio::REST_URL.'import/', $params, $content), |
|
| 76 | 76 | ); |
| 77 | 77 | |
| 78 | 78 | return $this->createXmlResponse($response); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | { |
| 117 | 117 | $file = fopen(self::safeProtocol($filePath), 'w'); |
| 118 | 118 | if ($file === false) { |
| 119 | - throw new Exceptions\InvalidState('Open file is failed ' . $filePath); |
|
| 119 | + throw new Exceptions\InvalidState('Open file is failed '.$filePath); |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | return $file; |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | private static function safeProtocol(string $filename): string |
| 147 | 147 | { |
| 148 | - return SafeStream\Wrapper::Protocol . "://$filename"; |
|
| 148 | + return SafeStream\Wrapper::Protocol."://$filename"; |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | * @param array<T> $list |
| 32 | 32 | * @return T |
| 33 | 33 | */ |
| 34 | - public static function checkIsInList(string|int $value, array $list): string|int |
|
| 34 | + public static function checkIsInList(string | int $value, array $list): string | int |
|
| 35 | 35 | { |
| 36 | 36 | if (!in_array($value, $list, true)) { |
| 37 | 37 | throw new InvalidArgument(sprintf('Value "%s" is not contained in list: [%s].', $value, implode(', ', $list))); |
@@ -28,10 +28,10 @@ |
||
| 28 | 28 | assert($type instanceof \ReflectionNamedType); |
| 29 | 29 | |
| 30 | 30 | $value = $source->$column->value ?? null; |
| 31 | - $method = 'set' . ucfirst($propertyName); |
|
| 31 | + $method = 'set'.ucfirst($propertyName); |
|
| 32 | 32 | if (method_exists($transaction, $method)) { |
| 33 | 33 | $transaction->$method($value); |
| 34 | - } elseif(property_exists($transaction, $propertyName)) { |
|
| 34 | + } elseif (property_exists($transaction, $propertyName)) { |
|
| 35 | 35 | $transaction->$propertyName = $this->castValue($value, $type); |
| 36 | 36 | } else { |
| 37 | 37 | throw new InvalidArgument(sprintf('Missing property "%s" or method "%s" for set value.', $propertyName, $method)); |