phpfmt_stable icon indicating copy to clipboard operation
phpfmt_stable copied to clipboard

Support for Context Sensitive Lexer

Open promatik opened this issue 5 years ago • 0 comments

With a function like;

public function else($value)
{
    return $this->fallbackLogic($value);
}

phpfmt is braking the code to;

function else{
    ($value) {
        return $this->fallbackLogic($value);
    }

Since PHP 7.0 the Context Sensitive Lexer allows to use reserved words for function names for instance.

RFC here: https://wiki.php.net/rfc/context_sensitive_lexer

promatik avatar Dec 10 '20 12:12 promatik