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

@@ 269-271 (lines=3) @@
266
    private function getLogFilename(): string
267
    {
268
        $logDir = $this->getLogDirectory();
269
        if (! @mkdir($logDir, 0777, true) && ! is_dir($logDir)) {
270
            throw new \RuntimeException('Cannot create folder for JSON logs');
271
        }
272
273
        $logFilename = getenv(EnvVariables::PROCESS_UNIQUE_ID) . '.json.log';
274
        if ($logFilename === false) {