@@ 258-260 (lines=3) @@ | ||
255 | protected function initialize() |
|
256 | { |
|
257 | /** @noinspection MkdirRaceConditionInspection */ |
|
258 | if (!file_exists(dirname($this->pathToFile)) && !mkdir(dirname($this->pathToFile), 0777, true)) { |
|
259 | throw new RuntimeException(sprintf('Could not create storage file on path "%s".', $this->pathToFile)); |
|
260 | } |
|
261 | ||
262 | if (!file_exists($this->pathToFile) && !(touch($this->pathToFile) && chmod($this->pathToFile, 0777))) { |
|
263 | throw new RuntimeException(sprintf('Could not create storage file on path "%s".', $this->pathToFile)); |
|
@@ 262-264 (lines=3) @@ | ||
259 | throw new RuntimeException(sprintf('Could not create storage file on path "%s".', $this->pathToFile)); |
|
260 | } |
|
261 | ||
262 | if (!file_exists($this->pathToFile) && !(touch($this->pathToFile) && chmod($this->pathToFile, 0777))) { |
|
263 | throw new RuntimeException(sprintf('Could not create storage file on path "%s".', $this->pathToFile)); |
|
264 | } |
|
265 | ||
266 | if (!is_readable($this->pathToFile)) { |
|
267 | throw new RuntimeException(sprintf('File on path "%s" for storing rates must be readable.', $this->pathToFile)); |