php-imap icon indicating copy to clipboard operation
php-imap copied to clipboard

Better function return typing

Open olliescase opened this issue 1 year ago • 0 comments

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;

  1. Fix only in docblocks. This has absolutely no impact to the implementation.
  2. 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 :)

olliescase avatar Feb 05 '24 12:02 olliescase