Code Duplication    Length = 3-3 lines in 2 locations

src/Paraunit/File/TempDirectory.php 1 location

@@ 82-84 (lines=3) @@
79
            return;
80
        }
81
82
        if (!mkdir($path) && !is_dir($path)) {
83
            throw new \RuntimeException('Unable to create temporary directory ' . $path);
84
        }
85
    }
86
}
87

src/Paraunit/Parser/JSON/LogPrinter.php 1 location

@@ 48-50 (lines=3) @@
45
        $logFilename = $this->getLogFilename();
46
47
        $logDir = $this->getLogDirectory();
48
        if (! @mkdir($logDir, 0777, true) && ! is_dir($logDir)) {
49
            throw new \RuntimeException('Cannot create folder for JSON logs');
50
        }
51
52
        $this->out = fopen($logDir . $logFilename, 'wt');
53
    }