open-serializer / type
PHP Type Tools
0.2.0
2026-04-02 16:45 UTC
Requires
- php: ^7.4 || ^8.0
- ext-json: *
- phpdocumentor/reflection-docblock: ^6.0
- webmozart/assert: ^2.1
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^13.0
- vimeo/psalm: ^6.16
This package is not auto-updated.
Last update: 2026-04-03 13:04:53 UTC
README
class Foo { /** @return array<int> */ public function test(): array { return []; } } $typeResolver = new PropertyTypeResolvers( new TypedPropertyResolver(), new DocBlockPropertyResolver(), ); $classInfo = new ReflectionClass(Foo::class); $methodInfo = $classInfo->getMethod('test'); $typeInfo = $typeResolver->resolveMethodType($classInfo, $methodInfo);