Loading src/UnicaenPrivilege/Assertion/AbstractAssertion.php +7 −3 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ abstract class AbstractAssertion implements AssertionInterface * $role, $this->resource, or $privilege parameters are null, it means that the query applies to all Roles, Resources, or * privileges, respectively. */ public final function assert(Acl $acl, ?RoleInterface $role = null, string|ResourceInterface|null $resource = null, ?string $privilege = null): bool public final function assert(Acl $acl, ?RoleInterface $role = null, ?ResourceInterface $resource = null, $privilege = null): bool { $this->setAcl($acl); $this->setRole($role); Loading Loading @@ -115,8 +115,12 @@ abstract class AbstractAssertion implements AssertionInterface } } if (false === $this->role) { return null; }else { return $this->role; } } Loading @@ -129,7 +133,7 @@ abstract class AbstractAssertion implements AssertionInterface private function detectPrivilege(string|ResourceInterface $resource = null): bool private function detectPrivilege(?ResourceInterface $resource = null): bool { if ($resource instanceof ResourceInterface) $resource = $resource->getResourceId(); Loading src/UnicaenPrivilege/Assertion/AssertionFactory.php +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ class AssertionFactory implements FactoryInterface * * @return UserContext */ public function __invoke(ContainerInterface $container, $requestedName, array $options = null) public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) { /* @var $application Application */ $application = $container->get('Application'); Loading src/UnicaenPrivilege/Controller/PrivilegeCategorieControllerFactory.php +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ class PrivilegeCategorieControllerFactory * @param array|null $options * @return PrivilegeCategorieController|object */ public function __invoke(ContainerInterface $container, $requestedName, array $options = null) public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) { /** * @var PrivilegeCategorieService $categorieService Loading src/UnicaenPrivilege/Controller/PrivilegeControllerFactory.php +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ class PrivilegeControllerFactory * @param array|null $options * @return PrivilegeController|object */ public function __invoke(ContainerInterface $container, $requestedName, array $options = null) public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) { /** * @var PrivilegeCategorieService $categorieService Loading src/UnicaenPrivilege/Form/Privilege/CategorieFiltreFormFactory.php +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ class CategorieFiltreFormFactory * @param array|null $options * @return CategorieFiltreForm|object */ public function __invoke(ContainerInterface $container, $requestedName, array $options = null) public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) { /** * @var EntityManager $entityManager Loading Loading
src/UnicaenPrivilege/Assertion/AbstractAssertion.php +7 −3 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ abstract class AbstractAssertion implements AssertionInterface * $role, $this->resource, or $privilege parameters are null, it means that the query applies to all Roles, Resources, or * privileges, respectively. */ public final function assert(Acl $acl, ?RoleInterface $role = null, string|ResourceInterface|null $resource = null, ?string $privilege = null): bool public final function assert(Acl $acl, ?RoleInterface $role = null, ?ResourceInterface $resource = null, $privilege = null): bool { $this->setAcl($acl); $this->setRole($role); Loading Loading @@ -115,8 +115,12 @@ abstract class AbstractAssertion implements AssertionInterface } } if (false === $this->role) { return null; }else { return $this->role; } } Loading @@ -129,7 +133,7 @@ abstract class AbstractAssertion implements AssertionInterface private function detectPrivilege(string|ResourceInterface $resource = null): bool private function detectPrivilege(?ResourceInterface $resource = null): bool { if ($resource instanceof ResourceInterface) $resource = $resource->getResourceId(); Loading
src/UnicaenPrivilege/Assertion/AssertionFactory.php +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ class AssertionFactory implements FactoryInterface * * @return UserContext */ public function __invoke(ContainerInterface $container, $requestedName, array $options = null) public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) { /* @var $application Application */ $application = $container->get('Application'); Loading
src/UnicaenPrivilege/Controller/PrivilegeCategorieControllerFactory.php +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ class PrivilegeCategorieControllerFactory * @param array|null $options * @return PrivilegeCategorieController|object */ public function __invoke(ContainerInterface $container, $requestedName, array $options = null) public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) { /** * @var PrivilegeCategorieService $categorieService Loading
src/UnicaenPrivilege/Controller/PrivilegeControllerFactory.php +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ class PrivilegeControllerFactory * @param array|null $options * @return PrivilegeController|object */ public function __invoke(ContainerInterface $container, $requestedName, array $options = null) public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) { /** * @var PrivilegeCategorieService $categorieService Loading
src/UnicaenPrivilege/Form/Privilege/CategorieFiltreFormFactory.php +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ class CategorieFiltreFormFactory * @param array|null $options * @return CategorieFiltreForm|object */ public function __invoke(ContainerInterface $container, $requestedName, array $options = null) public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) { /** * @var EntityManager $entityManager Loading