Code Duplication    Length = 4-4 lines in 2 locations

includes/class-wpinv-reports.php 1 location

@@ 202-205 (lines=4) @@
199
        $data['step']   = !empty( $_POST['step'] ) ? absint( $_POST['step'] ) : 1;
200
201
        $_REQUEST = (array)$data;
202
        if ( !( !empty( $_REQUEST['wpi_ajax_export'] ) && wp_verify_nonce( $_REQUEST['wpi_ajax_export'], 'wpi_ajax_export' ) ) ) {
203
            $response['msg']    = __( 'Security check failed.', 'invoicing' );
204
            wp_send_json( $response );
205
        }
206
        
207
        if ( ( $error = $this->check_export_location( true ) ) !== true ) {
208
            $response['msg'] = __( 'Filesystem ERROR: ' . $error, 'invoicing' );

includes/libraries/wpinv-euvat/class-wpinv-euvat.php 1 location

@@ 1667-1670 (lines=4) @@
1664
        $response               = array();
1665
        $response['success']    = false;
1666
        
1667
        if ( empty( $_REQUEST['_wpi_nonce'] ) || ( !empty( $_REQUEST['_wpi_nonce'] ) && !wp_verify_nonce( $_REQUEST['_wpi_nonce'], 'vat_validation' ) ) ) {
1668
            $response['error'] = __( 'Invalid security nonce', 'invoicing' );
1669
            wp_send_json( $response );
1670
        }
1671
        
1672
        $vat_name   = self::get_vat_name();
1673