mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 23:53:50 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\MainBundle\Security\Resolver;
|
||||
|
||||
use Chill\MainBundle\Entity\Scope;
|
||||
@@ -16,9 +23,21 @@ final class ScopeResolverDispatcher
|
||||
$this->resolvers = $resolvers;
|
||||
}
|
||||
|
||||
public function isConcerned($entity, ?array $options = []): bool
|
||||
{
|
||||
foreach ($this->resolvers as $resolver) {
|
||||
if ($resolver->supports($entity, $options)) {
|
||||
return $resolver->isConcerned($entity, $options);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $entity
|
||||
* @return Scope|Scope[]|iterable
|
||||
*
|
||||
* @return iterable|Scope|Scope[]
|
||||
*/
|
||||
public function resolveScope($entity, ?array $options = [])
|
||||
{
|
||||
@@ -30,15 +49,4 @@ final class ScopeResolverDispatcher
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function isConcerned($entity, ?array $options = []): bool
|
||||
{
|
||||
foreach ($this->resolvers as $resolver) {
|
||||
if ($resolver->supports($entity, $options)) {
|
||||
return $resolver->isConcerned($entity, $options);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user