Skip to content

Commit 58c927a

Browse files
author
matheo
committed
fix
1 parent 3453468 commit 58c927a

File tree

6 files changed

+11
-12
lines changed

6 files changed

+11
-12
lines changed

src/TwigComponent/src/Attribute/ExposeInTemplate.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
final class ExposeInTemplate
2323
{
2424
/**
25-
* @param string|null $name The variable name to expose. Leave as null
26-
* to default to property name.
27-
* @param string|null $getter The getter method to use. Leave as null
28-
* to default to PropertyAccessor logic.
29-
* @param bool $destruct The content should be used as array of variables
30-
* names
25+
* @param string|null $name The variable name to expose. Leave as null
26+
* to default to property name.
27+
* @param string|null $getter The getter method to use. Leave as null
28+
* to default to PropertyAccessor logic.
29+
* @param bool $destruct The content should be used as array of variables
30+
* names
3131
*/
3232
public function __construct(public ?string $name = null, public ?string $getter = null, public bool $destruct = false)
3333
{

src/TwigComponent/src/ComponentFactory.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
1818
use Symfony\UX\TwigComponent\Event\PostMountEvent;
1919
use Symfony\UX\TwigComponent\Event\PreMountEvent;
20-
use Twig\Environment;
2120

2221
/**
2322
* @author Kevin Bond <[email protected]>

src/TwigComponent/src/ComponentRenderer.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ private function exposedVariables(object $component, bool $exposePublicProps): \
148148
throw new \LogicException(sprintf('Cannot use %s on methods with required parameters (%s::%s).', ExposeInTemplate::class, $component::class, $method->name));
149149
}
150150

151-
152151
if ($attribute->destruct) {
153152
foreach ($component->{$method->name}() as $prop => $value) {
154153
yield $prop => $value;

src/TwigComponent/src/ComponentTemplateFinder.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ class ComponentTemplateFinder implements ComponentTemplateFinderInterface
2020
{
2121
public function __construct(
2222
private Environment $environment
23-
) {}
23+
) {
24+
}
2425

2526
public function findAnonymousComponentTemplate(string $name): ?string
2627
{
@@ -45,4 +46,4 @@ public function findAnonymousComponentTemplate(string $name): ?string
4546

4647
return null;
4748
}
48-
}
49+
}

src/TwigComponent/src/ComponentTemplateFinderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
interface ComponentTemplateFinderInterface
1818
{
1919
public function findAnonymousComponentTemplate(string $name): ?string;
20-
}
20+
}

src/TwigComponent/src/DependencyInjection/TwigComponentExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function load(array $configs, ContainerBuilder $container): void
4444

4545
$container->register('ux.twig_component.component_template_finder', ComponentTemplateFinder::class)
4646
->setArguments([
47-
new Reference('twig')
47+
new Reference('twig'),
4848
])
4949
;
5050

0 commit comments

Comments
 (0)