joomla/coding-standards

Closure Not Yet Supported

Closed this issue · 1 comments

Anonymous functions would fail when running phpcs using this Jooma coding standard.

CodeSniffer already supports closure, per http://www.squizlabs.com/php-codesniffer/closure-support . I'd suggest to add closure support as well.

I was wrong. Ian told me this morning that closure had already been supported. Here is an example:

<?php
        // ......
        usort(
            $series,
            function($a, $b)
            {
                return $a->event_dt <= $b->event_dt;
            }
        );
?>

Please close the issue. Thanks