Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use return; when the function returns void values. #105

Closed
wickedOne opened this issue Aug 9, 2017 · 3 comments
Closed

use return; when the function returns void values. #105

wickedOne opened this issue Aug 9, 2017 · 3 comments

Comments

@wickedOne
Copy link
Contributor

this raises an error while it shouldn't:

public function foo($qux): void
{
    $bar = function ($baz) { return $baz + $qux; }
}
@ZhukV
Copy link

ZhukV commented Jan 5, 2018

Clone is #119

@podhy
Copy link

podhy commented Apr 2, 2018

same error even if using latest master branch

@xalopp
Copy link
Contributor

xalopp commented May 27, 2018

Also get an error

 104 | ERROR | Use return null; when a function explicitly returns null values and use return; when the function returns void values (Symfony.Functions.ReturnType.Invalid)

with Version 3.4.0

for this piece of code:

function test(): void
{
    $t = function(): int {
        return 1;
    };
}

xalopp pushed a commit to xalopp/Symfony-coding-standard-1 that referenced this issue May 28, 2018
@djoos djoos closed this as completed in 4bbb232 May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants