You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Of course the assertion will always be true, but this theoretical type mismatch was pointed out by my IDE, which confused me at first. In my opinion this would make the code more clean and prevent any future confusion about what type is expected.
The text was updated successfully, but these errors were encountered:
GameplayJDK
changed the title
ProxyGenerator missing assert() for declaring
ProxyGenerator missing assert() for getDeclaringMethod() return value in getParameterType()
Jan 26, 2021
GameplayJDK
added a commit
to GameplayJDK/doctrine-common
that referenced
this issue
Jan 26, 2021
Hello everyone,
while working on #917 i noticed a missing
assert()
in the methodgetParameterType()
of theProxyGenerator
.The
ReflectionParameter::getDeclaringFunction()
method returns aReflectionFunctionAbstract
, the type hint ofProxyGenerator::formatType(...)
isReflectionMethod
, one of two possible implementations, the other isReflectionFunction
.I'd propose a change from the above code to the code below:
3v4l.org snippet
Of course the assertion will always be true, but this theoretical type mismatch was pointed out by my IDE, which confused me at first. In my opinion this would make the code more clean and prevent any future confusion about what type is expected.
The text was updated successfully, but these errors were encountered: