djoos / Symfony-coding-standard

Development repository for the Symfony coding standard
MIT License
401 stars 102 forks source link

ReturnOrThrowSniff: Closures are not handled correctly #127

Closed istrof closed 6 years ago

istrof commented 6 years ago

This example fails, because closures are not handled correctly:

function baz()
{
    if ($a == $b) {
        $a = function () {
            return false;
        };
    } else {
        return true;
   }
}

Please have a look on PR created, it's fixing the issue (https://github.com/djoos/Symfony-coding-standard/pull/126) Thanks.

istrof commented 6 years ago

the same as #118