Code Duplication    Length = 7-8 lines in 2 locations

includes/libraries/wpinv-euvat/class-wpinv-euvat.php 2 locations

@@ 1724-1730 (lines=7) @@
1721
        }
1722
        
1723
        if ( !empty( $wpinv_options['vat_vies_check'] ) ) {
1724
            if ( empty( $wpinv_options['vat_offline_check'] ) && !self::offline_check( $vat_number ) ) {
1725
                $vat_info['valid'] = false;
1726
                $wpi_session->set( 'user_vat_data', $vat_info );
1727
                
1728
                $response['error'] = wp_sprintf( __( '%s number not validated', 'invoicing' ), $vat_name );
1729
                wp_send_json( $response );
1730
            }
1731
            
1732
            $response['success'] = true;
1733
            $response['message'] = wp_sprintf( __( '%s number validated', 'invoicing' ), $vat_name );
@@ 1750-1757 (lines=8) @@
1747
            if ( !empty( $wpinv_options['vat_disable_company_name_check'] ) || $valid_company ) {
1748
                $response['success'] = true;
1749
                $response['message'] = wp_sprintf( __( '%s number validated', 'invoicing' ), $vat_name );
1750
            } else {           
1751
                $vat_info['valid'] = false;
1752
                $wpi_session->set( 'user_vat_data', $vat_info );
1753
                
1754
                $response['success'] = false;
1755
                $response['message'] = wp_sprintf( __( 'The company name associated with the %s number provided is not the same as the company name provided.', 'invoicing' ), $vat_name );
1756
                wp_send_json( $response );
1757
            }
1758
        }
1759
        
1760
        if ( $is_checkout ) {