nanch / phpfmt_stable

This is a stable snapshot (version 6125cf9) of the phpfmt plugin for Sublime Text
143 stars 34 forks source link

Support for Context Sensitive Lexer #75

Open promatik opened 3 years ago

promatik commented 3 years ago

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