Hello Fabien!',
@@ -47,7 +47,7 @@ public function testAnEmbeddedComponentHasContextAccess(): void
* Rule 3: A block is only passed one level down, via the display() function on the embedded Template that's
* representing a component instance.
*/
- public function testABlockIsOnlyPassedOneLevelDown(): void
+ public function testABlockIsOnlyPassedOneLevelDown()
{
$output = self::render('embedded_component_blocks_no_pass.html.twig');
@@ -60,7 +60,7 @@ public function testABlockIsOnlyPassedOneLevelDown(): void
* Rule 4: Inside that component's template you can use it, but NOT within a nested component. The latter is
* repeating rule 1.
*/
- public function testABlockIsNotPassedToNestedComponents(): void
+ public function testABlockIsNotPassedToNestedComponents()
{
$this->assertStringContainsStringIgnoringIndentation(
'Hello world!
The Generic Element default foo block
',
@@ -75,7 +75,7 @@ public function testABlockIsNotPassedToNestedComponents(): void
* Rule 7: If you want to pass that outer block along to the template of that nested component,
* You can use it inside the block definition with the embedded component.
*/
- public function testBlockCanBeUsedWithinNestedViaTheOuterBlocks(): void
+ public function testBlockCanBeUsedWithinNestedViaTheOuterBlocks()
{
$this->assertStringContainsStringIgnoringIndentation(
'Hello world!
Hello world!Override foo & Override foo
',
@@ -87,7 +87,7 @@ public function testBlockCanBeUsedWithinNestedViaTheOuterBlocks(): void
* Rule 5 bis: A block inside an extending template can be use inside a component in that template and is NOT
* rendered in the original location.
*/
- public function testBlockCanBeUsedViaTheOuterBlocks(): void
+ public function testBlockCanBeUsedViaTheOuterBlocks()
{
$output = self::render('embedded_component_blocks_outer_blocks_extended_template.html.twig');
@@ -100,7 +100,7 @@ public function testBlockCanBeUsedViaTheOuterBlocks(): void
* template. This also means that when passing block down that you will lose that default content. That can be
* avoided by using {{ parent() }} like you normally would.
*/
- public function testBlockDefinitionsPassingDownOuterBlocksOverrideDefaultContent(): void
+ public function testBlockDefinitionsPassingDownOuterBlocksOverrideDefaultContent()
{
$this->assertStringContainsStringIgnoringIndentation(
'
Hello world!The Generic Element default foo block + Override foo
',
@@ -111,7 +111,7 @@ public function testBlockDefinitionsPassingDownOuterBlocksOverrideDefaultContent
/**
* Rule 9: Passing blocks also works with nesting a component inside another instance of the same component.
*/
- public function testDeepNesting(): void
+ public function testDeepNesting()
{
$this->assertStringContainsStringIgnoringIndentation(
'
Content 1
Content 2
Content 3Override foo3
Override foo2 Override foo1',
@@ -123,7 +123,7 @@ public function testDeepNesting(): void
* Rule 10: Missing outer blocks use a fallback block so that nothing is rendered, and no unknown block error
* occurs.
*/
- public function testItCanHandleMissingOuterBlocks(): void
+ public function testItCanHandleMissingOuterBlocks()
{
$this->assertStringContainsStringIgnoringIndentation(
'
Content 1
Content 2
Content 3Override foo3
Override foo1',
@@ -137,7 +137,7 @@ public function testItCanHandleMissingOuterBlocks(): void
* Not defining a block (and not passing said block along) will be considered as a missing block (see rule
* 10).
*/
- public function testPassingDownBlocksMultipleLevelsNeedsToBeDoneManually(): void
+ public function testPassingDownBlocksMultipleLevelsNeedsToBeDoneManually()
{
$this->assertStringContainsStringIgnoringIndentation(
'
DIV CONTENT: WRAPPER CONTENT: Content from wrapperI\'m fixing foo content
DIV CONTENT: WRAPPER CONTENT: Content from wrapperI don\'t have a foo block, so it will be considered empty.
',
@@ -150,7 +150,7 @@ public function testPassingDownBlocksMultipleLevelsNeedsToBeDoneManually(): void
* Rule 13: Blocks defined within an embedded component can access the context of components up the hierarchy (up
* to their own level) via "outerScope".
*/
- public function testBlockDefinitionCanAccessTheContextOfTheDestinationBlocks(): void
+ public function testBlockDefinitionCanAccessTheContextOfTheDestinationBlocks()
{
$this->assertStringContainsStringIgnoringIndentation(
'
I can access my own properties: foo.I can access the id of the Generic Element: symfonyIsAwesome.This refers to the Generic Element: calling GenericElement.To access my own functions I can use outerScope.this: calling DivComponent.I have access to outer context variables like Fabien.I can access the id from Generic Element as well: symfonyIsAwesome.I can access the properties from DivComponent as well: foo.And of course the properties from DivComponentWrapper: bar.The less obvious thing is that at this level "this" refers to the component where the content block is used, i.e. the Generic Element.Therefore, functions through this will be calling GenericElement.Calls to outerScope.this will be calling DivComponent.Even I can access the id from Generic Element as well: symfonyIsAwesome.Even I can access the properties from DivComponent as well: foo.Even I can access the properties from DivComponentWrapper as well: bar.Even I can access the functions of DivComponent via outerScope.this: calling DivComponent.Since we are nesting two levels deep, calls to outerScope.outerScope.this will be calling DivComponentWrapper.The Generic Element default foo block
',
@@ -158,7 +158,7 @@ public function testBlockDefinitionCanAccessTheContextOfTheDestinationBlocks():
);
}
- public function testAccessingTheHierarchyTooHighThrowsAnException(): void
+ public function testAccessingTheHierarchyTooHighThrowsAnException()
{
// Twig renamed "array" into "sequence" in 3.11
$this->expectExceptionMessage('Key "$this" for ');
@@ -166,7 +166,7 @@ public function testAccessingTheHierarchyTooHighThrowsAnException(): void
self::render('embedded_component_hierarchy_exception.html.twig');
}
- public function testANonEmbeddedComponentRendersOuterBlocksEmpty(): void
+ public function testANonEmbeddedComponentRendersOuterBlocksEmpty()
{
$this->assertStringContainsStringIgnoringIndentation(
'
',
@@ -174,7 +174,7 @@ public function testANonEmbeddedComponentRendersOuterBlocksEmpty(): void
);
}
- public function testANonEmbeddedComponentCanRenderParentBlocksAsFallback(): void
+ public function testANonEmbeddedComponentCanRenderParentBlocksAsFallback()
{
$this->assertStringContainsStringIgnoringIndentation(
'
The Generic Element could have some default content, although it does not make sense in this example.The Generic Element default foo block
',
diff --git a/src/TwigComponent/tests/Integration/Test/InteractsWithTwigComponentsTest.php b/src/TwigComponent/tests/Integration/Test/InteractsWithTwigComponentsTest.php
index 7e2b5d077e8..1d2b78524c5 100644
--- a/src/TwigComponent/tests/Integration/Test/InteractsWithTwigComponentsTest.php
+++ b/src/TwigComponent/tests/Integration/Test/InteractsWithTwigComponentsTest.php
@@ -24,7 +24,7 @@ final class InteractsWithTwigComponentsTest extends KernelTestCase
/**
* @dataProvider componentANameProvider
*/
- public function testCanMountComponent(string $name): void
+ public function testCanMountComponent(string $name)
{
$component = $this->mountTwigComponent($name, [
'propA' => 'prop a value',
@@ -40,7 +40,7 @@ public function testCanMountComponent(string $name): void
/**
* @dataProvider componentANameProvider
*/
- public function testCanRenderComponent(string $name): void
+ public function testCanRenderComponent(string $name)
{
$rendered = $this->renderTwigComponent($name, [
'propA' => 'prop a value',
@@ -56,7 +56,7 @@ public function testCanRenderComponent(string $name): void
/**
* @dataProvider withSlotsNameProvider
*/
- public function testCanRenderComponentWithSlots(string $name): void
+ public function testCanRenderComponentWithSlots(string $name)
{
$rendered = $this->renderTwigComponent(
name: $name,
diff --git a/src/TwigComponent/tests/Integration/Twig/ComponentParserTest.php b/src/TwigComponent/tests/Integration/Twig/ComponentParserTest.php
index c5799440a13..e5806747328 100644
--- a/src/TwigComponent/tests/Integration/Twig/ComponentParserTest.php
+++ b/src/TwigComponent/tests/Integration/Twig/ComponentParserTest.php
@@ -27,7 +27,7 @@ final class ComponentParserTest extends KernelTestCase
/**
* @dataProvider provideValidComponentNames
*/
- public function testAcceptTwigComponentTagWithValidComponentName(string $name): void
+ public function testAcceptTwigComponentTagWithValidComponentName(string $name)
{
$environment = $this->createEnvironment();
$source = str_replace('XXX', $name, "{% component 'XXX' %}{% endcomponent %}");
@@ -40,7 +40,7 @@ public function testAcceptTwigComponentTagWithValidComponentName(string $name):
/**
* @dataProvider provideValidComponentNames
*/
- public function testAcceptHtmlComponentTagWithValidComponentName(string $name): void
+ public function testAcceptHtmlComponentTagWithValidComponentName(string $name)
{
$environment = $this->createEnvironment();
$source = \sprintf('
', $name, $name);
@@ -53,7 +53,7 @@ public function testAcceptHtmlComponentTagWithValidComponentName(string $name):
/**
* @dataProvider provideValidComponentNames
*/
- public function testAcceptHtmlSelfClosingComponentTagWithValidComponentName(string $name): void
+ public function testAcceptHtmlSelfClosingComponentTagWithValidComponentName(string $name)
{
$environment = $this->createEnvironment();
$source = \sprintf('
', $name);
@@ -63,7 +63,7 @@ public function testAcceptHtmlSelfClosingComponentTagWithValidComponentName(stri
$this->assertInstanceOf(TemplateWrapper::class, $template);
}
- public function testItThrowsWhenComponentNameCannotBeParsed(): void
+ public function testItThrowsWhenComponentNameCannotBeParsed()
{
$environment = $this->createEnvironment();
$source = '{% component [] %}{% endcomponent %}';
diff --git a/src/TwigComponent/tests/Integration/Twig/ComponentPropsParserTest.php b/src/TwigComponent/tests/Integration/Twig/ComponentPropsParserTest.php
index 6f7ac926df3..c7d48de8578 100644
--- a/src/TwigComponent/tests/Integration/Twig/ComponentPropsParserTest.php
+++ b/src/TwigComponent/tests/Integration/Twig/ComponentPropsParserTest.php
@@ -28,7 +28,7 @@ class ComponentPropsParserTest extends KernelTestCase
/**
* @dataProvider providePropsData
*/
- public function testPropsData(string $template, array $props, string $text): void
+ public function testPropsData(string $template, array $props, string $text)
{
$loader = new ArrayLoader(['template' => $template]);
diff --git a/src/TwigComponent/tests/Unit/CVATest.php b/src/TwigComponent/tests/Unit/CVATest.php
index c3ad61f2369..cf17794b126 100644
--- a/src/TwigComponent/tests/Unit/CVATest.php
+++ b/src/TwigComponent/tests/Unit/CVATest.php
@@ -26,7 +26,7 @@ class CVATest extends TestCase
/**
* @dataProvider recipeProvider
*/
- public function testRecipes(array $recipe, array $recipes, string $expected): void
+ public function testRecipes(array $recipe, array $recipes, string $expected)
{
$recipeClass = new CVA(
base: $recipe['base'] ?? '',
@@ -38,7 +38,7 @@ public function testRecipes(array $recipe, array $recipes, string $expected): vo
$this->assertEquals($expected, $recipeClass->apply($recipes));
}
- public function testApply(): void
+ public function testApply()
{
$recipe = new CVA('font-semibold border rounded', [
'colors' => [
@@ -61,7 +61,7 @@ public function testApply(): void
$this->assertEquals('font-semibold border rounded text-primary text-sm text-red-500', $recipe->apply(['colors' => 'primary', 'sizes' => 'sm']));
}
- public function testApplyWithNullString(): void
+ public function testApplyWithNullString()
{
$recipe = new CVA('font-semibold border rounded', [
'colors' => [
@@ -632,13 +632,13 @@ public static function recipeProvider(): iterable
/**
* @dataProvider provideAdditionalClassesCases
*/
- public function testAdditionalClasses(string|array $base, array|string $additionals, string $expected): void
+ public function testAdditionalClasses(string|array $base, array|string $additional, string $expected)
{
$cva = new CVA($base);
- if ([] === $additionals || '' === $additionals) {
+ if ([] === $additional || '' === $additional) {
$this->assertEquals($expected, $cva->apply([]));
} else {
- $this->assertEquals($expected, $cva->apply([], ...(array) $additionals));
+ $this->assertEquals($expected, $cva->apply([], ...(array) $additional));
}
}
diff --git a/src/TwigComponent/tests/Unit/ComponentAttributesTest.php b/src/TwigComponent/tests/Unit/ComponentAttributesTest.php
index 255364ca48e..dda7dd583f7 100644
--- a/src/TwigComponent/tests/Unit/ComponentAttributesTest.php
+++ b/src/TwigComponent/tests/Unit/ComponentAttributesTest.php
@@ -27,7 +27,7 @@ final class ComponentAttributesTest extends TestCase
{
use ExpectDeprecationTrait;
- public function testCanConvertToString(): void
+ public function testCanConvertToString()
{
$attributes = new ComponentAttributes([
'class' => 'foo',
@@ -44,7 +44,7 @@ public function __toString(): string
$this->assertSame(' class="foo" style="color:black;" value="" autofocus', (string) $attributes);
}
- public function testCanSetDefaults(): void
+ public function testCanSetDefaults()
{
$attributes = new ComponentAttributes(['class' => 'foo', 'style' => 'color:black;'], new EscaperRuntime());
@@ -60,14 +60,14 @@ public function testCanSetDefaults(): void
$this->assertSame(['class' => 'foo'], (new ComponentAttributes([], new EscaperRuntime()))->defaults(['class' => 'foo'])->all());
}
- public function testCanGetOnly(): void
+ public function testCanGetOnly()
{
$attributes = new ComponentAttributes(['class' => 'foo', 'style' => 'color:black;'], new EscaperRuntime());
$this->assertSame(['class' => 'foo'], $attributes->only('class')->all());
}
- public function testCanGetWithout(): void
+ public function testCanGetWithout()
{
$attributes = new ComponentAttributes(['class' => 'foo', 'style' => 'color:black;'], new EscaperRuntime());
@@ -77,7 +77,7 @@ public function testCanGetWithout(): void
/**
* @group legacy
*/
- public function testCanAddStimulusController(): void
+ public function testCanAddStimulusController()
{
$attributes = new ComponentAttributes([
'class' => 'foo',
@@ -106,7 +106,7 @@ public function testCanAddStimulusController(): void
/**
* @group legacy
*/
- public function testCanAddStimulusControllerIfNoneAlreadyPresent(): void
+ public function testCanAddStimulusControllerIfNoneAlreadyPresent()
{
$attributes = new ComponentAttributes([
'class' => 'foo',
@@ -129,7 +129,7 @@ public function testCanAddStimulusControllerIfNoneAlreadyPresent(): void
], $attributes->all());
}
- public function testCanAddStimulusControllerViaStimulusAttributes(): void
+ public function testCanAddStimulusControllerViaStimulusAttributes()
{
// if PHP less than 8.1, skip
if (version_compare(\PHP_VERSION, '8.1.0', '<')) {
@@ -157,7 +157,7 @@ public function testCanAddStimulusControllerViaStimulusAttributes(): void
$this->assertSame(' data-controller="foo live" data-foo-name-value="ryan" data-foo-some-array-value="["a","b"]" data-foo-some-array-with-keys-value="{"key1":"value1","key2":"value2"}" class="foo" data-live-data-value="{}"', (string) $attributes);
}
- public function testCanAddStimulusActionViaStimulusAttributes(): void
+ public function testCanAddStimulusActionViaStimulusAttributes()
{
// if PHP less than 8.1, skip
if (version_compare(\PHP_VERSION, '8.1.0', '<')) {
@@ -180,7 +180,7 @@ public function testCanAddStimulusActionViaStimulusAttributes(): void
$this->assertSame(' data-action="foo#barMethod live#foo" class="foo"', (string) $attributes);
}
- public function testBooleanBehaviour(): void
+ public function testBooleanBehaviour()
{
$attributes = new ComponentAttributes(['disabled' => true], new EscaperRuntime());
@@ -196,7 +196,7 @@ public function testBooleanBehaviour(): void
/**
* @group legacy
*/
- public function testNullBehaviour(): void
+ public function testNullBehaviour()
{
$attributes = new ComponentAttributes(['disabled' => null], new EscaperRuntime());
@@ -204,7 +204,7 @@ public function testNullBehaviour(): void
$this->assertSame(' disabled', (string) $attributes);
}
- public function testIsTraversableAndCountable(): void
+ public function testIsTraversableAndCountable()
{
$attributes = new ComponentAttributes(['foo' => 'bar'], new EscaperRuntime());
@@ -212,7 +212,7 @@ public function testIsTraversableAndCountable(): void
$this->assertCount(1, $attributes);
}
- public function testRenderSingleAttribute(): void
+ public function testRenderSingleAttribute()
{
$attributes = new ComponentAttributes(['attr1' => 'value1', 'attr2' => 'value2'], new EscaperRuntime());
@@ -220,7 +220,7 @@ public function testRenderSingleAttribute(): void
$this->assertNull($attributes->render('attr3'));
}
- public function testRenderingSingleAttributeExcludesFromString(): void
+ public function testRenderingSingleAttributeExcludesFromString()
{
$attributes = new ComponentAttributes([
'attr1' => new class {
@@ -236,7 +236,7 @@ public function __toString(): string
$this->assertSame(' attr2="value2"', (string) $attributes);
}
- public function testCannotRenderNonStringAttribute(): void
+ public function testCannotRenderNonStringAttribute()
{
$attributes = new ComponentAttributes(['attr1' => false], new EscaperRuntime());
@@ -245,14 +245,14 @@ public function testCannotRenderNonStringAttribute(): void
$attributes->render('attr1');
}
- public function testCanCheckIfAttributeExists(): void
+ public function testCanCheckIfAttributeExists()
{
$attributes = new ComponentAttributes(['foo' => 'bar'], new EscaperRuntime());
$this->assertTrue($attributes->has('foo'));
}
- public function testNestedAttributes(): void
+ public function testNestedAttributes()
{
$attributes = new ComponentAttributes([
'class' => 'foo',
@@ -266,7 +266,7 @@ public function testNestedAttributes(): void
$this->assertSame('', (string) $attributes->nested('invalid'));
}
- public function testPrefixedAttributes(): void
+ public function testPrefixedAttributes()
{
$attributes = new ComponentAttributes([
'x-click' => 'x+',
@@ -279,7 +279,7 @@ public function testPrefixedAttributes(): void
$this->assertSame('', (string) $attributes->nested('invalid'));
}
- public function testConvertTrueAriaAttributeValue(): void
+ public function testConvertTrueAriaAttributeValue()
{
$attributes = new ComponentAttributes([
'aria-bar' => false,
@@ -310,7 +310,7 @@ public function testConvertTrueAriaAttributeValue(): void
/**
* @dataProvider provideSpecialSyntaxAttributeNames
*/
- public function testAllowsSpecialSyntaxAttributeNames(string $name): void
+ public function testAllowsSpecialSyntaxAttributeNames(string $name)
{
$attributes = new ComponentAttributes([$name => 'value'], new EscaperRuntime());
@@ -327,7 +327,7 @@ public static function provideSpecialSyntaxAttributeNames(): iterable
yield ['@input.debounce.500ms'];
}
- public function testThrowsTypeErrorWithoutEscaperRuntime(): void
+ public function testThrowsTypeErrorWithoutEscaperRuntime()
{
$this->expectException(\TypeError::class);
new ComponentAttributes([]);
@@ -336,7 +336,7 @@ public function testThrowsTypeErrorWithoutEscaperRuntime(): void
/**
* @dataProvider nameProvider
*/
- public function testEscapeName(string $input, string $expected): void
+ public function testEscapeName(string $input, string $expected)
{
$runtime = new EscaperRuntime();
$attributes = new ComponentAttributes([$input => 'foo'], $runtime);
@@ -347,7 +347,7 @@ public function testEscapeName(string $input, string $expected): void
/**
* @dataProvider valueProvider
*/
- public function testEscapeValue(string $input, string $expected): void
+ public function testEscapeValue(string $input, string $expected)
{
$runtime = new EscaperRuntime();
$attributes = new ComponentAttributes(['foo' => $input], $runtime);
diff --git a/src/TwigComponent/tests/Unit/ComponentFactoryTest.php b/src/TwigComponent/tests/Unit/ComponentFactoryTest.php
index b842b7e9ae0..0d2dafc01c0 100644
--- a/src/TwigComponent/tests/Unit/ComponentFactoryTest.php
+++ b/src/TwigComponent/tests/Unit/ComponentFactoryTest.php
@@ -24,7 +24,7 @@
*/
class ComponentFactoryTest extends TestCase
{
- public function testMetadataForConfig(): void
+ public function testMetadataForConfig()
{
$factory = new ComponentFactory(
$this->createMock(ComponentTemplateFinderInterface::class),
@@ -42,7 +42,7 @@ public function testMetadataForConfig(): void
$this->assertSame('bar.html.twig', $metadata->getTemplate());
}
- public function testMetadataForResolveAlias(): void
+ public function testMetadataForResolveAlias()
{
$factory = new ComponentFactory(
$this->createMock(ComponentTemplateFinderInterface::class),
@@ -63,7 +63,7 @@ public function testMetadataForResolveAlias(): void
$this->assertSame('bar.html.twig', $metadata->getTemplate());
}
- public function testMetadataForReuseAnonymousConfig(): void
+ public function testMetadataForReuseAnonymousConfig()
{
$templateFinder = $this->createMock(ComponentTemplateFinderInterface::class);
$templateFinder->expects($this->atLeastOnce())
diff --git a/src/TwigComponent/tests/Unit/ComponentStackTest.php b/src/TwigComponent/tests/Unit/ComponentStackTest.php
index 4ef48e40ea5..473feb472b9 100644
--- a/src/TwigComponent/tests/Unit/ComponentStackTest.php
+++ b/src/TwigComponent/tests/Unit/ComponentStackTest.php
@@ -19,7 +19,7 @@
final class ComponentStackTest extends TestCase
{
- public function testPushAndPopAndFetchingComponents(): void
+ public function testPushAndPopAndFetchingComponents()
{
$stack = new ComponentStack();
$component1 = new MountedComponent('component1', new \stdClass(), new ComponentAttributes([], new EscaperRuntime()));
diff --git a/src/TwigComponent/tests/Unit/ComponentTemplateFinderTest.php b/src/TwigComponent/tests/Unit/ComponentTemplateFinderTest.php
index 92337faa6d4..66a19bd0646 100644
--- a/src/TwigComponent/tests/Unit/ComponentTemplateFinderTest.php
+++ b/src/TwigComponent/tests/Unit/ComponentTemplateFinderTest.php
@@ -25,7 +25,7 @@ final class ComponentTemplateFinderTest extends TestCase
{
use ExpectDeprecationTrait;
- public function testFindTemplate(): void
+ public function testFindTemplate()
{
$templates = [
'components/aa.html.twig',
@@ -52,7 +52,7 @@ public function testFindTemplate(): void
/**
* @group legacy
*/
- public function testFindTemplateWithLegacyAutonaming(): void
+ public function testFindTemplateWithLegacyAutonaming()
{
$templates = [
'components/aa.html.twig',
@@ -88,7 +88,7 @@ public function testFindTemplateWithLegacyAutonaming(): void
/**
* @group legacy
*/
- public function testTriggerDeprecationWhenEnvironmentAsFirstArgument(): void
+ public function testTriggerDeprecationWhenEnvironmentAsFirstArgument()
{
$environment = $this->createEnvironment([]);
@@ -99,7 +99,7 @@ public function testTriggerDeprecationWhenEnvironmentAsFirstArgument(): void
/**
* @group legacy
*/
- public function testTriggerDeprecationWhenDirectoryArgumentIsNullOrNotProvided(): void
+ public function testTriggerDeprecationWhenDirectoryArgumentIsNullOrNotProvided()
{
$environment = $this->createEnvironment([]);
@@ -110,7 +110,7 @@ public function testTriggerDeprecationWhenDirectoryArgumentIsNullOrNotProvided()
$finder = new ComponentTemplateFinder($environment, null);
}
- public function testFindTemplateWithinDirectory(): void
+ public function testFindTemplateWithinDirectory()
{
$templates = [
'bar.html.twig',
diff --git a/src/TwigComponent/tests/Unit/ComputedPropertiesProxyTest.php b/src/TwigComponent/tests/Unit/ComputedPropertiesProxyTest.php
index adb954ba224..582273695d1 100644
--- a/src/TwigComponent/tests/Unit/ComputedPropertiesProxyTest.php
+++ b/src/TwigComponent/tests/Unit/ComputedPropertiesProxyTest.php
@@ -19,7 +19,7 @@
*/
final class ComputedPropertiesProxyTest extends TestCase
{
- public function testProxyCachesGetMethodReturns(): void
+ public function testProxyCachesGetMethodReturns()
{
$proxy = new ComputedPropertiesProxy(new class {
private int $count = 0;
@@ -35,7 +35,7 @@ public function getCount(): int
$this->assertSame(1, $proxy->count());
}
- public function testProxyCachesIsMethodReturns(): void
+ public function testProxyCachesIsMethodReturns()
{
$proxy = new ComputedPropertiesProxy(new class {
private int $count = 0;
@@ -51,7 +51,7 @@ public function isCount(): int
$this->assertSame(1, $proxy->count());
}
- public function testProxyCachesHasMethodReturns(): void
+ public function testProxyCachesHasMethodReturns()
{
$proxy = new ComputedPropertiesProxy(new class {
private int $count = 0;
@@ -67,7 +67,7 @@ public function hasCount(): int
$this->assertSame(1, $proxy->count());
}
- public function testCanProxyPublicProperties(): void
+ public function testCanProxyPublicProperties()
{
$proxy = new ComputedPropertiesProxy(new class {
public $foo = 'bar';
@@ -76,7 +76,7 @@ public function testCanProxyPublicProperties(): void
$this->assertSame('bar', $proxy->foo());
}
- public function testCanProxyArrayAccess(): void
+ public function testCanProxyArrayAccess()
{
$proxy = new ComputedPropertiesProxy(new class implements \ArrayAccess {
private $array = ['foo' => 'bar'];
@@ -103,7 +103,7 @@ public function offsetUnset(mixed $offset): void
$this->assertSame('bar', $proxy->foo());
}
- public function testCannotProxyMethodsThatDoNotExist(): void
+ public function testCannotProxyMethodsThatDoNotExist()
{
$proxy = new ComputedPropertiesProxy(new class {});
@@ -112,7 +112,7 @@ public function testCannotProxyMethodsThatDoNotExist(): void
$proxy->getSomething();
}
- public function testCannotPassArgumentsToProxiedMethods(): void
+ public function testCannotPassArgumentsToProxiedMethods()
{
$proxy = new ComputedPropertiesProxy(new class {});
@@ -121,7 +121,7 @@ public function testCannotPassArgumentsToProxiedMethods(): void
$proxy->getSomething('foo');
}
- public function testCannotProxyMethodsWithRequiredArguments(): void
+ public function testCannotProxyMethodsWithRequiredArguments()
{
$proxy = new ComputedPropertiesProxy(new class {
public function getValue(int $value): int
diff --git a/src/TwigComponent/tests/Unit/DataCollector/TwigComponentDataCollectorTest.php b/src/TwigComponent/tests/Unit/DataCollector/TwigComponentDataCollectorTest.php
index 434ae91185d..a547c64e04d 100644
--- a/src/TwigComponent/tests/Unit/DataCollector/TwigComponentDataCollectorTest.php
+++ b/src/TwigComponent/tests/Unit/DataCollector/TwigComponentDataCollectorTest.php
@@ -23,7 +23,7 @@
*/
class TwigComponentDataCollectorTest extends TestCase
{
- public function testCollectDoesNothing(): void
+ public function testCollectDoesNothing()
{
$logger = new TwigComponentLoggerListener();
$twig = $this->createMock(Environment::class);
@@ -35,7 +35,7 @@ public function testCollectDoesNothing(): void
$this->assertSame([], $dataCollector->getData());
}
- public function testLateCollect(): void
+ public function testLateCollect()
{
$logger = new TwigComponentLoggerListener();
$twig = $this->createMock(Environment::class);
@@ -54,7 +54,7 @@ public function testLateCollect(): void
$this->assertEquals(0.0, $dataCollector->getRenderTime());
}
- public function testReset(): void
+ public function testReset()
{
$logger = new TwigComponentLoggerListener();
$twig = $this->createMock(Environment::class);
@@ -67,7 +67,7 @@ public function testReset(): void
$this->assertSame([], $dataCollector->getData());
}
- public function testGetName(): void
+ public function testGetName()
{
$logger = new TwigComponentLoggerListener();
$twig = $this->createMock(Environment::class);
diff --git a/src/TwigComponent/tests/Unit/EventListener/TwigComponentLoggerListenerTest.php b/src/TwigComponent/tests/Unit/EventListener/TwigComponentLoggerListenerTest.php
index 3a02709b21f..0637a4e3a70 100644
--- a/src/TwigComponent/tests/Unit/EventListener/TwigComponentLoggerListenerTest.php
+++ b/src/TwigComponent/tests/Unit/EventListener/TwigComponentLoggerListenerTest.php
@@ -25,7 +25,7 @@
*/
class TwigComponentLoggerListenerTest extends TestCase
{
- public function testLoggerStoreEvents(): void
+ public function testLoggerStoreEvents()
{
$logger = new TwigComponentLoggerListener();
$this->assertSame([], $logger->getEvents());
@@ -39,7 +39,7 @@ public function testLoggerStoreEvents(): void
$this->assertSame([$eventA, $eventB], array_column($logger->getEvents(), 0));
}
- public function testLoggerReset(): void
+ public function testLoggerReset()
{
$logger = new TwigComponentLoggerListener();
$escaper = new EscaperRuntime();
diff --git a/src/TwigComponent/tests/Unit/TwigPreLexerTest.php b/src/TwigComponent/tests/Unit/TwigPreLexerTest.php
index 6165cab3c75..fc665aceb41 100644
--- a/src/TwigComponent/tests/Unit/TwigPreLexerTest.php
+++ b/src/TwigComponent/tests/Unit/TwigPreLexerTest.php
@@ -20,7 +20,7 @@ final class TwigPreLexerTest extends TestCase
/**
* @dataProvider getLexTests
*/
- public function testPreLex(string $input, string $expectedOutput): void
+ public function testPreLex(string $input, string $expectedOutput)
{
$lexer = new TwigPreLexer();
$this->assertSame($expectedOutput, $lexer->preLexComponents($input));
@@ -29,7 +29,7 @@ public function testPreLex(string $input, string $expectedOutput): void
/**
* @dataProvider getInvalidSyntaxTests
*/
- public function testPreLexThrowsExceptionOnInvalidSyntax(string $input, string $expectedMessage): void
+ public function testPreLexThrowsExceptionOnInvalidSyntax(string $input, string $expectedMessage)
{
$this->expectException(SyntaxError::class);
$this->expectExceptionMessage($expectedMessage);
diff --git a/src/Typed/doc/index.rst b/src/Typed/doc/index.rst
index c5a1ac58dd3..cc4685c74f5 100644
--- a/src/Typed/doc/index.rst
+++ b/src/Typed/doc/index.rst
@@ -122,7 +122,7 @@ Stimulus controller:
}
_onConnect(event) {
- // Typed has just been intialized and you can access details from the event
+ // Typed has just been initialized and you can access details from the event
console.log(event.detail.typed); // Typed instance
console.log(event.detail.options); // Options used to initialize Typed
}
diff --git a/src/Vue/doc/index.rst b/src/Vue/doc/index.rst
index 7347a58dfdd..5319ee1f785 100644
--- a/src/Vue/doc/index.rst
+++ b/src/Vue/doc/index.rst
@@ -82,7 +82,7 @@ You can render any Vue controller component in Twig using the ``vue_component()`
Events
~~~~~~
-The event ``vue:before-mount`` is called before a component is mounted on the page. This is the event to listen if you need to modifiy the Vue application (e.g.: add plugins, add global directives, states ...):
+The event ``vue:before-mount`` is called before a component is mounted on the page. This is the event to listen if you need to modify the Vue application (e.g.: add plugins, add global directives, states ...):
.. code-block:: javascript
diff --git a/ux.symfony.com/public/site.webmanifest b/ux.symfony.com/public/site.webmanifest
old mode 100755
new mode 100644
diff --git a/ux.symfony.com/tests/Functional/IconsTest.php b/ux.symfony.com/tests/Functional/IconsTest.php
index a797f916b4c..e8a28b399cb 100644
--- a/ux.symfony.com/tests/Functional/IconsTest.php
+++ b/ux.symfony.com/tests/Functional/IconsTest.php
@@ -21,7 +21,7 @@ final class IconsTest extends KernelTestCase
{
use HasBrowser;
- public function testCanViewIconFromHomepage(): void
+ public function testCanViewIconFromHomepage()
{
$this->browser()
->visit('/')
@@ -34,7 +34,7 @@ public function testCanViewIconFromHomepage(): void
;
}
- public function testCanViewIconIndex(): void
+ public function testCanViewIconIndex()
{
$this->browser()
->visit('/icons')
diff --git a/ux.symfony.com/tests/Functional/LiveComponentDemosTest.php b/ux.symfony.com/tests/Functional/LiveComponentDemosTest.php
index 558284e4960..35e30e1ef81 100644
--- a/ux.symfony.com/tests/Functional/LiveComponentDemosTest.php
+++ b/ux.symfony.com/tests/Functional/LiveComponentDemosTest.php
@@ -38,7 +38,7 @@ public function setupEntities(): void
/**
* @dataProvider getSmokeTests
*/
- public function testDemoPagesAllLoad(LiveDemo $liveDemo): void
+ public function testDemoPagesAllLoad(LiveDemo $liveDemo)
{
$router = self::bootKernel()->getContainer()->get('router');
$url = $router->generate($liveDemo->getRoute());
diff --git a/ux.symfony.com/tests/Functional/RobotsTest.php b/ux.symfony.com/tests/Functional/RobotsTest.php
index 0a775386580..54bc11e364f 100644
--- a/ux.symfony.com/tests/Functional/RobotsTest.php
+++ b/ux.symfony.com/tests/Functional/RobotsTest.php
@@ -18,7 +18,7 @@ class RobotsTest extends KernelTestCase
{
use HasBrowser;
- public function testSitemapContainsPages(): void
+ public function testSitemapContainsPages()
{
$browser = $this->browser([], [
'HTTP_HOST' => 'ux.symfony.com',
diff --git a/ux.symfony.com/tests/Functional/SitemapTest.php b/ux.symfony.com/tests/Functional/SitemapTest.php
index 4b9356ca1b0..a57cddb75d3 100644
--- a/ux.symfony.com/tests/Functional/SitemapTest.php
+++ b/ux.symfony.com/tests/Functional/SitemapTest.php
@@ -21,7 +21,7 @@ class SitemapTest extends KernelTestCase
{
use HasBrowser;
- public function testSitemapContainsPages(): void
+ public function testSitemapContainsPages()
{
$browser = $this->browser()
->visit('/sitemap.xml')
diff --git a/ux.symfony.com/tests/Functional/UxPackagesTest.php b/ux.symfony.com/tests/Functional/UxPackagesTest.php
index d9337ab9a13..e76019df8de 100644
--- a/ux.symfony.com/tests/Functional/UxPackagesTest.php
+++ b/ux.symfony.com/tests/Functional/UxPackagesTest.php
@@ -20,7 +20,7 @@ class UxPackagesTest extends KernelTestCase
{
use HasBrowser;
- public function testAllPackagesPage(): void
+ public function testAllPackagesPage()
{
$this->browser()
->visit('/packages')
@@ -33,7 +33,7 @@ public function testAllPackagesPage(): void
/**
* @dataProvider getSmokeTests
*/
- public function testPackagePagesAllLoad(UxPackage $package, string $expectedText): void
+ public function testPackagePagesAllLoad(UxPackage $package, string $expectedText)
{
$this->browser()
->throwExceptions()
diff --git a/ux.symfony.com/tests/Unit/Model/RecipeFileTreeTest.php b/ux.symfony.com/tests/Unit/Model/RecipeFileTreeTest.php
index 38f85658ef9..e216018e485 100644
--- a/ux.symfony.com/tests/Unit/Model/RecipeFileTreeTest.php
+++ b/ux.symfony.com/tests/Unit/Model/RecipeFileTreeTest.php
@@ -16,7 +16,7 @@
class RecipeFileTreeTest extends TestCase
{
- public function testItReturnsFileTree(): void
+ public function testItReturnsFileTree()
{
$fileTree = new RecipeFileTree();
$files = $fileTree->getFiles();
diff --git a/ux.symfony.com/tests/Unit/Util/SourceCleanerTest.php b/ux.symfony.com/tests/Unit/Util/SourceCleanerTest.php
index d26e38775eb..396808f8531 100644
--- a/ux.symfony.com/tests/Unit/Util/SourceCleanerTest.php
+++ b/ux.symfony.com/tests/Unit/Util/SourceCleanerTest.php
@@ -16,7 +16,7 @@
class SourceCleanerTest extends TestCase
{
- public function testItRemovesNamespaceAndPhpTag(): void
+ public function testItRemovesNamespaceAndPhpTag()
{
$source = <<
assertSame($expected, SourceCleaner::cleanupPhpFile($source));
}
- public function testItRemovesClass(): void
+ public function testItRemovesClass()
{
$source = <<assertSame($expected, SourceCleaner::cleanupPhpFile($source, removeClass: true));
}
- public function testItExtractsTwigBlock(): void
+ public function testItExtractsTwigBlock()
{
$source = <<assertSame($expected, SourceCleaner::extractTwigBlock($source, 'demo_content'));
}
- public function testItRemovesExcessHtml(): void
+ public function testItRemovesExcessHtml()
{
$input = <<