mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-31 03:53:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -38,10 +38,10 @@ class CRUDControllerCompilerPass implements CompilerPassInterface
|
||||
private function configureCrudController(ContainerBuilder $container, array $crudEntry, string $apiOrCrud): void
|
||||
{
|
||||
$controllerClass = $crudEntry['controller'];
|
||||
$controllerServiceName = 'cs' . $apiOrCrud . '_' . $crudEntry['name'] . '_controller';
|
||||
$controllerServiceName = 'cs'.$apiOrCrud.'_'.$crudEntry['name'].'_controller';
|
||||
|
||||
// create config parameter in container
|
||||
$param = 'chill_main_' . $apiOrCrud . '_config_' . $crudEntry['name'];
|
||||
$param = 'chill_main_'.$apiOrCrud.'_config_'.$crudEntry['name'];
|
||||
$container->setParameter($param, $crudEntry);
|
||||
|
||||
if ($container->hasDefinition($controllerClass)) {
|
||||
@@ -51,7 +51,7 @@ class CRUDControllerCompilerPass implements CompilerPassInterface
|
||||
|
||||
// add the "addMethodCall"
|
||||
$container->getDefinition($controllerClass)
|
||||
->addMethodCall('setCrudConfig', ['%' . $param . '%']);
|
||||
->addMethodCall('setCrudConfig', ['%'.$param.'%']);
|
||||
} else {
|
||||
$controller = new Definition($controllerClass);
|
||||
|
||||
@@ -59,7 +59,7 @@ class CRUDControllerCompilerPass implements CompilerPassInterface
|
||||
$controller->setAutoconfigured(true);
|
||||
$controller->setPublic(true);
|
||||
|
||||
$controller->addMethodCall('setCrudConfig', ['%' . $param . '%']);
|
||||
$controller->addMethodCall('setCrudConfig', ['%'.$param.'%']);
|
||||
|
||||
$container->setDefinition($controllerServiceName, $controller);
|
||||
}
|
||||
|
Reference in New Issue
Block a user