are you open for PHPStan specific Annotations?
The following PR will fix following use case:
$spec = cebe\openapi\Reader::readFromYamlFile($inputFile, cebe\openapi\spec\OpenApi::class);
// this is required because the method returns only a SpecObjectInterface as annotation
assert($spec instanceof cebe\openapi\spec\OpenApi);
With the @phpstan-template annotation, PHPStan knowns, that the second parameter defines the return type and the paramater must be a class string and an instanceof SpecObjectInterface.
This should help other people who uses PHPStan and your library.
If you are fine with this, i will try to add more PHPStan specific type hints. But first i wanted to know if you would support that annotations.
Hi,
are you open for PHPStan specific Annotations? The following PR will fix following use case:
With the
@phpstan-template
annotation, PHPStan knowns, that the second parameter defines the return type and the paramater must be a class string and an instanceof SpecObjectInterface.This should help other people who uses PHPStan and your library.
If you are fine with this, i will try to add more PHPStan specific type hints. But first i wanted to know if you would support that annotations.