mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-05 04:49:44 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -11,7 +11,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\DependencyInjection\CompilerPass;
|
||||
|
||||
use LogicException;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
@@ -26,8 +25,7 @@ class SearchableServicesCompilerPass implements CompilerPassInterface
|
||||
public function process(ContainerBuilder $container)
|
||||
{
|
||||
if (!$container->hasDefinition('chill_main.search_provider')) {
|
||||
throw new LogicException('service chill_main.search_provider '
|
||||
. 'is not defined.');
|
||||
throw new \LogicException('service chill_main.search_provider is not defined.');
|
||||
}
|
||||
|
||||
$definition = $container->getDefinition(
|
||||
@@ -43,13 +41,11 @@ class SearchableServicesCompilerPass implements CompilerPassInterface
|
||||
foreach ($taggedServices as $id => $tagAttributes) {
|
||||
foreach ($tagAttributes as $attributes) {
|
||||
if (!isset($attributes['alias'])) {
|
||||
throw new LogicException("the 'name' attribute is missing in your " .
|
||||
"service '{$id}' definition");
|
||||
throw new \LogicException("the 'name' attribute is missing in your service '{$id}' definition");
|
||||
}
|
||||
|
||||
if (array_search($attributes['alias'], $knownAliases, true)) {
|
||||
throw new LogicException('There is already a chill.search service with alias '
|
||||
. $attributes['alias'] . '. Choose another alias.');
|
||||
throw new \LogicException('There is already a chill.search service with alias '.$attributes['alias'].'. Choose another alias.');
|
||||
}
|
||||
$knownAliases[] = $attributes['alias'];
|
||||
|
||||
|
Reference in New Issue
Block a user