mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-09 21:58:28 +00:00
Rector changes and immplementations of required methods
This commit is contained in:
@@ -21,7 +21,7 @@ use Symfony\Component\DependencyInjection\Definition;
|
||||
|
||||
class CRUDControllerCompilerPass implements CompilerPassInterface
|
||||
{
|
||||
public function process(ContainerBuilder $container)
|
||||
public function process(ContainerBuilder $container): void
|
||||
{
|
||||
$crudConfig = $container->getParameter('chill_main_crud_route_loader_config');
|
||||
$apiConfig = $container->getParameter('chill_main_api_route_loader_config');
|
||||
|
||||
@@ -695,7 +695,7 @@ class CRUDController extends AbstractController
|
||||
/**
|
||||
* @return \Chill\MainBundle\Entity\Center[]
|
||||
*/
|
||||
protected function getReachableCenters(string $role, ?Scope $scope = null)
|
||||
protected function getReachableCenters(string $role, ?Scope $scope = null): array
|
||||
{
|
||||
return $this->getAuthorizationHelper()
|
||||
->getReachableCenters($this->getUser(), $role, $scope);
|
||||
|
||||
@@ -94,7 +94,7 @@ class Resolver
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function hasAction($crudName, $action)
|
||||
public function hasAction($crudName, $action): bool
|
||||
{
|
||||
return \array_key_exists(
|
||||
$action,
|
||||
|
||||
@@ -39,7 +39,7 @@ class CRUDRoutesLoader extends Loader
|
||||
*
|
||||
* @param mixed|null $type
|
||||
*/
|
||||
public function load($resource, $type = null): RouteCollection
|
||||
public function load(mixed $resource, $type = null): RouteCollection
|
||||
{
|
||||
if (true === $this->isLoaded) {
|
||||
throw new \RuntimeException('Do not add the "CRUD" loader twice');
|
||||
|
||||
Reference in New Issue
Block a user