cs: Enable risky rule is_null.

This commit is contained in:
Pol Dellaiera
2021-11-30 10:22:38 +01:00
parent e11c249131
commit 3631fd99fd
6 changed files with 11 additions and 17 deletions

View File

@@ -69,7 +69,7 @@ class RoleScopeScopePresence extends ConstraintValidator
} elseif // if the scope should be null
(
in_array($value->getRole(), $this->roleProvider->getRolesWithoutScopes())
&& !is_null($value->getScope())
&& null !== $value->getScope()
) {
$this->context->buildViolation($constraint->messageNullRequired)
->setParameter('%role%', $this->translator->trans($value->getRole()))