Closed JackWH closed 2 years ago
Hey @JackWH, i didn't realize that because i am a VSCode user. So Thanks for your improvement.
I would accept your PR, but is there may a way to leave the @return
statements in the DocBlock? I mean the correct way that PHP Storm would parse it correct too. Let me know if there are any way or not.
Thanks for your commitment!
Closed due to inactivity
In PhpStorm, autocompletion of methods is currently broken for this package. For example,
Unsplash::search()->term('test')->toJson()
stops all autocompletion after thesearch()
method.PhpStorm does not recognise the chained
term()
ortoJson()
methods because the traits all set self-referential@return
docblock tags:Because of this
@return
tag, PhpStorm assumesreturn $this;
is returning another instance of theSearch
trait — when it's actually returning the original instance of\MarkSitko\LaravelUnsplash\Unsplash
(via inheritance of theUnsplashAPI
trait).Removing these
@return
tags lets PhpStorm parse the class inheritance correctly, and provide full autocompletion.Thanks for a great package!