slevomat / coding-standard

Slevomat Coding Standard for PHP_CodeSniffer provides many useful sniffs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SlevomatCodingStandard.Functions.RequireTrailingCommaInCall doesn't report missing commas if the last param is array function

sampsasaarela opened this issue · comments

Seems that SlevomatCodingStandard.Functions.RequireTrailingCommaInCall doesn't report missing commas if the last param is an array function.

For example, this doesn't report error:

$this->myFunction(
    $channel,
    'request',
    fn ($m) => $m['param]
);

but this report

$this->myFunction(
    $channel,
    'request',
);

$this->myFunction(
    $channel,
    'request',
    function () {
     // test
    }
);

Thank you for your report.

Fixed in 8d0f603