Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 1076-1084 (lines=9) @@
1073
        // ----- Look if file exists
1074
        if (@is_file($this->zipname)) {
1075
            // ----- Open the zip file
1076
            if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0) {
1077
                $this->privSwapBackMagicQuotes();
1078
1079
                // ----- Error log
1080
                self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \'' . $this->zipname . '\' in binary read mode');
1081
1082
                // ----- Return
1083
                return 0;
1084
            }
1085
1086
            // ----- Read the central directory informations
1087
            $v_central_dir = [];
@@ 2958-2967 (lines=10) @@
2955
        $this->privDisableMagicQuotes();
2956
2957
        // ----- Open the zip file
2958
        if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0) {
2959
            // ----- Magic quotes trick
2960
            $this->privSwapBackMagicQuotes();
2961
2962
            // ----- Error log
2963
            self::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \'' . $this->zipname . '\' in binary read mode');
2964
2965
            // ----- Return
2966
            return self::errorCode();
2967
        }
2968
2969
        // ----- Read the central directory informations
2970
        $v_central_dir = [];