Code Duplication    Length = 3-3 lines in 2 locations

lib/Sii.php 1 location

@@ 595-597 (lines=3) @@
592
        if (strpos($dte, '<?xml')===false) {
593
            $dte = '<?xml version="1.0" encoding="ISO-8859-1"?>'."\n".$dte;
594
        }
595
        do {
596
            $file = sys_get_temp_dir().'/dte_'.md5(microtime().$token.$dte).'.'.($gzip?'gz':'xml');
597
        } while (file_exists($file));
598
        if ($gzip) {
599
            $dte = gzencode($dte);
600
            if ($dte===false) {

lib/Sii/Factoring/Aec.php 1 location

@@ 190-192 (lines=3) @@
187
        if (strpos($dte, '<?xml') === false) {
188
            $dte = '<?xml version="1.0" encoding="ISO-8859-1"?>' . "\n" . $dte;
189
        }
190
        do {
191
            $file = sys_get_temp_dir() . '/aec_' . md5(microtime() . $token . $dte) . '.xml';
192
        } while (file_exists($file));
193
        file_put_contents($file, $dte);
194
        $data = [
195
            'emailNotif' => $email,