@@ 249-251 (lines=3) @@ | ||
246 | protected function initStorage() |
|
247 | { |
|
248 | /** @noinspection MkdirRaceConditionInspection */ |
|
249 | if (!file_exists(dirname($this->pathToFile)) && !mkdir(dirname($this->pathToFile), 0777, true)) { |
|
250 | throw new RuntimeException(sprintf('Could not create storage file on path "%s".', $this->pathToFile)); |
|
251 | } |
|
252 | ||
253 | if (!file_exists($this->pathToFile) && !(touch($this->pathToFile) && chmod($this->pathToFile, 0777))) { |
|
254 | throw new RuntimeException(sprintf('Could not create storage file on path "%s".', $this->pathToFile)); |
|
@@ 253-255 (lines=3) @@ | ||
250 | throw new RuntimeException(sprintf('Could not create storage file on path "%s".', $this->pathToFile)); |
|
251 | } |
|
252 | ||
253 | if (!file_exists($this->pathToFile) && !(touch($this->pathToFile) && chmod($this->pathToFile, 0777))) { |
|
254 | throw new RuntimeException(sprintf('Could not create storage file on path "%s".', $this->pathToFile)); |
|
255 | } |
|
256 | ||
257 | if (!is_readable($this->pathToFile)) { |
|
258 | throw new RuntimeException(sprintf('File on path "%s" for storing rates must be readable.', $this->pathToFile)); |