Code Duplication    Length = 3-3 lines in 2 locations

src/RunOpenCode/ExchangeRate/Repository/FileRepository.php 2 locations

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