Code Duplication    Length = 3-4 lines in 2 locations

main/inc/lib/document.lib.php 2 locations

@@ 2494-2496 (lines=3) @@
2491
                $name = trim($regs[3][$i]);
2492
                $check = trim($regs[0][$i]);
2493
                $value = trim($regs[10][$i]);
2494
                if (empty($value) and !empty($regs[13][$i])) {
2495
                    $value = $regs[13][$i];
2496
                }
2497
                if (empty($name) && !empty($regs[16][$i])) {
2498
                    $name = '@import';
2499
                    $value = trim($regs[16][$i]);
@@ 2497-2500 (lines=4) @@
2494
                if (empty($value) and !empty($regs[13][$i])) {
2495
                    $value = $regs[13][$i];
2496
                }
2497
                if (empty($name) && !empty($regs[16][$i])) {
2498
                    $name = '@import';
2499
                    $value = trim($regs[16][$i]);
2500
                }
2501
                if (!empty($name)) {
2502
                    if (!$reduced OR in_array(strtolower($name), $wanted)) {
2503
                        if ($name == $check) {