@@ -29,7 +29,7 @@ |
||
29 | 29 | if (is_array($setup)) { |
30 | 30 | $setup = $this->numberFormatFactory->createUnit($setup); |
31 | 31 | } elseif (!$setup instanceof Number\UnitFormatState) { |
32 | - throw new Exchange\InvalidArgumentException('$setup must be array or ' . Number\UnitPersistentFormatState::class); |
|
32 | + throw new Exchange\InvalidArgumentException('$setup must be array or '.Number\UnitPersistentFormatState::class); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | $this->default = $setup; |
@@ -169,7 +169,7 @@ |
||
169 | 169 | if ($this->getListRates()->offsetExists($index)) { |
170 | 170 | return $this->getListRates()->offsetGet($index); |
171 | 171 | } |
172 | - throw new UnknownCurrencyException('Undefined currency code: "' . $index . '".'); |
|
172 | + throw new UnknownCurrencyException('Undefined currency code: "'.$index.'".'); |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | public function offsetExists($offset) |
@@ -55,7 +55,7 @@ |
||
55 | 55 | if ($date === NULL) { |
56 | 56 | return $url; |
57 | 57 | } |
58 | - return $url . '?date=' . urlencode($date->format('d.m.Y')); |
|
58 | + return $url.'?date='.urlencode($date->format('d.m.Y')); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | { |
78 | 78 | $listRates = $driver->download($date, $this->allowedCurrencies); |
79 | 79 | |
80 | - file_put_contents(Utils\SafeStream::PROTOCOL . '://' . $file->getPathname(), serialize($listRates)); |
|
80 | + file_put_contents(Utils\SafeStream::PROTOCOL.'://'.$file->getPathname(), serialize($listRates)); |
|
81 | 81 | if (self::isFileCurrent($file)) { |
82 | 82 | touch($file->getPathname(), $this->getRefresh()); |
83 | 83 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | { |
90 | 90 | if ($this->isFileValid($file)) { |
91 | 91 | Utils\FileSystem::createDir($file->getPath(), 0755); |
92 | - $handle = fopen(Utils\SafeStream::PROTOCOL . '://' . $this->temp . DIRECTORY_SEPARATOR . 'lock', 'w'); |
|
92 | + $handle = fopen(Utils\SafeStream::PROTOCOL.'://'.$this->temp.DIRECTORY_SEPARATOR.'lock', 'w'); |
|
93 | 93 | |
94 | 94 | if ($this->isFileValid($file)) { |
95 | 95 | $listRate = $this->saveCurrencies($driver, $file, $date); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | private function getRefresh() |
116 | 116 | { |
117 | 117 | if (!is_int($this->refresh)) { |
118 | - $this->refresh = (new \DateTime('today ' . $this->refresh))->format('U'); |
|
118 | + $this->refresh = (new \DateTime('today '.$this->refresh))->format('U'); |
|
119 | 119 | if (time() >= $this->refresh) { |
120 | 120 | $this->refresh += Utils\DateTime::DAY; |
121 | 121 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | private function createFileInfo(Driver\ADriver $driver, \DateTime $date = NULL) |
127 | 127 | { |
128 | 128 | $filename = $date === NULL ? self::FILE_CURRENT : $date->format('Y-m-d'); |
129 | - return new \SplFileInfo($this->temp . DIRECTORY_SEPARATOR . $driver->getName() . DIRECTORY_SEPARATOR . $filename); |
|
129 | + return new \SplFileInfo($this->temp.DIRECTORY_SEPARATOR.$driver->getName().DIRECTORY_SEPARATOR.$filename); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | private static function isFileCurrent(\SplFileInfo $file) |