Skip to content

Commit 8a2c38a

Browse files
Merge branch '7.2' into 7.3
* 7.2: - - CS fixes
2 parents 9b41e99 + a3b6dca commit 8a2c38a

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

Argument/LazyClosure.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\DependencyInjection\Argument;
1313

1414
use Symfony\Component\DependencyInjection\ContainerBuilder;
15-
use Symfony\Component\DependencyInjection\Definition;
1615
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
1716
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
1817
use Symfony\Component\DependencyInjection\Reference;

Compiler/AttributeAutoconfigurationPass.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ public function process(ContainerBuilder $container): void
6767

6868
foreach (['class', 'method', 'property', 'parameter'] as $symbol) {
6969
if (['Reflector'] !== $types) {
70-
if (!\in_array('Reflection' . ucfirst($symbol), $types, true)) {
70+
if (!\in_array('Reflection'.ucfirst($symbol), $types, true)) {
7171
continue;
7272
}
73-
if (!($targets & \constant('Attribute::TARGET_' . strtoupper($symbol)))) {
74-
throw new LogicException(\sprintf('Invalid type "Reflection%s" on argument "$%s": attribute "%s" cannot target a ' . $symbol . ' in "%s" on line "%d".', ucfirst($symbol), $reflectorParameter->getName(), $attributeName, $callableReflector->getFileName(), $callableReflector->getStartLine()));
73+
if (!($targets & \constant('Attribute::TARGET_'.strtoupper($symbol)))) {
74+
throw new LogicException(\sprintf('Invalid type "Reflection%s" on argument "$%s": attribute "%s" cannot target a '.$symbol.' in "%s" on line "%d".', ucfirst($symbol), $reflectorParameter->getName(), $attributeName, $callableReflector->getFileName(), $callableReflector->getStartLine()));
7575
}
7676
}
77-
$this->{$symbol . 'AttributeConfigurators'}[$attributeName][] = $callable;
77+
$this->{$symbol.'AttributeConfigurators'}[$attributeName][] = $callable;
7878
}
7979
}
8080
}

ContainerBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,8 +1500,8 @@ public function getAutoconfiguredAttributes(): array
15001500

15011501
$autoconfiguredAttributes = [];
15021502
foreach ($this->autoconfiguredAttributes as $attribute => $configurators) {
1503-
if (count($configurators) > 1) {
1504-
throw new LogicException(\sprintf('The "%s" attribute has %d configurators. Use "getAttributeAutoconfigurators()" to get all of them.', $attribute, count($configurators)));
1503+
if (\count($configurators) > 1) {
1504+
throw new LogicException(\sprintf('The "%s" attribute has %d configurators. Use "getAttributeAutoconfigurators()" to get all of them.', $attribute, \count($configurators)));
15051505
}
15061506

15071507
$autoconfiguredAttributes[$attribute] = $configurators[0];

0 commit comments

Comments
 (0)