Skip to content

Commit 6a6562a

Browse files
Apply fabbot rules
1 parent 506f299 commit 6a6562a

21 files changed

+151
-151
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Twig Components
22

33
Twig components give you the power to bind an object to a template, making
4-
it easier to render and re-use small template "units" - like an "alert",
4+
it easier to render and reuse small template "units" - like an "alert",
55
markup for a modal, or a category sidebar. A very simple example
6-
would be a re-usable alert component:
6+
would be a reusable alert component:
77

88
![Example of the AlertComponent](https://github.com/symfony/ux/blob/2.x/src/TwigComponent/alert-example.png?raw=true)
99

doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Twig Components
22
===============
33

44
Twig components give you the power to bind an object to a template,
5-
making it easier to render and re-use small template "units" - like an
5+
making it easier to render and reuse small template "units" - like an
66
"alert", markup for a modal, or a category sidebar:
77

88
Every component consists of (1) a class::
@@ -921,7 +921,7 @@ For example, imagine we want to create a ``SuccessAlert`` component:
921921
We will successfully <em>forward</em> this block content!
922922
<twig:SuccessAlert>
923923

924-
We already have a generic ``Alert`` component, so let's re-use it:
924+
We already have a generic ``Alert`` component, so let's reuse it:
925925

926926
.. code-block:: html+twig
927927

src/ComponentFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ private function mount(object $component, array &$data, ComponentMetadata $compo
167167
} elseif ($refParameter->isDefaultValueAvailable()) {
168168
$parameters[] = $refParameter->getDefaultValue();
169169
} else {
170-
throw new \LogicException(\sprintf('%s has a required $%s parameter. Make sure to pass it or give it a default value.', $component::class.'::mount()', $name));
170+
throw new \LogicException(\sprintf('"%s" has a required $%s parameter. Make sure to pass it or give it a default value.', $component::class.'::mount()', $name));
171171
}
172172
}
173173

