Code Duplication    Length = 4-7 lines in 3 locations

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

@@ 3516-3522 (lines=7) @@
3513
                // ----- Look for not compressed file
3514
                if ($p_entry['compression'] == 0) {
3515
                    // ----- Opening destination file
3516
                    if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
3517
                        // ----- Change the file status
3518
                        $p_entry['status'] = 'write_error';
3519
3520
                        // ----- Return
3521
                        return $v_result;
3522
                    }
3523
3524
                    // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks
3525
                    $v_size = $p_entry['compressed_size'];
@@ 3574-3579 (lines=6) @@
3571
                        }
3572
3573
                        // ----- Opening destination file
3574
                        if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
3575
                            // ----- Change the file status
3576
                            $p_entry['status'] = 'write_error';
3577
3578
                            return $v_result;
3579
                        }
3580
3581
                        // ----- Write the uncompressed data
3582
                        @fwrite($v_dest_file, $v_file_content, $p_entry['size']);
@@ 3668-3671 (lines=4) @@
3665
        @fclose($v_dest_file);
3666
3667
        // ----- Opening destination file
3668
        if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
3669
            $p_entry['status'] = 'write_error';
3670
3671
            return $v_result;
3672
        }
3673
3674
        // ----- Open the temporary gz file