@@ -139,7 +139,7 @@ |
||
139 | 139 | $variableApi->set(VariableApi::CONFIG, 'sessionsavepath', $sessionSavePath); |
140 | 140 | } |
141 | 141 | |
142 | - if ((bool)$sessionStoreToFile !== (bool)$variableApi->getSystemVar('sessionstoretofile')) { |
|
142 | + if ((bool) $sessionStoreToFile !== (bool) $variableApi->getSystemVar('sessionstoretofile')) { |
|
143 | 143 | // logout if going from one storage to another one |
144 | 144 | $causeLogout = true; |
145 | 145 | } |
@@ -75,7 +75,7 @@ |
||
75 | 75 | ]) |
76 | 76 | ->add('signingkey', TextType::class, [ |
77 | 77 | 'label' => 'Signing key', |
78 | - 'empty_data' => sha1((string)random_int(0, time())), |
|
78 | + 'empty_data' => sha1((string) random_int(0, time())), |
|
79 | 79 | 'attr' => [ |
80 | 80 | 'maxlength' => 100 |
81 | 81 | ], |
@@ -71,7 +71,7 @@ |
||
71 | 71 | // fetch different username and password fields depending on the transport type |
72 | 72 | $credentialsSuffix = 'gmail' === $formData['transport'] ? 'Gmail' : ''; |
73 | 73 | |
74 | - $transport = (string)$formData['transport']; |
|
74 | + $transport = (string) $formData['transport']; |
|
75 | 75 | $disableDelivery = false; |
76 | 76 | if ('test' === $transport) { |
77 | 77 | $transport = null; |
@@ -106,7 +106,7 @@ |
||
106 | 106 | } |
107 | 107 | // remove disabled |
108 | 108 | foreach ($searchModules as $displayName => $moduleName) { |
109 | - if ((bool)$this->getVar('disable_' . $moduleName)) { |
|
109 | + if ((bool) $this->getVar('disable_' . $moduleName)) { |
|
110 | 110 | unset($searchModules[$displayName]); |
111 | 111 | } |
112 | 112 | } |
@@ -170,8 +170,8 @@ |
||
170 | 170 | if (1 === mb_strlen($saltDelimiter) && false !== mb_strpos($saltedHash, $saltDelimiter)) { |
171 | 171 | list($hashMethod, $saltStr, $correctHash) = explode($saltDelimiter, $saltedHash); |
172 | 172 | |
173 | - if (is_numeric($hashMethod) && ((int)$hashMethod === $hashMethod)) { |
|
174 | - $hashMethod = (int)$hashMethod; |
|
173 | + if (is_numeric($hashMethod) && ((int) $hashMethod === $hashMethod)) { |
|
174 | + $hashMethod = (int) $hashMethod; |
|
175 | 175 | } |
176 | 176 | $hashMethodName = $hashMethodCodeToName[$hashMethod] ?? $hashMethod; |
177 | 177 |
@@ -306,7 +306,7 @@ |
||
306 | 306 | if ($form->isSubmitted() && $form->isValid()) { |
307 | 307 | $data = $form->getData(); |
308 | 308 | $code = $passwordApi->generatePassword(); |
309 | - $currentUserId = (int)$currentUserApi->get('uid'); |
|
309 | + $currentUserId = (int) $currentUserApi->get('uid'); |
|
310 | 310 | $userVerificationRepository->setVerificationCode($currentUserId, ZAuthConstant::VERIFYCHGTYPE_EMAIL, $passwordApi->getHashedPassword($code), $data['email']); |
311 | 311 | $templateArgs = [ |
312 | 312 | 'uname' => $currentUserApi->get('uname'), |
@@ -441,7 +441,7 @@ |
||
441 | 441 | $form->handleRequest($request); |
442 | 442 | if ($form->isSubmitted() && $form->isValid()) { |
443 | 443 | if ($form->get('toggle')->isClicked()) { |
444 | - if ($user->getAttributes()->containsKey(ZAuthConstant::REQUIRE_PASSWORD_CHANGE_KEY) && (bool)$user->getAttributes()->get(ZAuthConstant::REQUIRE_PASSWORD_CHANGE_KEY)) { |
|
444 | + if ($user->getAttributes()->containsKey(ZAuthConstant::REQUIRE_PASSWORD_CHANGE_KEY) && (bool) $user->getAttributes()->get(ZAuthConstant::REQUIRE_PASSWORD_CHANGE_KEY)) { |
|
445 | 445 | $user->getAttributes()->remove(ZAuthConstant::REQUIRE_PASSWORD_CHANGE_KEY); |
446 | 446 | $this->addFlash('success', $this->trans('Done! A password change will no longer be required for %userName%.', ['%userName%' => $user->getUname()])); |
447 | 447 | } else { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | ->setParameter('excludedUid', $authenticationMappingEntity->getUid()); |
73 | 73 | } |
74 | 74 | |
75 | - if ((int)$qb->getQuery()->getSingleScalarResult() > 0) { |
|
75 | + if ((int) $qb->getQuery()->getSingleScalarResult() > 0) { |
|
76 | 76 | $this->context->buildViolation($this->translator->trans('The user name you entered (%userName%) has already been registered.', ['%userName%' => $userName], 'validators')) |
77 | 77 | ->atPath('uname') |
78 | 78 | ->addViolation(); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $qb->andWhere('m.uid != :excludedUid') |
92 | 92 | ->setParameter('excludedUid', $authenticationMappingEntity->getUid()); |
93 | 93 | } |
94 | - $uCount = (int)$qb->getQuery()->getSingleScalarResult(); |
|
94 | + $uCount = (int) $qb->getQuery()->getSingleScalarResult(); |
|
95 | 95 | |
96 | 96 | $query = $this->userVerificationRepository->createQueryBuilder('v') |
97 | 97 | ->select('count(v.uid)') |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | ->setParameter('email', $emailAddress) |
101 | 101 | ->setParameter('chgtype', ZAuthConstant::VERIFYCHGTYPE_EMAIL) |
102 | 102 | ->getQuery(); |
103 | - $vCount = (int)$query->getSingleScalarResult(); |
|
103 | + $vCount = (int) $query->getSingleScalarResult(); |
|
104 | 104 | |
105 | 105 | if ($uCount + $vCount > 0) { |
106 | 106 | $this->context->buildViolation($this->translator->trans('The email address you entered (%email%) has already been registered.', ['%email%' => $emailAddress], 'validators')) |
@@ -104,7 +104,7 @@ |
||
104 | 104 | if ($hasEditPermissionToUser) { |
105 | 105 | $userEntity = $this->userRepository->find($mapping->getUid()); |
106 | 106 | if (null !== $userEntity) { |
107 | - if ((bool)$userEntity->getAttributeValue(ZAuthConstant::REQUIRE_PASSWORD_CHANGE_KEY) |
|
107 | + if ((bool) $userEntity->getAttributeValue(ZAuthConstant::REQUIRE_PASSWORD_CHANGE_KEY) |
|
108 | 108 | && $userEntity->getAttributes()->containsKey(ZAuthConstant::REQUIRE_PASSWORD_CHANGE_KEY) |
109 | 109 | ) { |
110 | 110 | $title = $this->translator->trans('Cancel required change of password for %sub%', ['%sub%' => $mapping->getUname()]); |