mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
DX: fix cs
This commit is contained in:
@@ -63,18 +63,18 @@ class RoleScopeScopePresence extends ConstraintValidator
|
||||
|
||||
//if the role scope should have a scope
|
||||
if (
|
||||
!in_array($value->getRole(), $this->roleProvider->getRolesWithoutScopes(), true)
|
||||
&& $value->getScope() === null
|
||||
) {
|
||||
!in_array($value->getRole(), $this->roleProvider->getRolesWithoutScopes(), true)
|
||||
&& $value->getScope() === null
|
||||
) {
|
||||
$this->context->buildViolation($constraint->messagePresenceRequired)
|
||||
->setParameter('%role%', $this->translator->trans($value->getRole()))
|
||||
->addViolation();
|
||||
$this->logger->debug('the role scope should have a scope, but scope is null. Violation build.');
|
||||
} elseif // if the scope should be null
|
||||
(
|
||||
in_array($value->getRole(), $this->roleProvider->getRolesWithoutScopes(), true)
|
||||
&& null !== $value->getScope()
|
||||
) {
|
||||
(
|
||||
in_array($value->getRole(), $this->roleProvider->getRolesWithoutScopes(), true)
|
||||
&& null !== $value->getScope()
|
||||
) {
|
||||
$this->context->buildViolation($constraint->messageNullRequired)
|
||||
->setParameter('%role%', $this->translator->trans($value->getRole()))
|
||||
->addViolation();
|
||||
|
Reference in New Issue
Block a user