mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-01 20:43:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -12,7 +12,6 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\DependencyInjection\CompilerPass;
|
||||
|
||||
use Chill\MainBundle\Export\ExportManager;
|
||||
use LogicException;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Definition;
|
||||
@@ -32,8 +31,7 @@ class ExportsCompilerPass implements CompilerPassInterface
|
||||
public function process(ContainerBuilder $container)
|
||||
{
|
||||
if (!$container->has(ExportManager::class)) {
|
||||
throw new LogicException('service ' . ExportManager::class . ' '
|
||||
. 'is not defined. It is required by ExportsCompilerPass');
|
||||
throw new \LogicException('service '.ExportManager::class.' is not defined. It is required by ExportsCompilerPass');
|
||||
}
|
||||
|
||||
$chillManagerDefinition = $container->findDefinition(
|
||||
@@ -57,13 +55,11 @@ class ExportsCompilerPass implements CompilerPassInterface
|
||||
foreach ($taggedServices as $id => $tagAttributes) {
|
||||
foreach ($tagAttributes as $attributes) {
|
||||
if (!isset($attributes['prefix'])) {
|
||||
throw new LogicException("the 'prefix' attribute is missing in your " .
|
||||
"service '{$id}' definition");
|
||||
throw new \LogicException("the 'prefix' attribute is missing in your service '{$id}' definition");
|
||||
}
|
||||
|
||||
if (array_search($attributes['prefix'], $knownAliases, true)) {
|
||||
throw new LogicException('There is already a chill.export_elements_provider service with prefix '
|
||||
. $attributes['prefix'] . '. Choose another prefix.');
|
||||
throw new \LogicException('There is already a chill.export_elements_provider service with prefix '.$attributes['prefix'].'. Choose another prefix.');
|
||||
}
|
||||
$knownAliases[] = $attributes['prefix'];
|
||||
|
||||
@@ -88,13 +84,11 @@ class ExportsCompilerPass implements CompilerPassInterface
|
||||
foreach ($taggedServices as $id => $tagAttributes) {
|
||||
foreach ($tagAttributes as $attributes) {
|
||||
if (!isset($attributes['alias'])) {
|
||||
throw new LogicException("the 'alias' attribute is missing in your " .
|
||||
"service '{$id}' definition");
|
||||
throw new \LogicException("the 'alias' attribute is missing in your service '{$id}' definition");
|
||||
}
|
||||
|
||||
if (array_search($attributes['alias'], $knownAliases, true)) {
|
||||
throw new LogicException('There is already a chill.export_formatter service with alias '
|
||||
. $attributes['alias'] . '. Choose another alias.');
|
||||
throw new \LogicException('There is already a chill.export_formatter service with alias '.$attributes['alias'].'. Choose another alias.');
|
||||
}
|
||||
$knownAliases[] = $attributes['alias'];
|
||||
|
||||
|
Reference in New Issue
Block a user