Code Duplication    Length = 5-5 lines in 2 locations

src/validation.php 2 locations

@@ 706-710 (lines=5) @@
703
704
    //try to find country code
705
    $countryCode = strtoupper(substr($pi, 0, 2));
706
    if (preg_match('/^[A-Za-z]{2}$/', $countryCode) === 1) {
707
        $pi = substr($pi, 2);
708
    }else{
709
        $countryCode='IT';
710
    }
711
712
    $result = true;
713
    if (function_exists('is'.$countryCode.'Vat')){
@@ 750-754 (lines=5) @@
747
748
    //try to find country code
749
    $countryCode = strtoupper(substr($pi, 0, 2));
750
    if (preg_match('/^[A-Za-z]{2}$/', $countryCode) === 1) {
751
        $pi = substr($pi, 2);
752
    }else{
753
        $countryCode='IT';
754
    }
755
756
    if($countryCode!='IT'){
757
        return false;