mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-03-04 13:09:42 +00:00
DX: apply rector rules up to php8.0
This commit is contained in:
@@ -15,14 +15,8 @@ use Twig\TwigFilter;
|
||||
|
||||
final class ResolverTwigExtension extends \Twig\Extension\AbstractExtension
|
||||
{
|
||||
private CenterResolverManagerInterface $centerResolverDispatcher;
|
||||
|
||||
private ScopeResolverDispatcher $scopeResolverDispatcher;
|
||||
|
||||
public function __construct(CenterResolverManagerInterface $centerResolverDispatcher, ScopeResolverDispatcher $scopeResolverDispatcher)
|
||||
public function __construct(private CenterResolverManagerInterface $centerResolverDispatcher, private ScopeResolverDispatcher $scopeResolverDispatcher)
|
||||
{
|
||||
$this->centerResolverDispatcher = $centerResolverDispatcher;
|
||||
$this->scopeResolverDispatcher = $scopeResolverDispatcher;
|
||||
}
|
||||
|
||||
public function getFilters()
|
||||
@@ -45,11 +39,9 @@ final class ResolverTwigExtension extends \Twig\Extension\AbstractExtension
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $entity
|
||||
*
|
||||
* @return Center|Center[]|null
|
||||
*/
|
||||
public function resolveCenter($entity, ?array $options = [])
|
||||
public function resolveCenter(mixed $entity, ?array $options = [])
|
||||
{
|
||||
return $this->centerResolverDispatcher->resolveCenters($entity, $options);
|
||||
}
|
||||
@@ -59,7 +51,7 @@ final class ResolverTwigExtension extends \Twig\Extension\AbstractExtension
|
||||
*
|
||||
* @return array|\Chill\MainBundle\Entity\Scope|\Chill\MainBundle\Entity\Scope[]
|
||||
*/
|
||||
public function resolveScope($entity, ?array $options = [])
|
||||
public function resolveScope($entity, ?array $options = []): array|\Chill\MainBundle\Entity\Scope
|
||||
{
|
||||
return $this->scopeResolverDispatcher->resolveScope();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user