Skip to content

chore: PHP CS Fixer fixes #59210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
->notPath('Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php')
// stop removing spaces on the end of the line in strings
->notPath('Symfony/Component/Messenger/Tests/Command/FailedMessagesShowCommandTest.php')
// disable to not apply `native_function_invocation` rule, as we explicitly break it for testability reason, ref https://github.com/symfony/symfony/pull/59195
->notPath('Symfony/Component/Mailer/Transport/NativeTransportFactory.php')
// auto-generated proxies
->notPath('Symfony/Component/Cache/Traits/RelayProxy.php')
->notPath('Symfony/Component/Cache/Traits/Redis5Proxy.php')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ public static function provideDownloadPackagesTests()
'body' => <<<'EOF'
const je="\n//# sourceURL=",Ue="\n//# sourceMappingURL=",Me=/^(text|application)\/(x-)?javascript(;|$)/,_e=/^(application)\/wasm(;|$)/,Ie=/^(text|application)\/json(;|$)/,Re=/^(text|application)\/css(;|$)/,Te=/url\(\s*(?:(["'])((?:\\.|[^\n\\"'])+)\1|((?:\\.|[^\s,"'()\\])+))\s*\)/g;
//# sourceMappingURL=/sm/ef3916de598f421a779ba0e69af94655b2043095cde2410cc01893452d893338.map
EOF
EOF,
],
],
[
Expand Down
44 changes: 22 additions & 22 deletions src/Symfony/Component/Console/Tests/Helper/TableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public static function renderProvider()
| 80-902734-1-6 | And Then There Were None | Agatha Christie |
+---------------+--------------------------+------------------+

TABLE
TABLE,
],
[
['ISBN', 'Title', 'Author'],
Expand Down Expand Up @@ -157,7 +157,7 @@ public static function renderProvider()
│ 80-902734-1-6 │ And Then There Were None │ Agatha Christie │
└───────────────┴──────────────────────────┴──────────────────┘

TABLE
TABLE,
],
[
['ISBN', 'Title', 'Author'],
Expand All @@ -180,7 +180,7 @@ public static function renderProvider()
║ 80-902734-1-6 │ And Then There Were None │ Agatha Christie ║
╚═══════════════╧══════════════════════════╧══════════════════╝

TABLE
TABLE,
],
[
['ISBN', 'Title'],
Expand All @@ -201,7 +201,7 @@ public static function renderProvider()
| 80-902734-1-6 | And Then There Were None | Agatha Christie |
+---------------+--------------------------+------------------+

TABLE
TABLE,
],
[
[],
Expand All @@ -220,7 +220,7 @@ public static function renderProvider()
| 80-902734-1-6 | And Then There Were None | Agatha Christie |
+---------------+--------------------------+------------------+

TABLE
TABLE,
],
[
['ISBN', 'Title', 'Author'],
Expand All @@ -245,7 +245,7 @@ public static function renderProvider()
| | | Tolkien |
+---------------+----------------------------+-----------------+

TABLE
TABLE,
],
[
['ISBN', 'Title'],
Expand All @@ -256,7 +256,7 @@ public static function renderProvider()
| ISBN | Title |
+------+-------+

TABLE
TABLE,
],
[
[],
Expand All @@ -279,7 +279,7 @@ public static function renderProvider()
| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
+---------------+----------------------+-----------------+

TABLE
TABLE,
],
'Cell text with tags not used for Output styling' => [
['ISBN', 'Title', 'Author'],
Expand All @@ -296,7 +296,7 @@ public static function renderProvider()
| 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens |
+----------------------------------+----------------------+-----------------+

TABLE
TABLE,
],
'Cell with colspan' => [
['ISBN', 'Title', 'Author'],
Expand Down Expand Up @@ -336,7 +336,7 @@ public static function renderProvider()
| Cupìdĭtâte díctá âtquè pôrrò, tèmpórà exercitátìónèm mòdí ânìmí núllà nèmò vèl níhìl! |
+-------------------------------+-------------------------------+-----------------------------+

TABLE
TABLE,
],
'Cell after colspan contains new line break' => [
['Foo', 'Bar', 'Baz'],
Expand All @@ -355,7 +355,7 @@ public static function renderProvider()
| bar | qux |
+-----+-----+-----+

TABLE
TABLE,
],
'Cell after colspan contains multiple new lines' => [
['Foo', 'Bar', 'Baz'],
Expand All @@ -375,7 +375,7 @@ public static function renderProvider()
| | quux |
+-----+-----+------+

TABLE
TABLE,
],
'Cell with rowspan' => [
['ISBN', 'Title', 'Author'],
Expand Down Expand Up @@ -406,7 +406,7 @@ public static function renderProvider()
| | Were None | |
+---------------+---------------+-----------------+

TABLE
TABLE,
],
'Cell with rowspan and colspan' => [
['ISBN', 'Title', 'Author'],
Expand Down Expand Up @@ -437,7 +437,7 @@ public static function renderProvider()
| J. R. R | |
+------------------+---------+-----------------+

TABLE
TABLE,
],
'Cell with rowspan and colspan contains new line break' => [
['ISBN', 'Title', 'Author'],
Expand Down Expand Up @@ -480,7 +480,7 @@ public static function renderProvider()
| 0-0 | |
+-----------------+-------+-----------------+

TABLE
TABLE,
],
'Cell with rowspan and colspan without using TableSeparator' => [
['ISBN', 'Title', 'Author'],
Expand Down Expand Up @@ -511,7 +511,7 @@ public static function renderProvider()
| | 0-0 |
+-----------------+-------+-----------------+

TABLE
TABLE,
],
'Cell with rowspan and colspan with separator inside a rowspan' => [
['ISBN', 'Author'],
Expand All @@ -533,7 +533,7 @@ public static function renderProvider()
| | Charles Dickens |
+---------------+-----------------+

TABLE
TABLE,
],
'Multiple header lines' => [
[
Expand All @@ -549,7 +549,7 @@ public static function renderProvider()
| ISBN | Title | Author |
+------+-------+--------+

TABLE
TABLE,
],
'Row with multiple cells' => [
[],
Expand All @@ -567,7 +567,7 @@ public static function renderProvider()
| 1 | 2 | 3 | 4 |
+---+--+--+---+--+---+--+---+--+

TABLE
TABLE,
],
'Coslpan and table cells with comment style' => [
[
Expand Down Expand Up @@ -1305,7 +1305,7 @@ public static function renderSetTitle()
| 80-902734-1-6 | And Then There Were None | Agatha Christie |
+---------------+---------- footer --------+------------------+

TABLE
TABLE,
],
[
'Books',
Expand All @@ -1321,7 +1321,7 @@ public static function renderSetTitle()
│ 80-902734-1-6 │ And Then There Were None │ Agatha Christie │
└───────────────┴───────── Page 1/2 ───────┴──────────────────┘

TABLE
TABLE,
],
[
'Boooooooooooooooooooooooooooooooooooooooooooooooooooooooks',
Expand All @@ -1337,7 +1337,7 @@ public static function renderSetTitle()
| 80-902734-1-6 | And Then There Were None | Agatha Christie |
+- Page 1/99999999999999999999999999999999999999999999999... -+

TABLE
TABLE,
],
];
}
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/JsonEncoder/Decode/PhpAstBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
use Symfony\Component\TypeInfo\Type\BackedEnumType;
use Symfony\Component\TypeInfo\Type\CollectionType;
use Symfony\Component\TypeInfo\Type\ObjectType;
use Symfony\Component\TypeInfo\TypeIdentifier;
use Symfony\Component\TypeInfo\Type\WrappingTypeInterface;
use Symfony\Component\TypeInfo\TypeIdentifier;

