mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-26 17:43:54 +00:00
upgrade php-cs 3.49
This commit is contained in:
@@ -61,7 +61,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface
|
||||
*
|
||||
* @return User[]
|
||||
*/
|
||||
public function findUsersReaching(string $role, array|Center $center, array|Scope $scope = null, bool $onlyEnabled = true): array
|
||||
public function findUsersReaching(string $role, array|Center $center, array|Scope|null $scope = null, bool $onlyEnabled = true): array
|
||||
{
|
||||
return $this->userACLAwareRepository
|
||||
->findUsersByReachedACL($role, $center, $scope, $onlyEnabled);
|
||||
@@ -86,7 +86,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface
|
||||
*
|
||||
* @return list<Center>
|
||||
*/
|
||||
public function getReachableCenters(UserInterface $user, string $role, Scope $scope = null): array
|
||||
public function getReachableCenters(UserInterface $user, string $role, ?Scope $scope = null): array
|
||||
{
|
||||
if (!$user instanceof User) {
|
||||
return [];
|
||||
|
@@ -21,7 +21,7 @@ class AuthorizationHelperForCurrentUser implements AuthorizationHelperForCurrent
|
||||
{
|
||||
}
|
||||
|
||||
public function getReachableCenters(string $role, Scope $scope = null): array
|
||||
public function getReachableCenters(string $role, ?Scope $scope = null): array
|
||||
{
|
||||
if (!$this->security->getUser() instanceof User) {
|
||||
return [];
|
||||
|
@@ -22,7 +22,7 @@ interface AuthorizationHelperForCurrentUserInterface
|
||||
*
|
||||
* @return Center[]
|
||||
*/
|
||||
public function getReachableCenters(string $role, Scope $scope = null): array;
|
||||
public function getReachableCenters(string $role, ?Scope $scope = null): array;
|
||||
|
||||
/**
|
||||
* @param list<Center>|Center $center
|
||||
|
@@ -23,7 +23,7 @@ interface AuthorizationHelperInterface
|
||||
*
|
||||
* @return list<Center>
|
||||
*/
|
||||
public function getReachableCenters(UserInterface $user, string $role, Scope $scope = null): array;
|
||||
public function getReachableCenters(UserInterface $user, string $role, ?Scope $scope = null): array;
|
||||
|
||||
/**
|
||||
* @param Center|array<Center> $center
|
||||
|
@@ -37,7 +37,7 @@ final readonly class ScopeResolverDispatcher
|
||||
/**
|
||||
* @return Scope|iterable<Scope>|Scope|null
|
||||
*/
|
||||
public function resolveScope(mixed $entity, ?array $options = []): null|iterable|Scope
|
||||
public function resolveScope(mixed $entity, ?array $options = []): iterable|Scope|null
|
||||
{
|
||||
foreach ($this->resolvers as $resolver) {
|
||||
if ($resolver->supports($entity, $options)) {
|
||||
|
Reference in New Issue
Block a user