Code Duplication    Length = 8-9 lines in 2 locations

src/PhpSpreadsheet/Shared/PCLZip/PclZip.php 2 locations

@@ 4458-4466 (lines=9) @@
4455
                unset($v_local_header);
4456
4457
                // ----- Write the file header
4458
                if (($v_result = $v_temp_zip->privWriteFileHeader($v_header_list[$i])) != 1) {
4459
                    // ----- Close the zip file
4460
                    $this->privCloseFd();
4461
                    $v_temp_zip->privCloseFd();
4462
                    @unlink($v_zip_temp_name);
4463
4464
                    // ----- Return
4465
                    return $v_result;
4466
                }
4467
4468
                // ----- Read/write the data block
4469
                if (($v_result = PclZipUtilCopyBlock($this->zip_fd, $v_temp_zip->zip_fd, $v_header_list[$i]['compressed_size'])) != 1) {
@@ 4486-4493 (lines=8) @@
4483
            // ----- Re-Create the Central Dir files header
4484
            for ($i = 0; $i < sizeof($v_header_list); ++$i) {
4485
                // ----- Create the file header
4486
                if (($v_result = $v_temp_zip->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
4487
                    $v_temp_zip->privCloseFd();
4488
                    $this->privCloseFd();
4489
                    @unlink($v_zip_temp_name);
4490
4491
                    // ----- Return
4492
                    return $v_result;
4493
                }
4494
4495
                // ----- Transform the header to a 'usable' info
4496
                $v_temp_zip->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);