Skip to content

Commit 7b46f38

Browse files
weaverryansmnandre
authored andcommitted
Adding missing types
1 parent 487d0a4 commit 7b46f38

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/LiveComponent/tests/Fixtures/Serializer/Entity2Normalizer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,24 @@ public function __construct(private ManagerRegistry $doctrine)
2525
{
2626
}
2727

28-
public function denormalize(mixed $data, string $type, string $format = null, array $context = [])
28+
public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed
2929
{
3030
[, $id] = \explode(':', $data);
3131

3232
return $this->doctrine->getRepository(Entity2::class)->find($id);
3333
}
3434

35-
public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = [])
35+
public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool
3636
{
3737
return Entity2::class === $type;
3838
}
3939

40-
public function normalize(mixed $object, string $format = null, array $context = [])
40+
public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
4141
{
4242
return 'entity2:'.$object->id;
4343
}
4444

45-
public function supportsNormalization(mixed $data, string $format = null, array $context = [])
45+
public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool
4646
{
4747
return $data instanceof Entity2;
4848
}

src/LiveComponent/tests/Fixtures/Serializer/MoneyNormalizer.php

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

1818
final class MoneyNormalizer implements NormalizerInterface, DenormalizerInterface
1919
{
20-
public function denormalize(mixed $data, string $type, string $format = null, array $context = [])
20+
public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed
2121
{
2222
return new Money(...\explode('|', $data));
2323
}
2424

25-
public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = [])
25+
public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool
2626
{
2727
return Money::class === $type;
2828
}
2929

30-
public function normalize(mixed $object, string $format = null, array $context = [])
30+
public function normalize(mixed $object, string $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null
3131
{
3232
return \implode('|', [$object->amount, $object->currency]);
3333
}
3434

35-
public function supportsNormalization(mixed $data, string $format = null, array $context = [])
35+
public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool
3636
{
3737
return $data instanceof Money;
3838
}

src/TwigComponent/src/DependencyInjection/TwigComponentExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class_exists(AbstractArgument::class) ? new AbstractArgument(sprintf('Added in %
123123
;
124124
}
125125

126-
public function getConfigTreeBuilder()
126+
public function getConfigTreeBuilder(): TreeBuilder
127127
{
128128
$treeBuilder = new TreeBuilder('twig_component');
129129
$rootNode = $treeBuilder->getRootNode();

0 commit comments

Comments
 (0)