Commit eac1393a authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Adaptation php8.4

parent c88ffecb
Loading
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -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);
@@ -115,8 +115,12 @@ abstract class AbstractAssertion implements AssertionInterface
            }
        }

        if (false === $this->role) {
            return null;
        }else {
            return $this->role;
        }
    }



@@ -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();

+1 −1
Original line number Diff line number Diff line
@@ -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');
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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