From 4ebef4b41e2524b7b797a103144256e5f7b39226 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 29 Jul 2025 16:51:49 +0200 Subject: [PATCH] Apply fabbot rules --- tests/Dto/StimulusAttributesTest.php | 18 +++++++++--------- tests/Helper/StimulusHelperTest.php | 2 +- tests/Twig/StimulusTwigExtensionTest.php | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/Dto/StimulusAttributesTest.php b/tests/Dto/StimulusAttributesTest.php index be252c2..9240146 100644 --- a/tests/Dto/StimulusAttributesTest.php +++ b/tests/Dto/StimulusAttributesTest.php @@ -25,21 +25,21 @@ final class StimulusAttributesTest extends TestCase $this->stimulusAttributes = new StimulusAttributes(new Environment(new ArrayLoader())); } - public function testAddAction(): void + public function testAddAction() { $this->stimulusAttributes->addAction('foo', 'bar', 'baz', ['qux' => '"']); $attributesHtml = (string) $this->stimulusAttributes; self::assertSame('data-action="baz->foo#bar" data-foo-qux-param="""', $attributesHtml); } - public function testAddActionToArrayNoEscapingAttributeValues(): void + public function testAddActionToArrayNoEscapingAttributeValues() { $this->stimulusAttributes->addAction('foo', 'bar', 'baz', ['qux' => '"']); $attributesArray = $this->stimulusAttributes->toArray(); self::assertSame(['data-action' => 'baz->foo#bar', 'data-foo-qux-param' => '"'], $attributesArray); } - public function testAddActionWithMultiple(): void + public function testAddActionWithMultiple() { $this->stimulusAttributes->addAction('my-controller', 'onClick'); $this->assertSame('data-action="my-controller#onClick"', (string) $this->stimulusAttributes); @@ -52,7 +52,7 @@ final class StimulusAttributesTest extends TestCase ); } - public function testAddControllerToStringEscapingAttributeValues(): void + public function testAddControllerToStringEscapingAttributeValues() { $this->stimulusAttributes->addController('foo', ['bar' => '"'], ['baz' => '"']); $attributesHtml = (string) $this->stimulusAttributes; @@ -64,7 +64,7 @@ final class StimulusAttributesTest extends TestCase ); } - public function testAddControllerToArrayNoEscapingAttributeValues(): void + public function testAddControllerToArrayNoEscapingAttributeValues() { $this->stimulusAttributes->addController('foo', ['bar' => '"'], ['baz' => '"']); $attributesArray = $this->stimulusAttributes->toArray(); @@ -101,21 +101,21 @@ final class StimulusAttributesTest extends TestCase ); } - public function testAddTargetToStringEscapingAttributeValues(): void + public function testAddTargetToStringEscapingAttributeValues() { $this->stimulusAttributes->addTarget('foo', '"'); $attributesHtml = (string) $this->stimulusAttributes; self::assertSame('data-foo-target="""', $attributesHtml); } - public function testAddTargetToArrayNoEscapingAttributeValues(): void + public function testAddTargetToArrayNoEscapingAttributeValues() { $this->stimulusAttributes->addTarget('foo', '"'); $attributesArray = $this->stimulusAttributes->toArray(); self::assertSame(['data-foo-target' => '"'], $attributesArray); } - public function testAddTargetWithMultiple(): void + public function testAddTargetWithMultiple() { $this->stimulusAttributes->addTarget('my-controller', 'myTarget'); $this->assertSame('data-my-controller-target="myTarget"', (string) $this->stimulusAttributes); @@ -152,7 +152,7 @@ final class StimulusAttributesTest extends TestCase /** * @dataProvider provideAddComplexActionData */ - public function testAddComplexAction(string $controllerName, string $actionName, ?string $eventName, string $expectedAction): void + public function testAddComplexAction(string $controllerName, string $actionName, ?string $eventName, string $expectedAction) { $this->stimulusAttributes->addAction($controllerName, $actionName, $eventName); $attributesHtml = (string) $this->stimulusAttributes; diff --git a/tests/Helper/StimulusHelperTest.php b/tests/Helper/StimulusHelperTest.php index 711ac2b..ba2f6f3 100644 --- a/tests/Helper/StimulusHelperTest.php +++ b/tests/Helper/StimulusHelperTest.php @@ -18,7 +18,7 @@ use Twig\Environment; final class StimulusHelperTest extends TestCase { - public function testCreateStimulusAttributes(): void + public function testCreateStimulusAttributes() { $helper = new StimulusHelper($this->createMock(Environment::class)); $attributes = $helper->createStimulusAttributes(); diff --git a/tests/Twig/StimulusTwigExtensionTest.php b/tests/Twig/StimulusTwigExtensionTest.php index 0e8cdbf..c7a0b14 100644 --- a/tests/Twig/StimulusTwigExtensionTest.php +++ b/tests/Twig/StimulusTwigExtensionTest.php @@ -32,7 +32,7 @@ final class StimulusTwigExtensionTest extends TestCase /** * @dataProvider provideRenderStimulusController */ - public function testRenderStimulusController(string $controllerName, array $controllerValues, array $controllerClasses, array $controllerOutlets, string $expectedString, array $expectedArray): void + public function testRenderStimulusController(string $controllerName, array $controllerValues, array $controllerClasses, array $controllerOutlets, string $expectedString, array $expectedArray) { $extension = new StimulusTwigExtension(new StimulusHelper($this->twig)); $dto = $extension->renderStimulusController($controllerName, $controllerValues, $controllerClasses, $controllerOutlets); @@ -130,7 +130,7 @@ final class StimulusTwigExtensionTest extends TestCase ]; } - public function testAppendStimulusController(): void + public function testAppendStimulusController() { $extension = new StimulusTwigExtension(new StimulusHelper($this->twig)); $dto = $extension->renderStimulusController('my-controller', ['myValue' => 'scalar-value']); @@ -143,7 +143,7 @@ final class StimulusTwigExtensionTest extends TestCase /** * @dataProvider provideRenderStimulusAction */ - public function testRenderStimulusAction(string $controllerName, ?string $actionName, ?string $eventName, array $parameters, string $expectedString, array $expectedArray): void + public function testRenderStimulusAction(string $controllerName, ?string $actionName, ?string $eventName, array $parameters, string $expectedString, array $expectedArray) { $extension = new StimulusTwigExtension(new StimulusHelper($this->twig)); $dto = $extension->renderStimulusAction($controllerName, $actionName, $eventName, $parameters); @@ -208,7 +208,7 @@ final class StimulusTwigExtensionTest extends TestCase ]; } - public function testAppendStimulusAction(): void + public function testAppendStimulusAction() { $extension = new StimulusTwigExtension(new StimulusHelper($this->twig)); $dto = $extension->renderStimulusAction('my-controller', 'onClick', 'click'); @@ -246,7 +246,7 @@ final class StimulusTwigExtensionTest extends TestCase ]; } - public function testAppendStimulusTarget(): void + public function testAppendStimulusTarget() { $extension = new StimulusTwigExtension(new StimulusHelper($this->twig)); $dto = $extension->renderStimulusTarget('my-controller', 'myTarget');