Code Duplication    Length = 9-9 lines in 2 locations

src/Adapter/ZipExtensionAdapter.php 2 locations

@@ 325-333 (lines=9) @@
322
     * @param \ZipArchive $zip
323
     * @param string      $file
324
     */
325
    public function addFileToZip(\ZipArchive $zip, $file)
326
    {
327
        if (!$zip->addFile($file)) {
328
            $zip->unchangeAll();
329
            $zip->close();
330
331
            throw new RuntimeException(sprintf('unable to add %s to the zip file', $file));
332
        }
333
    }
334
335
    /**
336
     * Is public for PHP 5.3 compatibility, should be private
@@ 341-349 (lines=9) @@
338
     * @param \ZipArchive $zip
339
     * @param string      $dir
340
     */
341
    public function addEmptyDir(\ZipArchive $zip, $dir)
342
    {
343
        if (!$zip->addEmptyDir($dir)) {
344
            $zip->unchangeAll();
345
            $zip->close();
346
347
            throw new RuntimeException(sprintf('unable to add %s to the zip file', $dir));
348
        }
349
    }
350
351
    /**
352
     * Flushes changes to the archive