Code Duplication    Length = 22-25 lines in 2 locations

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

@@ 4874-4898 (lines=25) @@
4871
    // Parameters :
4872
    // Return Values :
4873
    // --------------------------------------------------------------------------------
4874
    public function privDisableMagicQuotes()
4875
    {
4876
        $v_result = 1;
4877
4878
        // ----- Look if function exists
4879
        if ((!function_exists('get_magic_quotes_runtime')) || (!function_exists('set_magic_quotes_runtime'))) {
4880
            return $v_result;
4881
        }
4882
4883
        // ----- Look if already done
4884
        if ($this->magic_quotes_status != -1) {
4885
            return $v_result;
4886
        }
4887
4888
        // ----- Get and memorize the magic_quote value
4889
        $this->magic_quotes_status = @get_magic_quotes_runtime();
4890
4891
        // ----- Disable magic_quotes
4892
        if ($this->magic_quotes_status == 1) {
4893
            @set_magic_quotes_runtime(0);
4894
        }
4895
4896
        // ----- Return
4897
        return $v_result;
4898
    }
4899
    // --------------------------------------------------------------------------------
4900
4901
    // --------------------------------------------------------------------------------
@@ 4907-4928 (lines=22) @@
4904
    // Parameters :
4905
    // Return Values :
4906
    // --------------------------------------------------------------------------------
4907
    public function privSwapBackMagicQuotes()
4908
    {
4909
        $v_result = 1;
4910
4911
        // ----- Look if function exists
4912
        if ((!function_exists('get_magic_quotes_runtime')) || (!function_exists('set_magic_quotes_runtime'))) {
4913
            return $v_result;
4914
        }
4915
4916
        // ----- Look if something to do
4917
        if ($this->magic_quotes_status != -1) {
4918
            return $v_result;
4919
        }
4920
4921
        // ----- Swap back magic_quotes
4922
        if ($this->magic_quotes_status == 1) {
4923
            @set_magic_quotes_runtime($this->magic_quotes_status);
4924
        }
4925
4926
        // ----- Return
4927
        return $v_result;
4928
    }
4929
    // --------------------------------------------------------------------------------
4930
}
4931
// End of class