php-imap
php-imap copied to clipboard
Better function return typing
Is your feature request related to a problem? Please describe. Better typing for return values to allow for more successful prompts when function chaining.
Describe the solution you'd like
For each function that returns $this to be typed to return static instead of self, and also for the docblock to be @return $this where sometimes it exists @return ClassName
Describe alternatives you've considered There are two possibilities;
- Fix only in docblocks. This has absolutely no impact to the implementation.
- Fix both the return type hints and docblocks - this has a functional difference, but shouldn't impact anything.
Additional context I have created #470 already, but thought I'd create an issue so it can be tracked more easily :)