Code Duplication    Length = 3-3 lines in 2 locations

src/XmlSchemaValidator/Downloader/CurlDownloader.php 1 location

@@ 8-10 (lines=3) @@
5
{
6
    public function download($url, $timeout)
7
    {
8
        if (false === $tempname = tempnam(null, null)) {
9
            throw new \RuntimeException('Cannot create a temporary file');
10
        }
11
        if (false === $fileHandler = fopen($tempname, 'w+')) {
12
            throw new \RuntimeException("Cannot create file $tempname");
13
        }

src/XmlSchemaValidator/Downloader/PhpDownloader.php 1 location

@@ 8-10 (lines=3) @@
5
{
6
    public function download($url, $timeout)
7
    {
8
        if (false === $tempname = tempnam(null, null)) {
9
            throw new \RuntimeException('Cannot create a temporary file');
10
        }
11
        $ctx = stream_context_create([
12
            'http' => [
13
                'timeout' => $timeout,