Type Hints and PHPDoc changes for better IDE autocompletion