Skip to content

Allow variable list on one line for multiline closures

Compare
Choose a tag to compare
@marcelmediact marcelmediact released this 10 Oct 08:52
· 16 commits to master since this release
d28e6e4

https://www.php-fig.org/psr/psr-2/#6-closures explicitly shows that the
following is allowed:

$longArgs_shortVars = function (
    $longArgument,
    $longerArgument,
    $muchLongerArgument
) use ($var1) {
    // body
};