Skip to content

Commit 09597b3

Browse files
smnandrekbond
authored andcommitted
[CI] Update php-cs-fixer config
1 parent 2ded754 commit 09597b3

File tree

16 files changed

+87
-93
lines changed

16 files changed

+87
-93
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/Icons/src/Twig/UXIconRuntime.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public function renderIcon(string $name, array $attributes = []): string
4040
} catch (IconNotFoundException $e) {
4141
if ($this->ignoreNotFound) {
4242
$this->logger?->warning($e->getMessage());
43+
4344
return '';
4445
}
4546

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/LiveComponent/tests/Unit/Twig/LiveComponentRuntimeTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ public function testGetLiveAction(): void
2828
$this->assertSame('data-action="live#action" data-live-prop1-param="val1" data-live-some-prop-param="val2" data-live-action-param="action-name"', $props);
2929

3030
$props = $runtime->liveAction('action-name', ['prop1' => 'val1', 'prop2' => 'val2'], ['debounce' => 300]);
31-
$this->assertSame('data-action="live#action" data-live-prop1-param="val1" data-live-prop2-param="val2" data-live-action-param="debounce(300)|action-name"', \html_entity_decode($props));
31+
$this->assertSame('data-action="live#action" data-live-prop1-param="val1" data-live-prop2-param="val2" data-live-action-param="debounce(300)|action-name"', html_entity_decode($props));
3232
$this->assertSame('data-action="live#action" data-live-prop1-param="val1" data-live-prop2-param="val2" data-live-action-param="debounce(300)|action-name"', $props);
3333

3434
$props = $runtime->liveAction('action-name:prevent', ['pro1' => 'val1', 'prop2' => 'val2'], ['debounce' => 300]);
35-
$this->assertSame('data-action="live#action:prevent" data-live-pro1-param="val1" data-live-prop2-param="val2" data-live-action-param="debounce(300)|action-name"', \html_entity_decode($props));
35+
$this->assertSame('data-action="live#action:prevent" data-live-pro1-param="val1" data-live-prop2-param="val2" data-live-action-param="debounce(300)|action-name"', html_entity_decode($props));
3636
$this->assertSame('data-action="live#action:prevent" data-live-pro1-param="val1" data-live-prop2-param="val2" data-live-action-param="debounce(300)|action-name"', $props);
3737

3838
$props = $runtime->liveAction('action-name:prevent', [], ['debounce' => 300]);
39-
$this->assertSame('data-action="live#action:prevent" data-live-action-param="debounce(300)|action-name"', \html_entity_decode($props));
39+
$this->assertSame('data-action="live#action:prevent" data-live-action-param="debounce(300)|action-name"', html_entity_decode($props));
4040

4141
$props = $runtime->liveAction('action-name', [], [], 'keydown.esc');
42-
$this->assertSame('data-action="keydown.esc->live#action" data-live-action-param="action-name"', \html_entity_decode($props));
42+
$this->assertSame('data-action="keydown.esc->live#action" data-live-action-param="action-name"', html_entity_decode($props));
4343
}
4444
}

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

0 commit comments

Comments
 (0)