src/utils/RedirectCheckout.php
Showing 27 of 27 total issues
The function VindiRedirectToMyAccount() contains an exit expression. Open
Open
exit;
- Read upRead up
- Exclude checks
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 10 and the first side effect is on line 19. Open
Open
<?php
- Exclude checks
Inline control structures are not allowed Open
Open
if(is_user_logged_in() || get_option('woocommerce_enable_guest_checkout') == "yes") return;
- Exclude checks
Whitespace found at end of line Open
Open
(! is_user_logged_in() && get_option('woocommerce_enable_guest_checkout') == "no")
- Exclude checks
Expected 0 spaces after opening bracket; newline found Open
Open
if (
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_redirect(get_permalink( wc_get_page_id( 'myaccount' ) ));
- Exclude checks
Whitespace found at end of line Open
Open
&& (is_checkout())
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
Open
wp_redirect(get_permalink( wc_get_page_id( 'myaccount' ) ));
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_redirect(get_permalink( wc_get_page_id( 'myaccount' ) ));
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
wp_redirect(get_permalink( wc_get_page_id( 'myaccount' ) ));
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
<?php _e('Clique aqui para acessar uma conta existente ou criá-la.', VINDI ); ?>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
<a href="<?php echo get_permalink( wc_get_page_id( 'myaccount' ) ); ?>">
- Exclude checks
Opening brace should be on a new line Open
Open
function VindiRedirectInfo() {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
Open
if (
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
Open
) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
Open
?>
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 6 Open
Open
<?php _e('Clique aqui para acessar uma conta existente ou criá-la.', VINDI ); ?>
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
wp_redirect(get_permalink( wc_get_page_id( 'myaccount' ) ));
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
<a href="<?php echo get_permalink( wc_get_page_id( 'myaccount' ) ); ?>">
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
Open
if(is_user_logged_in() || get_option('woocommerce_enable_guest_checkout') == "yes") return;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 6 Open
Open
<?php _e('Para finalizar sua compra, é necessário estar logado', VINDI); ?>
- Exclude checks
Opening brace should be on a new line Open
Open
function VindiRedirectToMyAccount() {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
Open
if(is_user_logged_in() || get_option('woocommerce_enable_guest_checkout') == "yes") return;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
Open
exit;
- Exclude checks
Space after opening parenthesis of function call prohibited Open
Open
<a href="<?php echo get_permalink( wc_get_page_id( 'myaccount' ) ); ?>">
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
Open
<a href="<?php echo get_permalink( wc_get_page_id( 'myaccount' ) ); ?>">
- Exclude checks