diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php
index 4e1f6d32ed94a..3f002d7eea139 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php
@@ -127,9 +127,9 @@ public function testCollapsedEntityFieldWithPreferredChoices()
for ($i = 0; $i < 40; ++$i) {
$form = $this->factory->create('Symfony\Bridge\Doctrine\Form\Type\EntityType', null, [
- 'class' => self::ENTITY_CLASS,
- 'preferred_choices' => $choices,
- ]);
+ 'class' => self::ENTITY_CLASS,
+ 'preferred_choices' => $choices,
+ ]);
// force loading of the choice list
$form->createView();
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
index 92e750929f41e..dc159ee4c3c11 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php
@@ -780,7 +780,7 @@ public function testOverrideChoicesValuesWithCallable()
$this->assertEquals([
'BazGroup/Foo' => new ChoiceView($entity1, 'BazGroup/Foo', 'Foo'),
'BooGroup/Bar' => new ChoiceView($entity2, 'BooGroup/Bar', 'Bar'),
- ], $field->createView()->vars['choices']);
+ ], $field->createView()->vars['choices']);
$this->assertTrue($field->isSynchronized(), 'Field should be synchronized.');
$this->assertSame($entity2, $field->getData(), 'Entity should be loaded by custom value.');
$this->assertSame('BooGroup/Bar', $field->getViewData());
diff --git a/src/Symfony/Bridge/PsrHttpMessage/Tests/Factory/PsrHttpFactoryTest.php b/src/Symfony/Bridge/PsrHttpMessage/Tests/Factory/PsrHttpFactoryTest.php
index 41629e8c69fc9..67356c07d5dce 100644
--- a/src/Symfony/Bridge/PsrHttpMessage/Tests/Factory/PsrHttpFactoryTest.php
+++ b/src/Symfony/Bridge/PsrHttpMessage/Tests/Factory/PsrHttpFactoryTest.php
@@ -219,14 +219,14 @@ public function testUploadErrNoFile()
[],
[],
[
- 'f1' => $file,
- 'f2' => ['name' => null, 'type' => null, 'tmp_name' => null, 'error' => \UPLOAD_ERR_NO_FILE, 'size' => 0],
- ],
+ 'f1' => $file,
+ 'f2' => ['name' => null, 'type' => null, 'tmp_name' => null, 'error' => \UPLOAD_ERR_NO_FILE, 'size' => 0],
+ ],
[
- 'REQUEST_METHOD' => 'POST',
- 'HTTP_HOST' => 'dunglas.fr',
- 'HTTP_X_SYMFONY' => '2.8',
- ],
+ 'REQUEST_METHOD' => 'POST',
+ 'HTTP_HOST' => 'dunglas.fr',
+ 'HTTP_X_SYMFONY' => '2.8',
+ ],
'Content'
);
diff --git a/src/Symfony/Bridge/Twig/Extension/EmojiExtension.php b/src/Symfony/Bridge/Twig/Extension/EmojiExtension.php
index dcc5a5a060425..c98a3aac6df36 100644
--- a/src/Symfony/Bridge/Twig/Extension/EmojiExtension.php
+++ b/src/Symfony/Bridge/Twig/Extension/EmojiExtension.php
@@ -38,7 +38,7 @@ public function getFilters(): array
}
/**
- * Converts emoji short code (:wave:) to real emoji (👋)
+ * Converts emoji short code (:wave:) to real emoji (👋).
*/
public function emojify(string $string, ?string $catalog = null): string
{
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3HorizontalLayoutTestCase.php b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3HorizontalLayoutTestCase.php
index 3a4104bb6adbd..db0789db90e81 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3HorizontalLayoutTestCase.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3HorizontalLayoutTestCase.php
@@ -163,9 +163,9 @@ public function testStartTagWithOverriddenVars()
public function testStartTagForMultipartForm()
{
$form = $this->factory->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null, [
- 'method' => 'get',
- 'action' => 'http://example.com/directory',
- ])
+ 'method' => 'get',
+ 'action' => 'http://example.com/directory',
+ ])
->add('file', 'Symfony\Component\Form\Extension\Core\Type\FileType')
->getForm();
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap4HorizontalLayoutTestCase.php b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap4HorizontalLayoutTestCase.php
index 723559ee3d985..9b202e9219db5 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap4HorizontalLayoutTestCase.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap4HorizontalLayoutTestCase.php
@@ -214,9 +214,9 @@ public function testStartTagWithOverriddenVars()
public function testStartTagForMultipartForm()
{
$form = $this->factory->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null, [
- 'method' => 'get',
- 'action' => 'http://example.com/directory',
- ])
+ 'method' => 'get',
+ 'action' => 'http://example.com/directory',
+ ])
->add('file', 'Symfony\Component\Form\Extension\Core\Type\FileType')
->getForm();
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractDivLayoutTestCase.php b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractDivLayoutTestCase.php
index a02fca4bc54ca..ede4d69551495 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractDivLayoutTestCase.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractDivLayoutTestCase.php
@@ -691,9 +691,9 @@ public function testCollectionRowWithCustomBlock()
public function testChoiceRowWithCustomBlock()
{
$form = $this->factory->createNamedBuilder('name_c', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', 'a', [
- 'choices' => ['ChoiceA' => 'a', 'ChoiceB' => 'b'],
- 'expanded' => true,
- ])
+ 'choices' => ['ChoiceA' => 'a', 'ChoiceB' => 'b'],
+ 'expanded' => true,
+ ])
->getForm();
$this->assertWidgetMatchesXpath($form->createView(), [],
diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractLayoutTestCase.php b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractLayoutTestCase.php
index f340b066ed884..f61fefb3c78ef 100644
--- a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractLayoutTestCase.php
+++ b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractLayoutTestCase.php
@@ -313,8 +313,8 @@ public function testLabelFormatOverriddenOption()
public function testLabelWithoutTranslationOnButton()
{
$form = $this->factory->createNamedBuilder('myform', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, [
- 'translation_domain' => false,
- ])
+ 'translation_domain' => false,
+ ])
->add('mybutton', 'Symfony\Component\Form\Extension\Core\Type\ButtonType')
->getForm();
$view = $form->get('mybutton')->createView();
@@ -2412,9 +2412,9 @@ public function testStartTagWithOverriddenVars()
public function testStartTagForMultipartForm()
{
$form = $this->factory->createBuilder('Symfony\Component\Form\Extension\Core\Type\FormType', null, [
- 'method' => 'get',
- 'action' => 'http://example.com/directory',
- ])
+ 'method' => 'get',
+ 'action' => 'http://example.com/directory',
+ ])
->add('file', 'Symfony\Component\Form\Extension\Core\Type\FileType')
->getForm();
@@ -2559,8 +2559,8 @@ public function testTranslatedAttributes()
public function testAttributesNotTranslatedWhenTranslationDomainIsFalse()
{
$view = $this->factory->createNamedBuilder('name', 'Symfony\Component\Form\Extension\Core\Type\FormType', null, [
- 'translation_domain' => false,
- ])
+ 'translation_domain' => false,
+ ])
->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType', ['attr' => ['title' => 'Foo']])
->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType', ['attr' => ['placeholder' => 'Bar']])
->getForm()
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
index b32d8681b43b3..6f2a51993441b 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
@@ -224,13 +224,13 @@ public function testInvalidAssetsConfiguration(array $assetConfig, $expectedMess
$this->expectExceptionMessage($expectedMessage);
$processor->processConfiguration($configuration, [
- [
- 'http_method_override' => false,
- 'handle_all_throwables' => true,
- 'php_errors' => ['log' => true],
- 'assets' => $assetConfig,
- ],
- ]);
+ [
+ 'http_method_override' => false,
+ 'handle_all_throwables' => true,
+ 'php_errors' => ['log' => true],
+ 'assets' => $assetConfig,
+ ],
+ ]);
}
public static function provideInvalidAssetConfigurationTests(): iterable
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RedirectableCompiledUrlMatcherTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RedirectableCompiledUrlMatcherTest.php
index 29126e130b561..9a96313d0dd20 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RedirectableCompiledUrlMatcherTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Routing/RedirectableCompiledUrlMatcherTest.php
@@ -27,7 +27,8 @@ public function testRedirectWhenNoSlash()
$matcher = $this->getMatcher($routes, $context = new RequestContext());
- $this->assertEquals([
+ $this->assertEquals(
+ [
'_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction',
'path' => '/foo/',
'permanent' => true,
@@ -47,7 +48,8 @@ public function testSchemeRedirect()
$matcher = $this->getMatcher($routes, $context = new RequestContext());
- $this->assertEquals([
+ $this->assertEquals(
+ [
'_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction',
'path' => '/foo',
'permanent' => true,
diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_authenticator.php b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_authenticator.php
index 92c91e989779c..1ea4ef5568fd3 100644
--- a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_authenticator.php
+++ b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_authenticator.php
@@ -67,7 +67,7 @@
// Listeners
->set('security.listener.check_authenticator_credentials', CheckCredentialsListener::class)
->args([
- service('security.password_hasher_factory'),
+ service('security.password_hasher_factory'),
])
->tag('kernel.event_subscriber')
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeCookieTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeCookieTest.php
index d91b321bbc3aa..34fbca10843fa 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeCookieTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/RememberMeCookieTest.php
@@ -24,7 +24,7 @@ public function testSessionRememberMeSecureCookieFlagAuto($https, $expectedSecur
'_username' => 'test',
'_password' => 'test',
], [], [
- 'HTTPS' => (int) $https,
+ 'HTTPS' => (int) $https,
]);
$cookies = $client->getResponse()->headers->getCookies(ResponseHeaderBag::COOKIES_ARRAY);
diff --git a/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php b/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php
index 9bb4a65fb97c7..cbf15eb8228f4 100644
--- a/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php
+++ b/src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php
@@ -31,7 +31,7 @@ public function testCreateConnection(string $dsn, string $expectedClass)
self::markTestSkipped('REDIS_CLUSTER_HOSTS env var is not defined.');
}
- $mock = new class () {
+ $mock = new class() {
use RedisTrait;
};
$connection = $mock::createConnection($dsn);
@@ -45,7 +45,7 @@ public function testUrlDecodeParameters()
self::markTestSkipped('REDIS_AUTHENTICATED_HOST env var is not defined.');
}
- $mock = new class () {
+ $mock = new class() {
use RedisTrait;
};
$connection = $mock::createConnection('redis://:p%40ssword@'.getenv('REDIS_AUTHENTICATED_HOST'));
@@ -104,7 +104,7 @@ public function testPconnectSelectsCorrectDatabase()
}
try {
- $mock = new class () {
+ $mock = new class() {
use RedisTrait;
};
diff --git a/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php
index f617148ff9e17..4c9bf42e3fe67 100644
--- a/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/BooleanNodeTest.php
@@ -50,7 +50,6 @@ public static function getValidValues(): array
*/
public function testNormalizeThrowsExceptionOnInvalidValues($value)
{
-
$node = new BooleanNode('test');
$this->expectException(InvalidTypeException::class);
diff --git a/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php
index abf0de7771627..f1868a04a1509 100644
--- a/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/PrototypedArrayNodeTest.php
@@ -291,51 +291,51 @@ public static function getDataForKeyRemovedLeftValueOnly(): array
$variableValue = new VariableNode('value');
return [
- [
- $scalarValue,
- [
- ['id' => 'option1', 'value' => 'value1'],
- ],
- ['option1' => 'value1'],
- ],
-
- [
- $scalarValue,
- [
- ['id' => 'option1', 'value' => 'value1'],
- ['id' => 'option2', 'value' => 'value2', 'foo' => 'foo2'],
- ],
- [
- 'option1' => 'value1',
- 'option2' => ['value' => 'value2', 'foo' => 'foo2'],
- ],
- ],
-
- [
- $arrayValue,
- [
- [
- 'id' => 'option1',
- 'value' => ['foo' => 'foo1', 'bar' => 'bar1'],
- ],
- ],
- [
- 'option1' => ['foo' => 'foo1', 'bar' => 'bar1'],
- ],
- ],
-
- [$variableValue,
- [
- [
- 'id' => 'option1', 'value' => ['foo' => 'foo1', 'bar' => 'bar1'],
- ],
- ['id' => 'option2', 'value' => 'value2'],
- ],
- [
- 'option1' => ['foo' => 'foo1', 'bar' => 'bar1'],
- 'option2' => 'value2',
- ],
- ],
+ [
+ $scalarValue,
+ [
+ ['id' => 'option1', 'value' => 'value1'],
+ ],
+ ['option1' => 'value1'],
+ ],
+
+ [
+ $scalarValue,
+ [
+ ['id' => 'option1', 'value' => 'value1'],
+ ['id' => 'option2', 'value' => 'value2', 'foo' => 'foo2'],
+ ],
+ [
+ 'option1' => 'value1',
+ 'option2' => ['value' => 'value2', 'foo' => 'foo2'],
+ ],
+ ],
+
+ [
+ $arrayValue,
+ [
+ [
+ 'id' => 'option1',
+ 'value' => ['foo' => 'foo1', 'bar' => 'bar1'],
+ ],
+ ],
+ [
+ 'option1' => ['foo' => 'foo1', 'bar' => 'bar1'],
+ ],
+ ],
+
+ [$variableValue,
+ [
+ [
+ 'id' => 'option1', 'value' => ['foo' => 'foo1', 'bar' => 'bar1'],
+ ],
+ ['id' => 'option2', 'value' => 'value2'],
+ ],
+ [
+ 'option1' => ['foo' => 'foo1', 'bar' => 'bar1'],
+ 'option2' => 'value2',
+ ],
+ ],
];
}
diff --git a/src/Symfony/Component/Console/Helper/ProgressIndicator.php b/src/Symfony/Component/Console/Helper/ProgressIndicator.php
index 969d83539d8e2..4a9987a368baa 100644
--- a/src/Symfony/Component/Console/Helper/ProgressIndicator.php
+++ b/src/Symfony/Component/Console/Helper/ProgressIndicator.php
@@ -54,7 +54,6 @@ public function __construct(
private int $indicatorChangeInterval = 100,
?array $indicatorValues = null,
) {
-
$format ??= $this->determineBestFormat();
$indicatorValues ??= ['-', '\\', '|', '/'];
$indicatorValues = array_values($indicatorValues);
diff --git a/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php b/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php
index 4479f4403a807..a3fd3e2ea519c 100644
--- a/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php
+++ b/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php
@@ -179,7 +179,7 @@ public function testGetArgumentDefaults()
new InputArgument('foo1', InputArgument::OPTIONAL),
new InputArgument('foo2', InputArgument::OPTIONAL, '', 'default'),
new InputArgument('foo3', InputArgument::OPTIONAL | InputArgument::IS_ARRAY),
- // new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', [1, 2]),
+ // new InputArgument('foo4', InputArgument::OPTIONAL | InputArgument::IS_ARRAY, '', [1, 2]),
]);
$this->assertEquals(['foo1' => null, 'foo2' => 'default', 'foo3' => []], $definition->getArgumentDefaults(), '->getArgumentDefaults() return the default values for each argument');
diff --git a/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php
index 012c71bddb579..e9c2c321ed0be 100644
--- a/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php
+++ b/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php
@@ -34,13 +34,13 @@ class GraphvizDumper extends Dumper
private array $edges;
// All values should be strings
private array $options = [
- 'graph' => ['ratio' => 'compress'],
- 'node' => ['fontsize' => '11', 'fontname' => 'Arial', 'shape' => 'record'],
- 'edge' => ['fontsize' => '9', 'fontname' => 'Arial', 'color' => 'grey', 'arrowhead' => 'open', 'arrowsize' => '0.5'],
- 'node.instance' => ['fillcolor' => '#9999ff', 'style' => 'filled'],
- 'node.definition' => ['fillcolor' => '#eeeeee'],
- 'node.missing' => ['fillcolor' => '#ff9999', 'style' => 'filled'],
- ];
+ 'graph' => ['ratio' => 'compress'],
+ 'node' => ['fontsize' => '11', 'fontname' => 'Arial', 'shape' => 'record'],
+ 'edge' => ['fontsize' => '9', 'fontname' => 'Arial', 'color' => 'grey', 'arrowhead' => 'open', 'arrowsize' => '0.5'],
+ 'node.instance' => ['fillcolor' => '#9999ff', 'style' => 'filled'],
+ 'node.definition' => ['fillcolor' => '#eeeeee'],
+ 'node.missing' => ['fillcolor' => '#ff9999', 'style' => 'filled'],
+ ];
/**
* Dumps the service container as a graphviz graph.
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/InlineServiceDefinitionsPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/InlineServiceDefinitionsPassTest.php
index 5064c1f75fe1e..8500ad4a5697f 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/InlineServiceDefinitionsPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/InlineServiceDefinitionsPassTest.php
@@ -223,9 +223,9 @@ public function testProcessDoesNotInlinePrivateFactoryIfReferencedMultipleTimesW
->register('foo')
->setPublic(true)
->setArguments([
- $ref1 = new Reference('b'),
- $ref2 = new Reference('b'),
- ])
+ $ref1 = new Reference('b'),
+ $ref2 = new Reference('b'),
+ ])
;
$this->process($container);
@@ -252,9 +252,9 @@ public function testProcessDoesNotInlineReferenceWhenUsedByInlineFactory()
->register('foo')
->setPublic(true)
->setArguments([
- $ref = new Reference('b'),
- $inlineFactory,
- ])
+ $ref = new Reference('b'),
+ $inlineFactory,
+ ])
;
$this->process($container);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php
index c156153e65c18..aeeaf25865552 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/MergeExtensionConfigurationPassTest.php
@@ -151,7 +151,6 @@ public function testMissingParameterIncludesExtension()
$this->assertInstanceOf(ParameterNotFoundException::class, $e);
$this->assertSame('You have requested a non-existent parameter "missing_parameter" while loading extension "foo".', $e->getMessage());
}
-
}
public function testReuseEnvPlaceholderGeneratedByPreviousExtension()
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
index 4024fc69a76ee..afd822d584b6e 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
@@ -1224,14 +1224,14 @@ public function testBindingsAndInnerCollections($bindName, $expected)
public static function dataForBindingsAndInnerCollections()
{
return [
- ['bar1', ['item.1', 'item.2']],
- ['bar2', ['item.1', 'item.2']],
- ['bar3', ['item.1', 'item.2', 'item.3', 'item.4']],
- ['bar4', ['item.1', 'item.3', 'item.4']],
- ['bar5', ['item.1', 'item.2', ['item.3.1', 'item.3.2']]],
- ['bar6', ['item.1', ['item.2.1', 'item.2.2'], 'item.3']],
- ['bar7', new IteratorArgument(['item.1', 'item.2'])],
- ['bar8', new IteratorArgument(['item.1', 'item.2', ['item.3.1', 'item.3.2']])],
+ ['bar1', ['item.1', 'item.2']],
+ ['bar2', ['item.1', 'item.2']],
+ ['bar3', ['item.1', 'item.2', 'item.3', 'item.4']],
+ ['bar4', ['item.1', 'item.3', 'item.4']],
+ ['bar5', ['item.1', 'item.2', ['item.3.1', 'item.3.2']]],
+ ['bar6', ['item.1', ['item.2.1', 'item.2.2'], 'item.3']],
+ ['bar7', new IteratorArgument(['item.1', 'item.2'])],
+ ['bar8', new IteratorArgument(['item.1', 'item.2', ['item.3.1', 'item.3.2']])],
];
}
diff --git a/src/Symfony/Component/DomCrawler/Tests/FormTest.php b/src/Symfony/Component/DomCrawler/Tests/FormTest.php
index fcbd216920866..a1698314d5b18 100644
--- a/src/Symfony/Component/DomCrawler/Tests/FormTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/FormTest.php
@@ -252,7 +252,7 @@ public static function provideInitializeValues()
'appends the submitted button value but not other submit buttons',
'
',
- ['foobar' => ['InputFormField', 'foobar']],
+ ['foobar' => ['InputFormField', 'foobar']],
],
[
'turns an image input into x and y fields',
@@ -263,38 +263,38 @@ public static function provideInitializeValues()
'returns textareas',
'
',
- ['foo' => ['TextareaFormField', 'foo']],
+ ['foo' => ['TextareaFormField', 'foo']],
],
[
'returns inputs',
'
',
- ['foo' => ['InputFormField', 'foo']],
+ ['foo' => ['InputFormField', 'foo']],
],
[
'returns checkboxes',
'
',
- ['foo' => ['ChoiceFormField', 'foo']],
+ ['foo' => ['ChoiceFormField', 'foo']],
],
[
'returns not-checked checkboxes',
'
',
- ['foo' => ['ChoiceFormField', false]],
+ ['foo' => ['ChoiceFormField', false]],
],
[
'returns radio buttons',
'
',
- ['foo' => ['ChoiceFormField', 'bar']],
+ ['foo' => ['ChoiceFormField', 'bar']],
],
[
'returns file inputs',
'
',
- ['foo' => ['FileFormField', ['name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0]]],
+ ['foo' => ['FileFormField', ['name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0]]],
],
];
}
@@ -830,7 +830,7 @@ public function testFormRegistrySetValues()
3 => 3,
'bar' => [
'baz' => 'fbb',
- ],
+ ],
]);
}
diff --git a/src/Symfony/Component/ErrorHandler/DebugClassLoader.php b/src/Symfony/Component/ErrorHandler/DebugClassLoader.php
index 6a6338dc9616f..fd69b97b3cd0d 100644
--- a/src/Symfony/Component/ErrorHandler/DebugClassLoader.php
+++ b/src/Symfony/Component/ErrorHandler/DebugClassLoader.php
@@ -1135,7 +1135,7 @@ private function fixReturnStatements(\ReflectionMethod $method, string $returnTy
$braces = 0;
for (; $i < $end; ++$i) {
if (!$inClosure) {
- $inClosure = false !== strpos($code[$i], 'function (');
+ $inClosure = str_contains($code[$i], 'function (');
}
if ($inClosure) {
diff --git a/src/Symfony/Component/Finder/Tests/FinderTest.php b/src/Symfony/Component/Finder/Tests/FinderTest.php
index 4dd5365dfb7b8..1ca2e783adcec 100644
--- a/src/Symfony/Component/Finder/Tests/FinderTest.php
+++ b/src/Symfony/Component/Finder/Tests/FinderTest.php
@@ -1647,7 +1647,7 @@ public function testIgnoredAccessDeniedException()
'qux_10_2.php',
'qux_12_0.php',
'qux_2_0.php',
- ]
+ ]
), $finder->getIterator());
}
diff --git a/src/Symfony/Component/Form/AbstractTypeExtension.php b/src/Symfony/Component/Form/AbstractTypeExtension.php
index 9f6da0a336dfb..b32f3b522f3e1 100644
--- a/src/Symfony/Component/Form/AbstractTypeExtension.php
+++ b/src/Symfony/Component/Form/AbstractTypeExtension.php
@@ -18,9 +18,6 @@
*/
abstract class AbstractTypeExtension implements FormTypeExtensionInterface
{
- /**
- * @return void
- */
public function configureOptions(OptionsResolver $resolver): void
{
}
diff --git a/src/Symfony/Component/Form/FormTypeExtensionInterface.php b/src/Symfony/Component/Form/FormTypeExtensionInterface.php
index 3e2d2d03e427d..838406d2af4d2 100644
--- a/src/Symfony/Component/Form/FormTypeExtensionInterface.php
+++ b/src/Symfony/Component/Form/FormTypeExtensionInterface.php
@@ -25,9 +25,6 @@ interface FormTypeExtensionInterface
*/
public static function getExtendedTypes(): iterable;
- /**
- * @return void
- */
public function configureOptions(OptionsResolver $resolver): void;
/**
diff --git a/src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php b/src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php
index e7bf26d1780d3..f82fdc2f999c5 100644
--- a/src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php
+++ b/src/Symfony/Component/Form/Tests/ChoiceList/Factory/DefaultChoiceListFactoryTest.php
@@ -159,9 +159,9 @@ public function testCreateFromChoicesGroupedTraversable()
{
$list = $this->factory->createListFromChoices(
new \ArrayIterator([
- 'Group 1' => ['A' => $this->obj1, 'B' => $this->obj2],
- 'Group 2' => ['C' => $this->obj3, 'D' => $this->obj4],
- ])
+ 'Group 1' => ['A' => $this->obj1, 'B' => $this->obj2],
+ 'Group 2' => ['C' => $this->obj3, 'D' => $this->obj4],
+ ])
);
$this->assertObjectListWithGeneratedValues($list);
@@ -941,7 +941,7 @@ private function assertFlatViewWithAttr($view)
'C',
['attr2' => 'value2']
),
- ]
+ ]
), $view);
}
@@ -987,7 +987,7 @@ private function assertGroupedView($view)
'Group 2',
[2 => new ChoiceView($this->obj3, '2', 'C')]
),
- ]
+ ]
), $view);
}
diff --git a/src/Symfony/Component/Form/Tests/ChoiceList/Loader/CallbackChoiceLoaderTest.php b/src/Symfony/Component/Form/Tests/ChoiceList/Loader/CallbackChoiceLoaderTest.php
index d394196ee1dff..791a6f006ee27 100644
--- a/src/Symfony/Component/Form/Tests/ChoiceList/Loader/CallbackChoiceLoaderTest.php
+++ b/src/Symfony/Component/Form/Tests/ChoiceList/Loader/CallbackChoiceLoaderTest.php
@@ -69,8 +69,8 @@ public function testLoadChoicesForValuesLoadsChoiceListOnFirstCall()
public function testLoadValuesForChoicesCastsCallbackItemsToString()
{
$choices = [
- (object) ['id' => 2],
- (object) ['id' => 3],
+ (object) ['id' => 2],
+ (object) ['id' => 3],
];
$value = fn ($item) => $item->id;
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php
index 8e2372d7e16f7..c4f18734f8500 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php
@@ -1895,8 +1895,8 @@ public function testInitializeWithEmptyChoices()
{
$this->assertInstanceOf(
FormInterface::class, $this->factory->createNamed('name', static::TESTED_TYPE, null, [
- 'choices' => [],
- ]));
+ 'choices' => [],
+ ]));
}
public function testInitializeWithDefaultObjectChoice()
diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php
index be89c559f6d3c..fe838885ed660 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php
@@ -156,24 +156,24 @@ public function testDataClassMayBeNull()
{
$this->assertInstanceOf(
FormBuilderInterface::class, $this->factory->createBuilder(static::TESTED_TYPE, null, [
- 'data_class' => null,
- ]));
+ 'data_class' => null,
+ ]));
}
public function testDataClassMayBeAbstractClass()
{
$this->assertInstanceOf(
FormBuilderInterface::class, $this->factory->createBuilder(static::TESTED_TYPE, null, [
- 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AbstractAuthor',
- ]));
+ 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AbstractAuthor',
+ ]));
}
public function testDataClassMayBeInterface()
{
$this->assertInstanceOf(
FormBuilderInterface::class, $this->factory->createBuilder(static::TESTED_TYPE, null, [
- 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AuthorInterface',
- ]));
+ 'data_class' => 'Symfony\Component\Form\Tests\Fixtures\AuthorInterface',
+ ]));
}
public function testDataClassMustBeValidClassOrInterface()
@@ -402,7 +402,7 @@ public function testSubformCallsSettersIfTheObjectChanged()
// referenceCopy has a getter that returns a copy
'referenceCopy' => [
'firstName' => 'Foo',
- ],
+ ],
]);
$this->assertEquals('Foo', $author->getReferenceCopy()->firstName);
@@ -680,8 +680,8 @@ public function testDataMapperTransformationFailedExceptionInvalidMessageIsUsed(
public function testPassZeroLabelToView()
{
$view = $this->factory->create(static::TESTED_TYPE, null, [
- 'label' => '0',
- ])
+ 'label' => '0',
+ ])
->createView();
$this->assertSame('0', $view->vars['label']);
diff --git a/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php b/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php
index 798faa0c5e5bd..0517b26c3b345 100644
--- a/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php
@@ -71,7 +71,7 @@ public function testBuildPreliminaryFormTree()
],
'errors' => [],
'children' => [],
- ];
+ ];
$formData = [
'id' => 'name',
@@ -87,11 +87,11 @@ public function testBuildPreliminaryFormTree()
'norm' => null,
],
'errors' => [],
- 'has_children_error' => false,
- 'children' => [
- 'child' => $childFormData,
- ],
- ];
+ 'has_children_error' => false,
+ 'children' => [
+ 'child' => $childFormData,
+ ],
+ ];
$this->assertEquals([
'forms' => [
@@ -102,7 +102,7 @@ public function testBuildPreliminaryFormTree()
spl_object_hash($this->childForm) => $childFormData,
],
'nb_errors' => 0,
- ], $this->dataCollector->getData());
+ ], $this->dataCollector->getData());
}
public function testBuildMultiplePreliminaryFormTrees()
diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorFunctionalTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorFunctionalTest.php
index aa6056c13702a..14595e8cf5cc7 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorFunctionalTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorFunctionalTest.php
@@ -88,9 +88,9 @@ public function testFieldConstraintsInvalidateFormIfFieldIsSubmitted()
public function testNonCompositeConstraintValidatedOnce()
{
$form = $this->formFactory->create(TextType::class, null, [
- 'constraints' => [new NotBlank(['groups' => ['foo', 'bar']])],
- 'validation_groups' => ['foo', 'bar'],
- ]);
+ 'constraints' => [new NotBlank(['groups' => ['foo', 'bar']])],
+ 'validation_groups' => ['foo', 'bar'],
+ ]);
$form->submit('');
$violations = $this->validator->validate($form);
diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php
index 4e1588a9c7f74..86b53ac3ad0f2 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php
@@ -184,8 +184,8 @@ public function testDontValidateIfNoValidationGroups()
$object = new \stdClass();
$form = $this->getBuilder('name', '\stdClass', [
- 'validation_groups' => [],
- ])
+ 'validation_groups' => [],
+ ])
->setData($object)
->setCompound(true)
->setDataMapper(new DataMapper())
@@ -256,12 +256,12 @@ public function testDontValidateIfNotSynchronized()
$object = new \stdClass();
$form = $this->getBuilder('name', '\stdClass', [
- 'invalid_message' => 'invalid_message_key',
- // Invalid message parameters must be supported, because the
- // invalid message can be a translation key
- // see https://github.com/symfony/symfony/issues/5144
- 'invalid_message_parameters' => ['{{ foo }}' => 'bar'],
- ])
+ 'invalid_message' => 'invalid_message_key',
+ // Invalid message parameters must be supported, because the
+ // invalid message can be a translation key
+ // see https://github.com/symfony/symfony/issues/5144
+ 'invalid_message_parameters' => ['{{ foo }}' => 'bar'],
+ ])
->setData($object)
->addViewTransformer(new CallbackTransformer(
static fn ($data) => $data,
@@ -292,13 +292,13 @@ public function testAddInvalidErrorEvenIfNoValidationGroups()
$object = new \stdClass();
$form = $this->getBuilder('name', '\stdClass', [
- 'invalid_message' => 'invalid_message_key',
- // Invalid message parameters must be supported, because the
- // invalid message can be a translation key
- // see https://github.com/symfony/symfony/issues/5144
- 'invalid_message_parameters' => ['{{ foo }}' => 'bar'],
- 'validation_groups' => [],
- ])
+ 'invalid_message' => 'invalid_message_key',
+ // Invalid message parameters must be supported, because the
+ // invalid message can be a translation key
+ // see https://github.com/symfony/symfony/issues/5144
+ 'invalid_message_parameters' => ['{{ foo }}' => 'bar'],
+ 'validation_groups' => [],
+ ])
->setData($object)
->addViewTransformer(new CallbackTransformer(
static fn ($data) => $data,
diff --git a/src/Symfony/Component/Form/Tests/NativeRequestHandlerTest.php b/src/Symfony/Component/Form/Tests/NativeRequestHandlerTest.php
index 679c3366d8256..3770e12199904 100644
--- a/src/Symfony/Component/Form/Tests/NativeRequestHandlerTest.php
+++ b/src/Symfony/Component/Form/Tests/NativeRequestHandlerTest.php
@@ -172,8 +172,8 @@ public function testMethodOverrideHeaderIgnoredIfNotPost()
$form = $this->createForm('param1', 'POST');
$this->setRequestData('GET', [
- 'param1' => 'DATA',
- ]);
+ 'param1' => 'DATA',
+ ]);
$_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] = 'PUT';
diff --git a/src/Symfony/Component/Form/Tests/SimpleFormTest.php b/src/Symfony/Component/Form/Tests/SimpleFormTest.php
index 7ded9b8535a0b..d5d3549d2a8f6 100644
--- a/src/Symfony/Component/Form/Tests/SimpleFormTest.php
+++ b/src/Symfony/Component/Form/Tests/SimpleFormTest.php
@@ -503,9 +503,9 @@ public function testSetDataConvertsScalarToStringIfOnlyModelTransformer()
{
$form = $this->getBuilder()
->addModelTransformer(new FixedDataTransformer([
- '' => '',
- 1 => 23,
- ]))
+ '' => '',
+ 1 => 23,
+ ]))
->getForm();
$form->setData(1);
diff --git a/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php b/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php
index 8199d6843ed8a..d51481f6c1fae 100644
--- a/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php
+++ b/src/Symfony/Component/Form/Tests/Util/StringUtilTest.php
@@ -56,7 +56,7 @@ public static function spaceProvider(): array
['0020'],
['00A0'],
['1680'],
-// ['180E'],
+ // ['180E'],
['2000'],
['2001'],
['2002'],
diff --git a/src/Symfony/Component/HttpClient/Response/NativeResponse.php b/src/Symfony/Component/HttpClient/Response/NativeResponse.php
index 6f26621387391..0a7654d9628ba 100644
--- a/src/Symfony/Component/HttpClient/Response/NativeResponse.php
+++ b/src/Symfony/Component/HttpClient/Response/NativeResponse.php
@@ -42,6 +42,7 @@ final class NativeResponse implements ResponseInterface, StreamableInterface
/**
* @internal
+ *
* @param $context resource
*/
public function __construct(
diff --git a/src/Symfony/Component/HttpClient/Tests/CachingHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/CachingHttpClientTest.php
index ad07f86451688..67e9212c957cd 100644
--- a/src/Symfony/Component/HttpClient/Tests/CachingHttpClientTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/CachingHttpClientTest.php
@@ -87,10 +87,10 @@ public function testRemovesXContentDigest()
{
$response = $this->runRequest(new MockResponse(
'test', [
- 'response_headers' => [
- 'X-Content-Digest' => 'some-hash',
- ],
- ]));
+ 'response_headers' => [
+ 'X-Content-Digest' => 'some-hash',
+ ],
+ ]));
$headers = $response->getHeaders();
$this->assertArrayNotHasKey('x-content-digest', $headers);
diff --git a/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php
index 9aa945f68cfea..6382693df206f 100644
--- a/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/MockHttpClientTest.php
@@ -313,8 +313,8 @@ protected function getHttpClient(string $testCase): HttpClientInterface
$responses = [];
$headers = [
- 'Host: localhost:8057',
- 'Content-Type: application/json',
+ 'Host: localhost:8057',
+ 'Content-Type: application/json',
];
$body = '{
@@ -387,9 +387,9 @@ protected function getHttpClient(string $testCase): HttpClientInterface
$responses[] = new MockResponse($body, ['response_headers' => $headers]);
$headers = [
- 'Host: localhost:8057',
- 'Content-Length: 1000',
- 'Content-Type: application/json',
+ 'Host: localhost:8057',
+ 'Content-Length: 1000',
+ 'Content-Type: application/json',
];
$responses[] = new MockResponse($body, ['response_headers' => $headers]);
diff --git a/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php
index a0e39cc46c851..01cac942280c6 100644
--- a/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php
+++ b/src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php
@@ -239,8 +239,8 @@ public function testRetryOnErrorAssertContent()
{
$client = new RetryableHttpClient(
new MockHttpClient([
- new MockResponse('', ['http_code' => 500]),
- new MockResponse('Test out content', ['http_code' => 200]),
+ new MockResponse('', ['http_code' => 500]),
+ new MockResponse('Test out content', ['http_code' => 200]),
]),
new GenericRetryStrategy([500], 0),
1
diff --git a/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php
index c73d705075b86..9a34b5f99c631 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php
@@ -251,7 +251,7 @@ public function testFilter()
'dec' => '256',
'hex' => '0x100',
'array' => ['bang'],
- ]);
+ ]);
$this->assertEmpty($bag->filter('nokey'), '->filter() should return empty by default if no key is found');
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php
index 6a6510a576b9c..0b418c006f550 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/AutoExpireFlashBagTest.php
@@ -46,9 +46,9 @@ public function testInitialize()
$bag->initialize($array);
$this->assertEquals(['A previous flash message'], $bag->peek('notice'));
$array = ['new' => [
- 'notice' => ['Something else'],
- 'error' => ['a'],
- ]];
+ 'notice' => ['Something else'],
+ 'error' => ['a'],
+ ]];
$bag->initialize($array);
$this->assertEquals(['Something else'], $bag->peek('notice'));
$this->assertEquals(['a'], $bag->peek('error'));
@@ -106,13 +106,13 @@ public function testPeekAll()
$this->assertEquals([
'notice' => 'Foo',
'error' => 'Bar',
- ], $this->bag->peekAll()
+ ], $this->bag->peekAll()
);
$this->assertEquals([
'notice' => 'Foo',
'error' => 'Bar',
- ], $this->bag->peekAll()
+ ], $this->bag->peekAll()
);
}
@@ -137,7 +137,7 @@ public function testAll()
$this->bag->set('error', 'Bar');
$this->assertEquals([
'notice' => ['A previous flash message'],
- ], $this->bag->all()
+ ], $this->bag->all()
);
$this->assertEquals([], $this->bag->all());
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php
index 59e3f1f0e69a7..8163ba769d4ee 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php
@@ -141,14 +141,14 @@ public function testPeekAll()
$this->assertEquals([
'notice' => ['Foo'],
'error' => ['Bar'],
- ], $this->bag->peekAll()
+ ], $this->bag->peekAll()
);
$this->assertTrue($this->bag->has('notice'));
$this->assertTrue($this->bag->has('error'));
$this->assertEquals([
'notice' => ['Foo'],
'error' => ['Bar'],
- ], $this->bag->peekAll()
+ ], $this->bag->peekAll()
);
}
}
diff --git a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
index c1f88747b24a0..c1b38fa543b04 100644
--- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
+++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
@@ -87,7 +87,6 @@ public function __construct(
private ?SurrogateInterface $surrogate = null,
array $options = [],
) {
-
// needed in case there is a fatal error because the backend is too slow to respond
register_shutdown_function($this->store->cleanup(...));
diff --git a/src/Symfony/Component/HttpKernel/Profiler/Profile.php b/src/Symfony/Component/HttpKernel/Profiler/Profile.php
index ff2bbdbc42509..84d9ab93ac77a 100644
--- a/src/Symfony/Component/HttpKernel/Profiler/Profile.php
+++ b/src/Symfony/Component/HttpKernel/Profiler/Profile.php
@@ -20,7 +20,6 @@
*/
class Profile
{
-
/**
* @var DataCollectorInterface[]
*/
diff --git a/src/Symfony/Component/Ldap/Adapter/ConnectionInterface.php b/src/Symfony/Component/Ldap/Adapter/ConnectionInterface.php
index 0379473f420f9..aa575940340b3 100644
--- a/src/Symfony/Component/Ldap/Adapter/ConnectionInterface.php
+++ b/src/Symfony/Component/Ldap/Adapter/ConnectionInterface.php
@@ -28,8 +28,6 @@ public function isBound(): bool;
/**
* Binds the connection against a user's DN and password.
*
- * @return void
- *
* @throws AlreadyExistsException When the connection can't be created because of an LDAP_ALREADY_EXISTS error
* @throws ConnectionTimeoutException When the connection can't be created because of an LDAP_TIMEOUT error
* @throws InvalidCredentialsException When the connection can't be created because of an LDAP_INVALID_CREDENTIALS error
diff --git a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php
index b940d4d16148f..214c34c577d4f 100644
--- a/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php
+++ b/src/Symfony/Component/Ldap/Adapter/ExtLdap/Collection.php
@@ -123,9 +123,9 @@ private function getSingleEntry($con, $current): Entry
private function cleanupAttributes(array $entry): array
{
$attributes = array_diff_key($entry, array_flip(range(0, $entry['count'] - 1)) + [
- 'count' => null,
- 'dn' => null,
- ]);
+ 'count' => null,
+ 'dn' => null,
+ ]);
array_walk($attributes, function (&$value) {
unset($value['count']);
});
diff --git a/src/Symfony/Component/Ldap/Tests/Security/LdapUserProviderTest.php b/src/Symfony/Component/Ldap/Tests/Security/LdapUserProviderTest.php
index b8148ef9afa91..90955357e3136 100644
--- a/src/Symfony/Component/Ldap/Tests/Security/LdapUserProviderTest.php
+++ b/src/Symfony/Component/Ldap/Tests/Security/LdapUserProviderTest.php
@@ -123,8 +123,8 @@ public function testLoadUserByIdentifierFailsIfMoreThanOneLdapPasswordsInEntry()
->method('offsetGet')
->with(0)
->willReturn(new Entry('foo', [
- 'sAMAccountName' => ['foo'],
- 'userpassword' => ['bar', 'baz'],
+ 'sAMAccountName' => ['foo'],
+ 'userpassword' => ['bar', 'baz'],
]))
;
$result
@@ -308,9 +308,9 @@ public function testLoadUserByIdentifierIsSuccessfulWithPasswordAttribute()
->method('offsetGet')
->with(0)
->willReturn(new Entry('foo', [
- 'sAMAccountName' => ['foo'],
- 'userpassword' => ['bar'],
- 'email' => ['elsa@symfony.com'],
+ 'sAMAccountName' => ['foo'],
+ 'userpassword' => ['bar'],
+ 'email' => ['elsa@symfony.com'],
]))
;
$result
diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineReceiver.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineReceiver.php
index 412360e750803..e999a57b1701e 100644
--- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineReceiver.php
+++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineReceiver.php
@@ -67,14 +67,14 @@ public function get(): iterable
public function ack(Envelope $envelope): void
{
- $this->withRetryableExceptionRetry(function() use ($envelope) {
+ $this->withRetryableExceptionRetry(function () use ($envelope) {
$this->connection->ack($this->findDoctrineReceivedStamp($envelope)->getId());
});
}
public function reject(Envelope $envelope): void
{
- $this->withRetryableExceptionRetry(function() use ($envelope) {
+ $this->withRetryableExceptionRetry(function () use ($envelope) {
$this->connection->reject($this->findDoctrineReceivedStamp($envelope)->getId());
});
}
@@ -159,7 +159,7 @@ private function withRetryableExceptionRetry(callable $callable): void
$callable();
} catch (RetryableException $exception) {
if (++$retries <= self::MAX_RETRIES) {
- $delay *= $multiplier;
+ $delay *= $multiplier;
$randomness = (int) ($delay * $jitter);
$delay += random_int(-$randomness, +$randomness);
diff --git a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisExtIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisExtIntegrationTest.php
index 4bcc271b72dc6..80f9f1e98ddd5 100644
--- a/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisExtIntegrationTest.php
+++ b/src/Symfony/Component/Messenger/Bridge/Redis/Tests/Transport/RedisExtIntegrationTest.php
@@ -237,7 +237,7 @@ public function testSentinel(string $sentinelOptionName)
$connection = Connection::fromDsn($dsn,
['delete_after_ack' => true,
- $sentinelOptionName => getenv('MESSENGER_REDIS_SENTINEL_MASTER') ?: null,
+ $sentinelOptionName => getenv('MESSENGER_REDIS_SENTINEL_MASTER') ?: null,
], $this->redis);
$connection->add('1', []);
@@ -262,8 +262,8 @@ public function testLazySentinel()
{
$connection = Connection::fromDsn(getenv('MESSENGER_REDIS_DSN'),
['lazy' => true,
- 'delete_after_ack' => true,
- 'sentinel_master' => getenv('MESSENGER_REDIS_SENTINEL_MASTER') ?: null,
+ 'delete_after_ack' => true,
+ 'sentinel_master' => getenv('MESSENGER_REDIS_SENTINEL_MASTER') ?: null,
], $this->redis);
$connection->add('1', []);
diff --git a/src/Symfony/Component/Messenger/Tests/Transport/Serialization/SerializerTest.php b/src/Symfony/Component/Messenger/Tests/Transport/Serialization/SerializerTest.php
index 38acd3392a1bb..97d9eb95c000f 100644
--- a/src/Symfony/Component/Messenger/Tests/Transport/Serialization/SerializerTest.php
+++ b/src/Symfony/Component/Messenger/Tests/Transport/Serialization/SerializerTest.php
@@ -21,7 +21,6 @@
use Symfony\Component\Messenger\Stamp\ValidationStamp;
use Symfony\Component\Messenger\Tests\Fixtures\DummyMessage;
use Symfony\Component\Messenger\Transport\Serialization\Serializer;
-use Symfony\Component\Serializer as SerializerComponent;
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
use Symfony\Component\Serializer\SerializerInterface as SerializerComponentInterface;
diff --git a/src/Symfony/Component/Messenger/Tests/WorkerTest.php b/src/Symfony/Component/Messenger/Tests/WorkerTest.php
index fd0d2a326f787..100247b42df37 100644
--- a/src/Symfony/Component/Messenger/Tests/WorkerTest.php
+++ b/src/Symfony/Component/Messenger/Tests/WorkerTest.php
@@ -48,7 +48,6 @@
use Symfony\Component\Messenger\Worker;
use Symfony\Component\RateLimiter\RateLimiterFactory;
use Symfony\Component\RateLimiter\Storage\InMemoryStorage;
-use Symfony\Contracts\Service\ResetInterface;
/**
* @group time-sensitive
diff --git a/src/Symfony/Component/Notifier/Bridge/Smsapi/SmsapiTransport.php b/src/Symfony/Component/Notifier/Bridge/Smsapi/SmsapiTransport.php
index d6c789b83d867..20152e7a23370 100644
--- a/src/Symfony/Component/Notifier/Bridge/Smsapi/SmsapiTransport.php
+++ b/src/Symfony/Component/Notifier/Bridge/Smsapi/SmsapiTransport.php
@@ -38,7 +38,6 @@ public function __construct(
?HttpClientInterface $client = null,
?EventDispatcherInterface $dispatcher = null,
) {
-
parent::__construct($client, $dispatcher);
}
diff --git a/src/Symfony/Component/Notifier/Bridge/Smsense/Tests/SmsenseTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Smsense/Tests/SmsenseTransportTest.php
index 2aa3c471a3549..f74ee03c09029 100644
--- a/src/Symfony/Component/Notifier/Bridge/Smsense/Tests/SmsenseTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Smsense/Tests/SmsenseTransportTest.php
@@ -49,15 +49,15 @@ public static function unsupportedMessagesProvider(): iterable
public function testSendSuccessfully()
{
$response = new JsonMockResponse([
- 'status' => 'created',
- 'direction' => 'outgoing',
- 'from' => '+40702222222',
- 'created' => '2024-02-02T20:35:32.429389',
- 'parts' => 1,
- 'to' => '+40701111111',
- 'cost' => 3900,
- 'message' => 'Symfony test',
- 'message_id' => '63444830-5857-50da-d5f6-69f3719aa916',
+ 'status' => 'created',
+ 'direction' => 'outgoing',
+ 'from' => '+40702222222',
+ 'created' => '2024-02-02T20:35:32.429389',
+ 'parts' => 1,
+ 'to' => '+40701111111',
+ 'cost' => 3900,
+ 'message' => 'Symfony test',
+ 'message_id' => '63444830-5857-50da-d5f6-69f3719aa916',
]);
$client = new MockHttpClient($response);
diff --git a/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php b/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php
index f0c89a5123cde..bd573e78ec283 100644
--- a/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php
+++ b/src/Symfony/Component/Notifier/Bridge/Telegram/Tests/TelegramTransportTest.php
@@ -404,7 +404,7 @@ public static function sendFileByHttpUrlProvider(): array
'emoji' => '🤖',
],
'caption' => 'testMessage',
- ],
+ ],
],
'sticker-without-emoji' => [
'messageOptions' => (new TelegramOptions())->sticker('https://localhost/sticker.webp'),
diff --git a/src/Symfony/Component/Notifier/Bridge/Zulip/ZulipTransport.php b/src/Symfony/Component/Notifier/Bridge/Zulip/ZulipTransport.php
index de97e9ec85cca..8c9a3d19f33d6 100644
--- a/src/Symfony/Component/Notifier/Bridge/Zulip/ZulipTransport.php
+++ b/src/Symfony/Component/Notifier/Bridge/Zulip/ZulipTransport.php
@@ -34,7 +34,6 @@ public function __construct(
?HttpClientInterface $client = null,
?EventDispatcherInterface $dispatcher = null,
) {
-
parent::__construct($client, $dispatcher);
}
diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.php b/src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.php
index 59f204f6ae321..2e25e9e517db2 100644
--- a/src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.php
+++ b/src/Symfony/Component/PropertyAccess/PropertyAccessorInterface.php
@@ -39,8 +39,6 @@ interface PropertyAccessorInterface
*
* If neither is found, an exception is thrown.
*
- * @return void
- *
* @throws Exception\InvalidArgumentException If the property path is invalid
* @throws Exception\AccessException If a property/index does not exist or is not public
* @throws Exception\UnexpectedTypeException If a value within the path is neither object nor array
diff --git a/src/Symfony/Component/PropertyInfo/Extractor/PhpStanExtractor.php b/src/Symfony/Component/PropertyInfo/Extractor/PhpStanExtractor.php
index adcae498e8f89..de2b4e022cafe 100644
--- a/src/Symfony/Component/PropertyInfo/Extractor/PhpStanExtractor.php
+++ b/src/Symfony/Component/PropertyInfo/Extractor/PhpStanExtractor.php
@@ -321,7 +321,6 @@ private function getDocBlockFromProperty(string $class, string $property): ?arra
if ($trait->hasProperty($property)) {
return $this->getDocBlockFromProperty($trait->getName(), $property);
}
-
}
// Type can be inside property docblock as `@var`
diff --git a/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php b/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php
index ffa4f4d5d29a3..0a756593816fa 100644
--- a/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php
+++ b/src/Symfony/Component/Routing/Tests/RouteCompilerTest.php
@@ -290,9 +290,9 @@ public function testRouteWithVariableNameStartingWithADigit(string $name)
public static function getVariableNamesStartingWithADigit()
{
return [
- ['09'],
- ['123'],
- ['1e2'],
+ ['09'],
+ ['123'],
+ ['1e2'],
];
}
diff --git a/src/Symfony/Component/Routing/Tests/RouteTest.php b/src/Symfony/Component/Routing/Tests/RouteTest.php
index 176c6f05ee021..b58358a3ef31b 100644
--- a/src/Symfony/Component/Routing/Tests/RouteTest.php
+++ b/src/Symfony/Component/Routing/Tests/RouteTest.php
@@ -65,7 +65,7 @@ public function testOptions()
$route = new Route('/{foo}');
$route->setOptions(['foo' => 'bar']);
$this->assertEquals(array_merge([
- 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler',
+ 'compiler_class' => 'Symfony\\Component\\Routing\\RouteCompiler',
], ['foo' => 'bar']), $route->getOptions(), '->setOptions() sets the options');
$this->assertEquals($route, $route->setOptions([]), '->setOptions() implements a fluent interface');
@@ -156,13 +156,13 @@ public function testSetInvalidRequirement($req)
public static function getInvalidRequirements()
{
return [
- [''],
- ['^$'],
- ['^'],
- ['$'],
- ['\A\z'],
- ['\A'],
- ['\z'],
+ [''],
+ ['^$'],
+ ['^'],
+ ['$'],
+ ['\A\z'],
+ ['\A'],
+ ['\z'],
];
}
diff --git a/src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php
index 504047bc1e384..3d8e7e7c549da 100644
--- a/src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php
+++ b/src/Symfony/Component/Serializer/Normalizer/BackedEnumNormalizer.php
@@ -29,7 +29,7 @@ final class BackedEnumNormalizer implements NormalizerInterface, DenormalizerInt
public function getSupportedTypes(?string $format): array
{
return [
- \BackedEnum::class => true,
+ \BackedEnum::class => true,
];
}
diff --git a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
index 3a398ef335017..61fdc3b4d2958 100644
--- a/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
+++ b/src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
@@ -164,7 +164,7 @@ protected function isAllowedAttribute($classOrObject, string $attribute, ?string
return false;
}
- $class = \is_object($classOrObject) ? \get_class($classOrObject) : $classOrObject;
+ $class = \is_object($classOrObject) ? $classOrObject::class : $classOrObject;
if (!isset(self::$reflectionCache[$class])) {
self::$reflectionCache[$class] = new \ReflectionClass($class);
diff --git a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php
index 1b51b729c660b..10fe403ebfdbb 100644
--- a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php
+++ b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php
@@ -173,7 +173,7 @@ protected function isAllowedAttribute($classOrObject, string $attribute, ?string
return false;
}
- $class = \is_object($classOrObject) ? \get_class($classOrObject) : $classOrObject;
+ $class = \is_object($classOrObject) ? $classOrObject::class : $classOrObject;
if ($context['_read_attributes'] ?? true) {
if (!isset(self::$isReadableCache[$class.$attribute])) {
diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php
index 91163762071be..5fc8fe98339b1 100644
--- a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php
@@ -671,8 +671,8 @@ public function testDecodeIgnoreComments()
XML;
$expected = ['person' => [
- ['firstname' => 'Benjamin', 'lastname' => 'Alexandre'],
- ['firstname' => 'Damien', 'lastname' => 'Clay'],
+ ['firstname' => 'Benjamin', 'lastname' => 'Alexandre'],
+ ['firstname' => 'Damien', 'lastname' => 'Clay'],
]];
$this->assertEquals($expected, $this->encoder->decode($source, 'xml'));
@@ -695,8 +695,8 @@ public function testDecodeIgnoreDocumentType()
XML;
$expected = ['person' => [
- ['firstname' => 'Benjamin', 'lastname' => 'Alexandre'],
- ['firstname' => 'Damien', 'lastname' => 'Clay'],
+ ['firstname' => 'Benjamin', 'lastname' => 'Alexandre'],
+ ['firstname' => 'Damien', 'lastname' => 'Clay'],
]];
$this->assertEquals($expected, $this->encoder->decode(
$source,
@@ -730,8 +730,8 @@ public function testDecodePreserveComments()
$this->encoder->setSerializer($serializer);
$expected = ['person' => [
- ['firstname' => 'Benjamin', 'lastname' => 'Alexandre', '#comment' => ' This comment should be decoded. '],
- ['firstname' => 'Damien', 'lastname' => 'Clay'],
+ ['firstname' => 'Benjamin', 'lastname' => 'Alexandre', '#comment' => ' This comment should be decoded. '],
+ ['firstname' => 'Damien', 'lastname' => 'Clay'],
]];
$this->assertEquals($expected, $this->encoder->decode($source, 'xml'));
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/ConstraintViolationListNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/ConstraintViolationListNormalizerTest.php
index bb69392f58abf..1d0afb3cb00db 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/ConstraintViolationListNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/ConstraintViolationListNormalizerTest.php
@@ -50,23 +50,23 @@ public function testNormalize()
'detail' => 'd: a
4: 1',
'violations' => [
- [
- 'propertyPath' => 'd',
- 'title' => 'a',
- 'template' => 'b',
- 'type' => 'urn:uuid:f',
- 'parameters' => [
- 'value' => 'foo',
- ],
- ],
- [
- 'propertyPath' => '4',
- 'title' => '1',
- 'template' => '2',
- 'type' => 'urn:uuid:6',
- 'parameters' => [],
+ [
+ 'propertyPath' => 'd',
+ 'title' => 'a',
+ 'template' => 'b',
+ 'type' => 'urn:uuid:f',
+ 'parameters' => [
+ 'value' => 'foo',
],
],
+ [
+ 'propertyPath' => '4',
+ 'title' => '1',
+ 'template' => '2',
+ 'type' => 'urn:uuid:6',
+ 'parameters' => [],
+ ],
+ ],
];
$this->assertEquals($expected, $this->normalizer->normalize($list));
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php
index b93a7bb9fd1cd..9773e65b7e0b3 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php
@@ -340,12 +340,16 @@ public function testGroupsDenormalizeWithNameConverter()
$this->assertEquals(
$obj,
- $this->normalizer->denormalize([
- 'bar' => null,
- 'foo_bar' => '@dunglas',
- 'symfony' => '@coopTilleuls',
- 'coop_tilleuls' => 'les-tilleuls.coop',
- ], GroupDummy::class, null, [PropertyNormalizer::GROUPS => ['name_converter']])
+ $this->normalizer->denormalize(
+ [
+ 'bar' => null,
+ 'foo_bar' => '@dunglas',
+ 'symfony' => '@coopTilleuls',
+ 'coop_tilleuls' => 'les-tilleuls.coop',
+ ],
+ GroupDummy::class, null,
+ [PropertyNormalizer::GROUPS => ['name_converter']]
+ )
);
}
@@ -405,13 +409,19 @@ public function testDenormalizeNonExistingAttribute()
{
$this->assertEquals(
new PropertyDummy(),
- $this->normalizer->denormalize(['non_existing' => true], PropertyDummy::class)
+ $this->normalizer->denormalize(
+ ['non_existing' => true],
+ PropertyDummy::class
+ )
);
}
public function testDenormalizeShouldIgnoreStaticProperty()
{
- $obj = $this->normalizer->denormalize(['outOfScope' => true], PropertyDummy::class);
+ $obj = $this->normalizer->denormalize(
+ ['outOfScope' => true],
+ PropertyDummy::class
+ );
$this->assertEquals(new PropertyDummy(), $obj);
$this->assertEquals('out_of_scope', PropertyDummy::$outOfScope);
@@ -450,7 +460,8 @@ public function testInheritedPropertiesSupport()
public function testMultiDimensionObject()
{
$normalizer = $this->getDenormalizerForTypeEnforcement();
- $root = $normalizer->denormalize([
+ $root = $normalizer->denormalize(
+ [
'children' => [[
['foo' => 'one', 'bar' => 'two'],
['foo' => 'three', 'bar' => 'four'],
@@ -535,7 +546,13 @@ public function testDenormalizeWithDiscriminator()
$denormalized = new PropertyDiscriminatedDummyTwo();
$denormalized->url = 'url';
- $this->assertEquals($denormalized, $normalizer->denormalize(['type' => 'two', 'url' => 'url'], PropertyDummyInterface::class));
+ $this->assertEquals(
+ $denormalized,
+ $normalizer->denormalize(
+ ['type' => 'two', 'url' => 'url'],
+ PropertyDummyInterface::class
+ )
+ );
}
}
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/UidNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/UidNormalizerTest.php
index 1471074a08e78..734b15b4801ea 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/UidNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/UidNormalizerTest.php
@@ -47,8 +47,8 @@ public static function normalizeProvider()
{
$uidFormats = [null, 'canonical', 'base58', 'base32', 'rfc4122'];
$data = [
- [
- UuidV1::fromString('9b7541de-6f87-11ea-ab3c-9da9a81562fc'),
+ [
+ UuidV1::fromString('9b7541de-6f87-11ea-ab3c-9da9a81562fc'),
'9b7541de-6f87-11ea-ab3c-9da9a81562fc',
'9b7541de-6f87-11ea-ab3c-9da9a81562fc',
'LCQS8f2p5SDSiAt9V7ZYnF',
diff --git a/src/Symfony/Component/Serializer/Tests/SerializerTest.php b/src/Symfony/Component/Serializer/Tests/SerializerTest.php
index 1bf5905adf971..7d4cbc30ddefc 100644
--- a/src/Symfony/Component/Serializer/Tests/SerializerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/SerializerTest.php
@@ -1214,7 +1214,7 @@ public function testCollectDenormalizationErrors2(?ClassMetadataFactory $classMe
'useMessageForUser' => false,
'message' => 'The type of the "string" attribute for class "Symfony\\Component\\Serializer\\Tests\\Fixtures\\Php74Full" must be one of "string" ("null" given).',
],
- ];
+ ];
$this->assertSame($expected, $exceptionsAsArray);
}
@@ -1464,8 +1464,8 @@ public function testCollectDenormalizationErrorsWithWrongPropertyWithoutConstruc
try {
$serializer->deserialize('{"get": "POST"}', DummyObjectWithEnumProperty::class, 'json', [
- DenormalizerInterface::COLLECT_DENORMALIZATION_ERRORS => true,
- ]);
+ DenormalizerInterface::COLLECT_DENORMALIZATION_ERRORS => true,
+ ]);
} catch (\Throwable $e) {
$this->assertInstanceOf(PartialDenormalizationException::class, $e);
}
diff --git a/src/Symfony/Component/String/Inflector/EnglishInflector.php b/src/Symfony/Component/String/Inflector/EnglishInflector.php
index 56f03b7fd6aeb..9c1b9cba9a2af 100644
--- a/src/Symfony/Component/String/Inflector/EnglishInflector.php
+++ b/src/Symfony/Component/String/Inflector/EnglishInflector.php
@@ -141,7 +141,7 @@ final class EnglishInflector implements InflectorInterface
// shoes (shoe)
['se', 2, true, true, ['', 'e']],
- // status (status)
+ // status (status)
['sutats', 6, true, true, 'status'],
// tags (tag)
diff --git a/src/Symfony/Component/Translation/Tests/Extractor/PhpAstExtractorTest.php b/src/Symfony/Component/Translation/Tests/Extractor/PhpAstExtractorTest.php
index 9449ca716959b..658164a37150d 100644
--- a/src/Symfony/Component/Translation/Tests/Extractor/PhpAstExtractorTest.php
+++ b/src/Symfony/Component/Translation/Tests/Extractor/PhpAstExtractorTest.php
@@ -146,12 +146,12 @@ public function testExtraction(iterable|string $resource)
],
'validators' => [
'message-in-constraint-attribute' => 'prefixmessage-in-constraint-attribute',
-// 'custom Isbn message from attribute' => 'prefixcustom Isbn message from attribute',
+ // 'custom Isbn message from attribute' => 'prefixcustom Isbn message from attribute',
'custom Isbn message from attribute with options as array' => 'prefixcustom Isbn message from attribute with options as array',
'custom Length exact message from attribute from named argument' => 'prefixcustom Length exact message from attribute from named argument',
'custom Length exact message from attribute from named argument 1/2' => 'prefixcustom Length exact message from attribute from named argument 1/2',
'custom Length min message from attribute from named argument 2/2' => 'prefixcustom Length min message from attribute from named argument 2/2',
-// 'custom Isbn message' => 'prefixcustom Isbn message',
+ // 'custom Isbn message' => 'prefixcustom Isbn message',
'custom Isbn message with options as array' => 'prefixcustom Isbn message with options as array',
'custom Isbn message from named argument' => 'prefixcustom Isbn message from named argument',
'custom Length exact message from named argument' => 'prefixcustom Length exact message from named argument',
diff --git a/src/Symfony/Component/Translation/Tests/TranslatorBagTest.php b/src/Symfony/Component/Translation/Tests/TranslatorBagTest.php
index 102f2e443bb2f..56b36f2b6efaf 100644
--- a/src/Symfony/Component/Translation/Tests/TranslatorBagTest.php
+++ b/src/Symfony/Component/Translation/Tests/TranslatorBagTest.php
@@ -27,9 +27,9 @@ public function testAll()
$this->assertEquals(['en' => $messages], $this->getAllMessagesFromTranslatorBag($bag));
$messages = ['domain1+intl-icu' => ['foo' => 'bar']] + $messages + [
- 'domain2+intl-icu' => ['bar' => 'foo'],
- 'domain3+intl-icu' => ['biz' => 'biz'],
- ];
+ 'domain2+intl-icu' => ['bar' => 'foo'],
+ 'domain3+intl-icu' => ['biz' => 'biz'],
+ ];
$catalogue = new MessageCatalogue('en', $messages);
$bag = new TranslatorBag();
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php
index e21f6b8e909e3..4a2584be6f08b 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorWithPositiveOrZeroConstraintTest.php
@@ -69,7 +69,7 @@ public function testThrowsConstraintExceptionIfValue()
*/
public function testThrowsConstraintExceptionIfNoValueOrPropertyPath($options)
{
- $this->markTestSkipped('Value option always set for PositiveOrZero constraint');
+ $this->markTestSkipped('Value option always set for PositiveOrZero constraint');
}
public function testThrowsConstraintExceptionIfBothValueAndPropertyPath()
diff --git a/src/Symfony/Component/VarDumper/Caster/SplCaster.php b/src/Symfony/Component/VarDumper/Caster/SplCaster.php
index 9c668192340fa..bd2bcc048630f 100644
--- a/src/Symfony/Component/VarDumper/Caster/SplCaster.php
+++ b/src/Symfony/Component/VarDumper/Caster/SplCaster.php
@@ -187,7 +187,7 @@ public static function castObjectStorage(\SplObjectStorage $c, array $a, Stub $s
$storage[] = new EnumStub([
'object' => $obj,
'info' => $clone->getInfo(),
- ]);
+ ]);
}
$a += [
@@ -219,7 +219,7 @@ public static function castWeakMap(\WeakMap $c, array $a, Stub $stub, bool $isNe
$map[] = new EnumStub([
'object' => $obj,
'data' => $data,
- ]);
+ ]);
}
$a += [