Code Duplication    Length = 3-5 lines in 2 locations

includes/wpinv-general-functions.php 2 locations

@@ 373-375 (lines=3) @@
370
            if ( is_user_logged_in() ) {
371
                if ( (int)$invoice->get_user_id() === (int)get_current_user_id() ) {
372
                    $allow = true;
373
                } else if ( !wpinv_require_login_to_checkout() && isset( $_GET['invoice_key'] ) && $_GET['invoice_key'] === $invoice->get_key() ) {
374
                    $allow = true;
375
                }
376
            } else {
377
                if ( !wpinv_require_login_to_checkout() && isset( $_GET['invoice_key'] ) && $_GET['invoice_key'] === $invoice->get_key() ) {
378
                    $allow = true;
@@ 376-380 (lines=5) @@
373
                } else if ( !wpinv_require_login_to_checkout() && isset( $_GET['invoice_key'] ) && $_GET['invoice_key'] === $invoice->get_key() ) {
374
                    $allow = true;
375
                }
376
            } else {
377
                if ( !wpinv_require_login_to_checkout() && isset( $_GET['invoice_key'] ) && $_GET['invoice_key'] === $invoice->get_key() ) {
378
                    $allow = true;
379
                }
380
            }
381
        }
382
    }
383