analyse/classes/invalid-method-callable
In the analyse-basic preset and every stricter one. Report only.
What it does
Checks the receiver, method existence and visibility when creating a first-class instance method callable. Callable creation does not pass arguments to the method. The check-function-name-case option also checks method spelling.
Configuration
[analyse.rules]
"classes/invalid-method-callable" = "on"
To skip it in some files or lines, add an ignore comment.
Replaces
MethodCallableRule(phpstan-classes)MethodAccessOnNull(mago-analyzer)MixedMethodAccess(mago-analyzer)PossibleMethodAccessOnNull(mago-analyzer)method.nameCase(phpstan)method.nonObject(phpstan)method.private(phpstan)