Code Duplication    Length = 7-8 lines in 2 locations

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

@@ 1719-1725 (lines=7) @@
1716
        }
1717
        
1718
        if ( !empty( $wpinv_options['vat_vies_check'] ) ) {
1719
            if ( empty( $wpinv_options['vat_offline_check'] ) && !self::offline_check( $vat_number ) ) {
1720
                $vat_info['valid'] = false;
1721
                $wpi_session->set( 'user_vat_data', $vat_info );
1722
                
1723
                $response['error'] = wp_sprintf( __( '%s number not validated', 'invoicing' ), $vat_name );
1724
                wp_send_json( $response );
1725
            }
1726
            
1727
            $response['success'] = true;
1728
            $response['message'] = wp_sprintf( __( '%s number validated', 'invoicing' ), $vat_name );
@@ 1745-1752 (lines=8) @@
1742
            if ( !empty( $wpinv_options['vat_disable_company_name_check'] ) || $valid_company ) {
1743
                $response['success'] = true;
1744
                $response['message'] = wp_sprintf( __( '%s number validated', 'invoicing' ), $vat_name );
1745
            } else {           
1746
                $vat_info['valid'] = false;
1747
                $wpi_session->set( 'user_vat_data', $vat_info );
1748
                
1749
                $response['success'] = false;
1750
                $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 );
1751
                wp_send_json( $response );
1752
            }
1753
        }
1754
        
1755
        if ( $is_checkout ) {