From a80935ec01eb1ba626fa16b8cf93a7e3d6e797a9 Mon Sep 17 00:00:00 2001 From: Guite Date: Sat, 11 Jul 2020 12:44:14 +0200 Subject: [PATCH] fixed wrong typehint --- Helper/AcceptPoliciesHelper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Helper/AcceptPoliciesHelper.php b/Helper/AcceptPoliciesHelper.php index 4193dde..d0b3c9a 100644 --- a/Helper/AcceptPoliciesHelper.php +++ b/Helper/AcceptPoliciesHelper.php @@ -85,15 +85,15 @@ public function getActivePolicies(): array /** * Helper method to determine acceptance / confirmation states for current user. */ - private function determineAcceptanceState(int $uid = null, string $modVarName = ''): bool + private function determineAcceptanceState(int $uid = null, string $modVarName = ''): ?string { - $acceptanceState = false; + $acceptanceState = null; if (null !== $uid && !empty($uid) && is_numeric($uid) && $uid > 0) { if ($uid > Constant::USER_ID_ADMIN) { /** @var UserEntity $user */ $user = $this->userRepository->find($uid); - $acceptanceState = $user->getAttributes()->containsKey($modVarName) ? $user->getAttributeValue($modVarName) : false; + $acceptanceState = $user->getAttributes()->containsKey($modVarName) ? $user->getAttributeValue($modVarName) : null; } else { // The special users (uid == UsersConstant::USER_ID_ADMIN or UsersConstant::USER_ID_ANONYMOUS) have always accepted all policies. $now = new \DateTime('now', new DateTimeZone('UTC'));