Code Duplication    Length = 3-3 lines in 2 locations

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

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