-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Description
Bug report
when using method_exists combination, it seems cause invalid native type detection that include class-string
Dumped type: class-string|(object~SqlServerConnection&hasMethod(getSchemaState))
Code snippet that reproduces the problem
https://phpstan.org/r/c6ab65e4-0a0a-41de-86b8-5b64241f3470
Expected output
It should be only defined native type without class-string, as never defined like that, something like:
-Dumped type: class-string|(object~SqlServerConnection&hasMethod(getSchemaState))
+Dumped type: (object~SqlServerConnection&hasMethod(getSchemaState))or just MixedType, since it not native returned defined in ConnectionResolverInterface
see linked rector issue:
- Incorrect behavior of AddMethodCallBasedStrictParamTypeRector rectorphp/rector#9324
- https://getrector.com/demo/557185d8-0255-4ce0-8388-8015527140fe
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels