Code Duplication    Length = 3-3 lines in 2 locations

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

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