Code Duplication    Length = 3-3 lines in 2 locations

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,

lib/Sii.php 1 location

@@ 607-609 (lines=3) @@
604
        if (strpos($dte, '<?xml')===false) {
605
            $dte = '<?xml version="1.0" encoding="ISO-8859-1"?>'."\n".$dte;
606
        }
607
        do {
608
            $file = sys_get_temp_dir().'/dte_'.md5(microtime().$token.$dte).'.'.($gzip?'gz':'xml');
609
        } while (file_exists($file));
610
        if ($gzip) {
611
            $dte = gzencode($dte);
612
            if ($dte===false) {