httpful icon indicating copy to clipboard operation
httpful copied to clipboard

ExpectsXXX breaks the chain in ide.

Open alekc opened this issue 9 years ago • 0 comments

Following code (taken from example)

$response = \Httpful\Request::get($uri)
    ->expectsJson()
    ->sendIt();

will invoke an error with "method undefined" in ide such phpstorm with result of not being able to use intellisense for next chained methods.

The reason for this is the usage of magic method for expectsXXX. I would suggest to add explicit methods for standard mime types, it should be slightly faster as well.

alekc avatar Dec 26 '15 14:12 alekc