From 8b8107c30067b73ae8f909ca1000d45659d0dc2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bouc=CC=8Cek?= Date: Mon, 1 Feb 2021 13:18:54 +0100 Subject: [PATCH] Fix code style --- src/Access.php | 4 ++-- src/Membership.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Access.php b/src/Access.php index 2968491..8a2f5f5 100644 --- a/src/Access.php +++ b/src/Access.php @@ -327,11 +327,11 @@ public function user_can_view_content( $args = [] ) { $group = new Group( $group_id ); $membership = new Membership( get_current_user_id() ); - if ($group_id) { + if ( $group_id ) { if ( ! is_user_logged_in() || ! $membership->is_valid_for_group( $group_id ) ) { return false; } - } + } if ( $is_member == 'yes' ) { // Check, if the user is logged in and is member of the group, if not, bail diff --git a/src/Membership.php b/src/Membership.php index 90e4836..eaae983 100644 --- a/src/Membership.php +++ b/src/Membership.php @@ -107,11 +107,11 @@ public function is_valid_for_group( $group_id ) { continue; } - if (!empty($group['subscription_date']) && $group['subscription_date'] >= date( 'Y-m-d' )) { + if ( ! empty( $group['subscription_date'] ) && $group['subscription_date'] >= date( 'Y-m-d' ) ) { return false; } - if (!empty($group['valid_to']) && $group['valid_to'] <= date( 'Y-m-d' )) { + if ( ! empty( $group['valid_to'] ) && $group['valid_to'] <= date( 'Y-m-d' ) ) { return false; }