tests/Integration/Command/TwigComponentDebugCommandTest.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
class TwigComponentDebugCommandTest extends KernelTestCase
1919
{
20-
public function testWithNoComponent(): void
20+
public function testWithNoComponent()
2121
{
2222
$commandTester = $this->createCommandTester();
2323
$commandTester->execute([]);
@@ -32,7 +32,7 @@ public function testWithNoComponent(): void
3232
$this->assertStringContainsString('Type', $display);
3333
}
3434

35-
public function testWithNoMatchComponent(): void
35+
public function testWithNoMatchComponent()
3636
{
3737
$commandTester = $this->createCommandTester();
3838
$result = $commandTester->execute(['name' => 'NoMatchComponent']);
@@ -41,7 +41,7 @@ public function testWithNoMatchComponent(): void
4141
$this->assertStringContainsString('Unknown component "NoMatchComponent".', $commandTester->getDisplay());
4242
}
4343

44-
public function testNotComponentsIsNotListed(): void
44+
public function testNotComponentsIsNotListed()
4545
{
4646
$commandTester = $this->createCommandTester();
4747
$result = $commandTester->execute(['name' => 'NotAComponent']);
@@ -50,7 +50,7 @@ public function testNotComponentsIsNotListed(): void
5050
$this->assertStringContainsString('Unknown component "NotAComponent".', $commandTester->getDisplay());
5151
}
5252

53-
public function testWithOnePartialMatchComponent(): void
53+
public function testWithOnePartialMatchComponent()
5454
{
5555
$commandTester = $this->createCommandTester();
5656
$commandTester->setInputs([]);
@@ -64,7 +64,7 @@ public function testWithOnePartialMatchComponent(): void
6464
$this->assertStringContainsString('Component\\DivComponentNoPass', $commandTester->getDisplay());
6565
}
6666

67-
public function testWithMultiplePartialMatchComponent(): void
67+
public function testWithMultiplePartialMatchComponent()
6868
{
6969
$commandTester = $this->createCommandTester();
7070
$commandTester->setInputs(['DivComponent5']);
@@ -82,7 +82,7 @@ public function testWithMultiplePartialMatchComponent(): void
8282
$this->assertStringNotContainsString('Component\\DivComponent6', $commandTester->getDisplay());
8383
}
8484

85-
public function testComponentWithClass(): void
85+
public function testComponentWithClass()
8686
{
8787
$commandTester = $this->createCommandTester();
8888
$commandTester->execute(['name' => 'BasicComponent']);
@@ -97,7 +97,7 @@ public function testComponentWithClass(): void
9797
$this->assertStringContainsString('components/BasicComponent.html.twig', $display);
9898
}
9999

100-
public function testComponentWithClassPropertiesAndCustomName(): void
100+
public function testComponentWithClassPropertiesAndCustomName()
101101
{
102102
$commandTester = $this->createCommandTester();
103103
$commandTester->execute(['name' => 'component_c']);
@@ -116,7 +116,7 @@ public function testComponentWithClassPropertiesAndCustomName(): void
116116
$this->assertStringContainsString('Mount', $display);
117117
}
118118

119-
public function testComponentWithClassPropertiesCustomNameAndCustomTemplate(): void
119+
public function testComponentWithClassPropertiesCustomNameAndCustomTemplate()
120120
{
121121
$commandTester = $this->createCommandTester();
122122
$commandTester->execute(['name' => 'component_b']);
@@ -133,7 +133,7 @@ public function testComponentWithClassPropertiesCustomNameAndCustomTemplate(): v
133133
$this->assertStringContainsString('string $postValue', $display);
134134
}
135135

136-
public function testWithAnonymousComponent(): void
136+
public function testWithAnonymousComponent()
137137
{
138138
$commandTester = $this->createCommandTester();
139139
$commandTester->execute(['name' => 'Button']);
@@ -150,7 +150,7 @@ public function testWithAnonymousComponent(): void
150150
$this->assertStringContainsString('primary = true', $display);
151151
}
152152

153-
public function testWithBundleAnonymousComponent(): void
153+
public function testWithBundleAnonymousComponent()
154154
{
155155
$commandTester = $this->createCommandTester();
156156
$commandTester->execute(['name' => 'Acme:Button']);
@@ -165,7 +165,7 @@ public function testWithBundleAnonymousComponent(): void
165165
$this->assertStringContainsString('Anonymous', $display);
166166
}
167167

168-
public function testWithBundleAnonymousComponentSubDir(): void
168+
public function testWithBundleAnonymousComponentSubDir()
169169
{
170170
$commandTester = $this->createCommandTester();
171171
$commandTester->execute(['name' => 'Acme:Table:Header']);
@@ -180,7 +180,7 @@ public function testWithBundleAnonymousComponentSubDir(): void
180180
$this->assertStringContainsString('Anonymous', $display);
181181
}
182182

183-
public function testWithoutPublicProps(): void
183+
public function testWithoutPublicProps()
184184
{
185185
$commandTester = $this->createCommandTester();
186186
$commandTester->execute(['name' => 'no_public_props']);
@@ -194,7 +194,7 @@ public function testWithoutPublicProps(): void
194194
$this->assertStringNotContainsString('prop1', $display);
195195
}
196196

197-
public function testWithExposedVariables(): void
197+
public function testWithExposedVariables()
198198
{
199199
$commandTester = $this->createCommandTester();
200200
$commandTester->execute(['name' => 'with_exposed_variables']);
@@ -212,7 +212,7 @@ public function testWithExposedVariables(): void
212212
$this->assertStringNotContainsString('prop3', $display);
213213
}
214214

215-
public function testWithUnionTypeProps(): void
215+
public function testWithUnionTypeProps()
216216
{
217217
$commandTester = $this->createCommandTester();
218218
$commandTester->execute(['name' => 'union_type_props']);

tests/Integration/ComponentEventTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ final class ComponentEventTest extends KernelTestCase
2525
/**
2626
* @dataProvider provideFooBarSyntaxes
2727
*/
28-
public function testTemplateIsUpdatedByEventListener(string $syntax): void
28+
public function testTemplateIsUpdatedByEventListener(string $syntax)
2929
{
3030
/** @var Environment $environment */
3131
$environment = self::getContainer()->get(Environment::class);

0 commit comments

Comments
 (0)