mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-25 17:13:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -23,8 +23,6 @@ use Chill\MainBundle\Controller\RegroupmentController;
|
||||
use Chill\MainBundle\Controller\UserController;
|
||||
use Chill\MainBundle\Controller\UserJobApiController;
|
||||
use Chill\MainBundle\Controller\UserJobController;
|
||||
use Chill\MainBundle\Controller\UserJobHistoryController;
|
||||
use Chill\MainBundle\Controller\UserScopeHistoryController;
|
||||
use Chill\MainBundle\DependencyInjection\Widget\Factory\WidgetFactoryInterface;
|
||||
use Chill\MainBundle\Doctrine\DQL\Age;
|
||||
use Chill\MainBundle\Doctrine\DQL\Extract;
|
||||
@@ -59,8 +57,6 @@ use Chill\MainBundle\Entity\Regroupment;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Entity\UserJob;
|
||||
use Chill\MainBundle\Form\CenterType;
|
||||
use Chill\MainBundle\Entity\User\UserJobHistory;
|
||||
use Chill\MainBundle\Entity\User\UserScopeHistory;
|
||||
use Chill\MainBundle\Form\CivilityType;
|
||||
use Chill\MainBundle\Form\CountryType;
|
||||
use Chill\MainBundle\Form\LanguageType;
|
||||
@@ -69,7 +65,6 @@ use Chill\MainBundle\Form\LocationTypeType;
|
||||
use Chill\MainBundle\Form\RegroupmentType;
|
||||
use Chill\MainBundle\Form\UserJobType;
|
||||
use Chill\MainBundle\Form\UserType;
|
||||
use Exception;
|
||||
use Misd\PhoneNumberBundle\Doctrine\DBAL\Types\PhoneNumberType;
|
||||
use Ramsey\Uuid\Doctrine\UuidType;
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
@@ -79,8 +74,6 @@ use Symfony\Component\DependencyInjection\Loader;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
|
||||
use function count;
|
||||
|
||||
/**
|
||||
* Class ChillMainExtension
|
||||
* This class load config for chillMainExtension.
|
||||
@@ -101,7 +94,7 @@ class ChillMainExtension extends Extension implements
|
||||
$this->widgetFactories[] = $factory;
|
||||
}
|
||||
|
||||
public function getConfiguration(array $config, ContainerBuilder $container): \Chill\MainBundle\DependencyInjection\Configuration
|
||||
public function getConfiguration(array $config, ContainerBuilder $container): Configuration
|
||||
{
|
||||
return new Configuration($this->widgetFactories, $container);
|
||||
}
|
||||
@@ -115,7 +108,7 @@ class ChillMainExtension extends Extension implements
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
@@ -195,7 +188,7 @@ class ChillMainExtension extends Extension implements
|
||||
[]
|
||||
);
|
||||
|
||||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../config'));
|
||||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../config'));
|
||||
$loader->load('services.yaml');
|
||||
$loader->load('services/doctrine.yaml');
|
||||
$loader->load('services/logger.yaml');
|
||||
@@ -223,12 +216,12 @@ class ChillMainExtension extends Extension implements
|
||||
|
||||
$this->configureCruds($container, $config['cruds'], $config['apis'], $loader);
|
||||
$container->setParameter('chill_main.short_messages', $config['short_messages']);
|
||||
//$this->configureSms($config['short_messages'], $container, $loader);
|
||||
// $this->configureSms($config['short_messages'], $container, $loader);
|
||||
}
|
||||
|
||||
public function prepend(ContainerBuilder $container)
|
||||
{
|
||||
//add installation_name and date_format to globals
|
||||
// add installation_name and date_format to globals
|
||||
$chillMainConfig = $container->getExtensionConfig($this->getAlias());
|
||||
$config = $this->processConfiguration($this
|
||||
->getConfiguration($chillMainConfig, $container), $chillMainConfig);
|
||||
@@ -243,7 +236,7 @@ class ChillMainExtension extends Extension implements
|
||||
];
|
||||
$container->prependExtensionConfig('twig', $twigConfig);
|
||||
|
||||
//add DQL function to ORM (default entity_manager)
|
||||
// add DQL function to ORM (default entity_manager)
|
||||
$container
|
||||
->prependExtensionConfig(
|
||||
'doctrine',
|
||||
@@ -283,7 +276,7 @@ class ChillMainExtension extends Extension implements
|
||||
],
|
||||
);
|
||||
|
||||
//add dbal types (default entity_manager)
|
||||
// add dbal types (default entity_manager)
|
||||
$container
|
||||
->prependExtensionConfig(
|
||||
'doctrine',
|
||||
@@ -305,7 +298,7 @@ class ChillMainExtension extends Extension implements
|
||||
]
|
||||
);
|
||||
|
||||
//add current route to chill main
|
||||
// add current route to chill main
|
||||
$container->prependExtensionConfig('chill_main', [
|
||||
'routing' => [
|
||||
'resources' => [
|
||||
@@ -314,7 +307,7 @@ class ChillMainExtension extends Extension implements
|
||||
],
|
||||
]);
|
||||
|
||||
//add a channel to log app events
|
||||
// add a channel to log app events
|
||||
$container->prependExtensionConfig('monolog', [
|
||||
'channels' => ['chill'],
|
||||
]);
|
||||
@@ -326,7 +319,7 @@ class ChillMainExtension extends Extension implements
|
||||
],
|
||||
]);
|
||||
|
||||
//add crud api
|
||||
// add crud api
|
||||
$this->prependCruds($container);
|
||||
}
|
||||
|
||||
@@ -339,7 +332,7 @@ class ChillMainExtension extends Extension implements
|
||||
array $apiConfig,
|
||||
Loader\YamlFileLoader $loader
|
||||
): void {
|
||||
if (count($crudConfig) === 0) {
|
||||
if (0 === \count($crudConfig)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -773,7 +766,7 @@ class ChillMainExtension extends Extension implements
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user