Skip to content

Commit 01a1330

Browse files
Minor CS fixes
1 parent 50b0062 commit 01a1330

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

Command/DebugCommand.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,11 @@ private function getPropertyData(ClassMetadataInterface $classMetadata, string $
168168
foreach ($propertyMetadata as $metadata) {
169169
$autoMapingStrategy = 'Not supported';
170170
if ($metadata instanceof GenericMetadata) {
171-
switch ($metadata->getAutoMappingStrategy()) {
172-
case AutoMappingStrategy::ENABLED: $autoMapingStrategy = 'Enabled'; break;
173-
case AutoMappingStrategy::DISABLED: $autoMapingStrategy = 'Disabled'; break;
174-
case AutoMappingStrategy::NONE: $autoMapingStrategy = 'None'; break;
175-
}
171+
$autoMapingStrategy = match ($metadata->getAutoMappingStrategy()) {
172+
AutoMappingStrategy::ENABLED => 'Enabled',
173+
AutoMappingStrategy::DISABLED => 'Disabled',
174+
AutoMappingStrategy::NONE => 'None',
175+
};
176176
}
177177
$traversalStrategy = 'None';
178178
if (TraversalStrategy::TRAVERSE === $metadata->getTraversalStrategy()) {

Constraints/Cascade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Cascade extends Constraint
2525
{
2626
public array $exclude = [];
2727

28-
public function __construct(array|string|null $exclude = null, array $options = null)
28+
public function __construct(array|string $exclude = null, array $options = null)
2929
{
3030
if (\is_array($exclude) && !array_is_list($exclude)) {
3131
$options = array_merge($exclude, $options);

Tests/Constraints/NotCompromisedPasswordValidatorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespace Symfony\Component\Validator\Tests\Constraints;
1313

14-
use Symfony\Component\Validator\ConstraintValidatorInterface;
1514
use Symfony\Component\Validator\Constraints\Luhn;
1615
use Symfony\Component\Validator\Constraints\NotCompromisedPassword;
1716
use Symfony\Component\Validator\Constraints\NotCompromisedPasswordValidator;
17+
use Symfony\Component\Validator\ConstraintValidatorInterface;
1818
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
1919
use Symfony\Component\Validator\Test\ConstraintValidatorTestCase;
2020
use Symfony\Contracts\HttpClient\Exception\ExceptionInterface;
@@ -223,7 +223,7 @@ public static function provideErrorSkippingConstraints(): iterable
223223
yield 'named arguments' => [new NotCompromisedPassword(skipOnError: true)];
224224
}
225225

226-
private function createHttpClientStub(?string $returnValue = null): HttpClientInterface
226+
private function createHttpClientStub(string $returnValue = null): HttpClientInterface
227227
{
228228
$httpClientStub = $this->createMock(HttpClientInterface::class);
229229
$httpClientStub->method('request')->willReturnCallback(

Tests/Mapping/Loader/YamlFileLoaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
use Symfony\Component\Validator\Constraints\Range;
2222
use Symfony\Component\Validator\Mapping\ClassMetadata;
2323
use Symfony\Component\Validator\Mapping\Loader\YamlFileLoader;
24-
use Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\Entity;
25-
use Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\GroupSequenceProviderEntity;
2624
use Symfony\Component\Validator\Tests\Fixtures\ConstraintA;
2725
use Symfony\Component\Validator\Tests\Fixtures\ConstraintB;
2826
use Symfony\Component\Validator\Tests\Fixtures\ConstraintWithRequiredArgument;
2927
use Symfony\Component\Validator\Tests\Fixtures\Entity_81;
28+
use Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\Entity;
29+
use Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\GroupSequenceProviderEntity;
3030

3131
class YamlFileLoaderTest extends TestCase
3232
{

Tests/Mapping/MemberMetadataTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
use Symfony\Component\Validator\Constraints\Valid;
1919
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
2020
use Symfony\Component\Validator\Mapping\MemberMetadata;
21-
use Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\Entity;
2221
use Symfony\Component\Validator\Tests\Fixtures\ClassConstraint;
2322
use Symfony\Component\Validator\Tests\Fixtures\ConstraintA;
2423
use Symfony\Component\Validator\Tests\Fixtures\ConstraintB;
24+
use Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\Entity;
2525
use Symfony\Component\Validator\Tests\Fixtures\PropertyConstraint;
2626

2727
class MemberMetadataTest extends TestCase

Tests/Mapping/PropertyMetadataTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Validator\Exception\ValidatorException;
1616
use Symfony\Component\Validator\Mapping\PropertyMetadata;
17-
use Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\Entity;
18-
use Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\EntityParent;
1917
use Symfony\Component\Validator\Tests\Fixtures\Entity_74;
2018
use Symfony\Component\Validator\Tests\Fixtures\Entity_74_Proxy;
19+
use Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\Entity;
20+
use Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\EntityParent;
2121

2222
class PropertyMetadataTest extends TestCase
2323
{

Tests/Validator/RecursiveValidatorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@
4444
use Symfony\Component\Validator\ObjectInitializerInterface;
4545
use Symfony\Component\Validator\Tests\Constraints\Fixtures\ChildA;
4646
use Symfony\Component\Validator\Tests\Constraints\Fixtures\ChildB;
47-
use Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\Entity;
48-
use Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\EntityParent;
49-
use Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\GroupSequenceProviderEntity;
5047
use Symfony\Component\Validator\Tests\Fixtures\CascadedChild;
5148
use Symfony\Component\Validator\Tests\Fixtures\CascadingEntity;
5249
use Symfony\Component\Validator\Tests\Fixtures\EntityWithGroupedConstraintOnMethods;
5350
use Symfony\Component\Validator\Tests\Fixtures\FailingConstraint;
5451
use Symfony\Component\Validator\Tests\Fixtures\FakeMetadataFactory;
52+
use Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\Entity;
53+
use Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\EntityParent;
54+
use Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\GroupSequenceProviderEntity;
5555
use Symfony\Component\Validator\Tests\Fixtures\Reference;
5656
use Symfony\Component\Validator\Validator\ContextualValidatorInterface;
5757
use Symfony\Component\Validator\Validator\LazyProperty;

0 commit comments

Comments
 (0)