Skip to content

Commit 7f8279c

Browse files
committed
[LiveComponent] Add missing typehints to HydrationExtensionInterface
I have a custom hydration extension that in `supports` method checks if the provided class has my custom marker attribute through Reflection, but SA complains: > Parameter #1 $objectOrClass of class ReflectionClass constructor expects class-string<T of object>|T of object, string given.
1 parent 25f0ab8 commit 7f8279c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/LiveComponent/src/Hydration/HydrationExtensionInterface.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@
1313

1414
interface HydrationExtensionInterface
1515
{
16+
/**
17+
* @param class-string $className
18+
*/
1619
public function supports(string $className): bool;
1720

21+
/**
22+
* @param class-string $className
23+
*/
1824
public function hydrate(mixed $value, string $className): ?object;
1925

2026
/**

0 commit comments

Comments
 (0)