Closed prolic closed 8 years ago
void
return type introduced in PHP 7.1void
return type; this pull requests seems to be much larger than should be required to add support for the void
return typeAbout the template:
php > function foo() : void { echo 'foo'; }
php > function bar() : void { return foo(); }
PHP Fatal error: A void function must not return a value in php shell code on line 1
Fatal error: A void function must not return a value in php shell code on line 1
And I updated the title of this PR.
Of course, that makes sense; my bad.
It would be nice to get an error when trying to configure a return value for a method that has a void
return type declaration. Do you want to look into this?
@sebastianbergmann I tried to, but it seems like this is not so easy possible. I don't know much about the internals. Feel free to submit a PR to my PR to improve this, I'm sure you spot it quickly.
I'll try to work on this over the weekend, at least to get your PR merged.
resolves: https://github.com/sebastianbergmann/phpunit-mock-objects/issues/329