/**
* Builds a PHP syntax tree that decodes JSON.
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/JsonEncoder/Encode/PhpAstBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
use Symfony\Component\JsonEncoder\Exception\RuntimeException;
use Symfony\Component\JsonEncoder\Exception\UnexpectedValueException;
use Symfony\Component\TypeInfo\Type\ObjectType;
use Symfony\Component\TypeInfo\TypeIdentifier;
use Symfony\Component\TypeInfo\Type\WrappingTypeInterface;
use Symfony\Component\TypeInfo\TypeIdentifier;

/**
* Builds a PHP syntax tree that encodes data to JSON.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
use Symfony\Component\TypeInfo\Type\IntersectionType;
use Symfony\Component\TypeInfo\Type\ObjectType;
use Symfony\Component\TypeInfo\Type\UnionType;
use Symfony\Component\TypeInfo\TypeContext\TypeContextFactory;
use Symfony\Component\TypeInfo\Type\WrappingTypeInterface;
use Symfony\Component\TypeInfo\TypeContext\TypeContextFactory;

/**
* Enhances properties encoding/decoding metadata based on properties' generic type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ private function isAllowedProperty(string $class, string $property, bool $writeA
return (bool) ($this->propertyReflectionFlags & \ReflectionProperty::IS_PRIVATE);
}

if (\PHP_VERSION_ID >= 80400 &&$reflectionProperty->isVirtual() && !$reflectionProperty->hasHook(\PropertyHookType::Set)) {
if (\PHP_VERSION_ID >= 80400 && $reflectionProperty->isVirtual() && !$reflectionProperty->hasHook(\PropertyHookType::Set)) {
return false;
}
}
Expand Down Expand Up @@ -976,7 +976,7 @@ private function getWriteVisiblityForProperty(\ReflectionProperty $reflectionPro

if ($reflectionProperty->isProtectedSet()) {
return PropertyWriteInfo::VISIBILITY_PROTECTED;
}
}
}

if ($reflectionProperty->isPrivate()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static function routeProvider()
root
prefix_segment
leading_segment
EOF
EOF,
],
'Nested - small group' => [
[
Expand All @@ -60,7 +60,7 @@ public static function routeProvider()
/prefix/segment/
-> prefix_segment
-> leading_segment
EOF
EOF,
],
'Nested - contains item at intersection' => [
[
Expand All @@ -73,7 +73,7 @@ public static function routeProvider()
/prefix/segment/
-> prefix_segment
-> leading_segment
EOF
EOF,
],
'Simple one level nesting' => [
[
Expand All @@ -88,7 +88,7 @@ public static function routeProvider()
-> nested_segment
-> some_segment
-> other_segment
EOF
EOF,
],
'Retain matching order with groups' => [
[
Expand All @@ -110,7 +110,7 @@ public static function routeProvider()
-> dd
-> ee
-> ff
EOF
EOF,
],
'Retain complex matching order with groups at base' => [
[
Expand Down Expand Up @@ -142,7 +142,7 @@ public static function routeProvider()
-> -> ee
-> -> ff
-> parent
EOF
EOF,
],

'Group regardless of segments' => [
Expand All @@ -163,7 +163,7 @@ public static function routeProvider()
-> g1
-> g2
-> g3
EOF
EOF,
],
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private function isSetMethod(\ReflectionMethod $method): bool
&& 0 < $method->getNumberOfParameters()
&& str_starts_with($method->name, 'set')
&& !ctype_lower($method->name[3])
;
;
}

protected function extractAttributes(object $object, ?string $format = null, array $context = []): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static function provideValidInputs(): iterable
-normalizationContext: []
-denormalizationContext: []
}
DUMP
DUMP,
];

yield 'named arguments: with normalization context option' => [
Expand All @@ -100,7 +100,7 @@ public static function provideValidInputs(): iterable
]
-denormalizationContext: []
}
DUMP
DUMP,
];

yield 'named arguments: with denormalization context option' => [
Expand All @@ -114,7 +114,7 @@ public static function provideValidInputs(): iterable
"foo" => "bar",
]
}
DUMP
DUMP,
];

yield 'named arguments: with groups option as string' => [
Expand All @@ -130,7 +130,7 @@ public static function provideValidInputs(): iterable
-normalizationContext: []
-denormalizationContext: []
}
DUMP
DUMP,
];

yield 'named arguments: with groups option as array' => [
Expand All @@ -147,7 +147,7 @@ public static function provideValidInputs(): iterable
-normalizationContext: []
-denormalizationContext: []
}
DUMP
DUMP,
];
}
}
Loading
Loading