Skip to content

Commit 09cc7d0

Browse files
committed
minor #2077 [CI] Update php-cs-fixer config (smnandre)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- [CI] Update php-cs-fixer config * Update phh-cs-fixer version * Follow symfony/symfony configuration (#57941) * Apply new rules Commits ------- 09597b3 [CI] Update php-cs-fixer config
2 parents 70c68d8 + 09597b3 commit 09cc7d0

File tree

14 files changed

+82
-89
lines changed

14 files changed

+82
-89
lines changed

.php-cs-fixer.dist.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
'@Symfony' => true,
3030
'@Symfony:risky' => true,
3131
'header_comment' => ['header' => $fileHeaderComment],
32-
// TODO: Remove once the "compiler_optimized" set includes "sprintf"
33-
'native_function_invocation' => ['include' => ['@compiler_optimized', 'sprintf'], 'scope' => 'namespaced', 'strict' => true],
3432
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'match', 'parameters']],
3533
])
3634
->setRiskyAllowed(true)

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"require-dev": {
88
"symfony/filesystem": "^5.2|^6.0|^7.0",
99
"symfony/finder": "^5.4|^6.0|^7.0",
10-
"php-cs-fixer/shim": "^3.13"
10+
"php-cs-fixer/shim": "^3.62"
1111
}
1212
}

src/LiveComponent/tests/Integration/LiveComponentHydratorTest.php

Lines changed: 59 additions & 59 deletions
Large diffs are not rendered by default.

src/LiveComponent/tests/Unit/Attribute/AsLiveComponentTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class AsLiveComponentTest extends TestCase
2929
public function testPreDehydrateMethodsAreOrderedByPriority(): void
3030
{
3131
$hooks = AsLiveComponent::preDehydrateMethods(
32-
new class() {
32+
new class {
3333
#[PreDehydrate(priority: -10)]
3434
public function hook1()
3535
{
@@ -56,7 +56,7 @@ public function hook3()
5656
public function testPostHydrateMethodsAreOrderedByPriority(): void
5757
{
5858
$hooks = AsLiveComponent::postHydrateMethods(
59-
new class() {
59+
new class {
6060
#[PostHydrate(priority: -10)]
6161
public function hook1()
6262
{
@@ -83,7 +83,7 @@ public function hook3()
8383
public function testPreMountHooksAreOrderedByPriority(): void
8484
{
8585
$hooks = AsLiveComponent::preReRenderMethods(
86-
new class() {
86+
new class {
8787
#[PreReRender(priority: -10)]
8888
public function hook1()
8989
{

src/LiveComponent/tests/Unit/Attribute/LivePropTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ public function testDehydrateWithMethod(): void
3333

3434
public function testCanCallCalculateFieldNameAsString(): void
3535
{
36-
$component = new class() {};
36+
$component = new class {};
3737

3838
$this->assertSame('field', (new LiveProp(false, null, null, false, [], 'field'))->calculateFieldName($component, 'fallback'));
3939
}
4040

4141
public function testCanCallCalculateFieldNameAsMethod(): void
4242
{
43-
$component = new class() {
43+
$component = new class {
4444
public function fieldName(): string
4545
{
4646
return 'foo';
@@ -52,7 +52,7 @@ public function fieldName(): string
5252

5353
public function testCanCallCalculateFieldNameWhenNotSet(): void
5454
{
55-
$component = new class() {};
55+
$component = new class {};
5656

5757
$this->assertSame('fallback', (new LiveProp())->calculateFieldName($component, 'fallback'));
5858
}

src/Map/tests/MapTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function testWithMaximumConfiguration(): void
8383
->center(new Point(48.8566, 2.3522))
8484
->zoom(6)
8585
->fitBoundsToMarkers()
86-
->options(new class() implements MapOptionsInterface {
86+
->options(new class implements MapOptionsInterface {
8787
public function toArray(): array
8888
{
8989
return [

src/Turbo/src/TurboBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function build(ContainerBuilder $container): void
3434
{
3535
parent::build($container);
3636

37-
$container->addCompilerPass(new class() implements CompilerPassInterface {
37+
$container->addCompilerPass(new class implements CompilerPassInterface {
3838
public function process(ContainerBuilder $container): void
3939
{
4040
if (!$container->hasDefinition('turbo.broadcaster.imux')) {

src/TwigComponent/src/Attribute/AsTwigComponent.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ public function serviceConfig(): array
7878
/**
7979
* @param object|class-string $component
8080
*
81-
* @return ?\ReflectionMethod
82-
*
8381
* @internal
8482
*/
8583
public static function mountMethod(object|string $component): ?\ReflectionMethod

src/TwigComponent/tests/Integration/ComponentFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function testExceptionThrownIfRequiredMountParameterIsMissingFromPassedDa
9494

9595
public function testStringableObjectCanBePassedToComponent(): void
9696
{
97-
$attributes = $this->factory()->create('component_a', ['propB' => 'B', 'data-item-id-param' => new class() {
97+
$attributes = $this->factory()->create('component_a', ['propB' => 'B', 'data-item-id-param' => new class {
9898
public function __toString(): string
9999
{
100100
return 'test';

src/TwigComponent/tests/Unit/Attribute/AsTwigComponentTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ final class AsTwigComponentTest extends TestCase
2424
public function testPreMountHooksAreOrderedByPriority(): void
2525
{
2626
$hooks = AsTwigComponent::preMountMethods(
27-
new class() {
27+
new class {
2828
#[PreMount(priority: -10)]
2929
public function hook1()
3030
{
@@ -51,7 +51,7 @@ public function hook3()
5151
public function testPostMountHooksAreOrderedByPriority(): void
5252
{
5353
$hooks = AsTwigComponent::postMountMethods(
54-
new class() {
54+
new class {
5555
#[PostMount(priority: -10)]
5656
public function hook1()
5757
{

0 commit comments

Comments
 (0)