We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doctrine's \Doctrine\Persistence\ObjectRepository supports generics. Since CS interfaces extend it, it would make sense to denote they're generic too.
\Doctrine\Persistence\ObjectRepository
For example, it would mean adding
/** * @template T * * @extends ObjectRepository<T> */ interface CoreShop\Component\Resource\Repository\RepositoryInterface extends ObjectRepository
and then
/** * @template T of PaymentProviderInterface * * @extends RepositoryInterface<T> */ interface PaymentProviderRepositoryInterface extends RepositoryInterface
This would also make many of the types inferred by default by Psalm / PHPStan and many PHPDoc blocks could be removed.
The text was updated successfully, but these errors were encountered:
Additional example: https://psalm.dev/r/11594ec601
Sorry, something went wrong.
No branches or pull requests
Doctrine's
\Doctrine\Persistence\ObjectRepository
supports generics. Since CS interfaces extend it, it would make sense to denote they're generic too.For example, it would mean adding
and then
This would also make many of the types inferred by default by Psalm / PHPStan and many PHPDoc blocks could be removed.
The text was updated successfully, but these errors were encountered: