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

@@ 278-280 (lines=3) @@
275
    private function getLogFilename(): string
276
    {
277
        $logDir = $this->getLogDirectory();
278
        if (! @mkdir($logDir, 0777, true) && ! is_dir($logDir)) {
279
            throw new \RuntimeException('Cannot create folder for JSON logs');
280
        }
281
282
        $logFilename = getenv(EnvVariables::PROCESS_UNIQUE_ID);
283
        if ($logFilename === false) {