discord-php / DiscordPHP

An API to interact with the popular messaging app Discord
MIT License
985 stars 236 forks source link

Fix callable typehints #1033

Closed hemberger closed 1 year ago

hemberger commented 1 year ago

The callable keyword does not refer to a class or global function, so it should not be prefixed with a backslash. We replace \Callable with callable (the capitalization change is cosmetic, since it is standard for non-class types to be lowercase).

This was causing errors in static analysis for dependent libraries when calling into the methods that used the \Callable typehint.