Replies: 1 comment 4 replies
-
Is this what you are after? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://phpstan.org/r/3fa3c78c-fff1-4590-8778-51e7475c470a
Hi,
take a look at both
createBuilder()
functions. The second one acts like i want and returns an interface ofCarBuilder::class
, but it doesn't properly sets the generic type for theCarBuilder
class.What i want:
$builder->build()
returns an object of type CarcreateBuilder()
returns only theBuilderInterface
.notAnInterfaceFunc()
should not be callable.Best regards and thanks,
dr0bz
Beta Was this translation helpful? Give feedback.
All reactions