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
The ReflectionClassConstructorThrowTypeExtension only check for constantString
constantString
So
new \ReflectionClass(Foo::class);
is not throwing an exception.
But
new \ReflectionClass(new Foo());
does.
The Extension is doing
foreach (TypeUtils::getConstantStrings($valueType) as $constantString) { if (!$this->reflectionProvider->hasClass($constantString->getValue())) { return $methodReflection->getThrowType(); } $valueType = TypeCombinator::remove($valueType, $constantString); }
checking for Bar::class|Foo::class|...
What would be the equivalent way to check for Bar|Foo|... @ondrejmirtes ? I can do the PR.
The text was updated successfully, but these errors were encountered:
The extension should return null if (new ObjectWithoutClassType())->isSuperTypeOf($valueType)->yes().
null
(new ObjectWithoutClassType())->isSuperTypeOf($valueType)->yes()
Sorry, something went wrong.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Successfully merging a pull request may close this issue.
Feature request
The ReflectionClassConstructorThrowTypeExtension only check for
constantString
So
is not throwing an exception.
But
does.
The Extension is doing
checking for Bar::class|Foo::class|...
What would be the equivalent way to check for Bar|Foo|... @ondrejmirtes ? I can do the PR.
The text was updated successfully, but these errors were encountered: