Code Duplication    Length = 3-3 lines in 2 locations

src/Paraunit/File/TempDirectory.php 1 location

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

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

@@ 172-174 (lines=3) @@
169
            $logFilename = $this->getLogFilename($suite);
170
171
            $logDir = dirname($logFilename);
172
            if (! @mkdir($logDir, 0777, true) && !is_dir($logDir)) {
173
                throw new \RuntimeException('Cannot create folder for JSON logs');
174
            }
175
176
            $this->out = fopen($logFilename, 'wt');
177
        }