apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -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'];