From 9f689cff247caf0885055d5471a74b77ac59d1cf Mon Sep 17 00:00:00 2001 From: DocArmoryTech Date: Fri, 2 Sep 2022 10:10:05 +0100 Subject: [PATCH] soft squash for stylistic consistency Replaced nested conditionals with cleaner equivalent to better match style --- src/Model/Table/UsersTable.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Model/Table/UsersTable.php b/src/Model/Table/UsersTable.php index 255fd40..dd900c5 100644 --- a/src/Model/Table/UsersTable.php +++ b/src/Model/Table/UsersTable.php @@ -56,10 +56,8 @@ class UsersTable extends AppTable private function initAuthBehaviors() { - if (!empty(Configure::read('keycloak'))) { - if (Configure::read('keycloak.enabled')) { - $this->addBehavior('AuthKeycloak'); - } + if (!empty(Configure::read('keycloak.enabled'))) { + $this->addBehavior('AuthKeycloak'); } } @@ -189,10 +187,8 @@ class UsersTable extends AppTable public function enrollUserRouter($data): void { - if (!empty(Configure::read('keycloak'))) { - if (Configure::read('keycloak.enabled')) { - $this->enrollUser($data); - } + if (!empty(Configure::read('keycloak.enabled'))) { + $this->enrollUser($data); } } }