Replies: 2 comments 7 replies
-
|
Sorry for not trying it out first, but |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In a custom extension I need to create an object phpstan
Typefrom the phpstan scope.I figured out I can obtain the scope class string like:
but how can I create an object phpstan
Typefrom it?for constant string I figured out I can do:
but if the
$classNameTypeis instanceofPHPStan\Type\Generic\GenericClassStringTypethegetValuemethod obviously does not exist and the code failsis there any helper method like
Util::createObjectTypeFromClassStringType(PHPStan\Type\ClassStringType $classStringType)?Beta Was this translation helpful? Give feedback.
All reactions