ronvanderheijden / vscode-phpdoc-generator

PHPDoc Generator is a VSCode extension that generates a documentation block using a keyboard shortcut.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect indent for functions

dmitrach opened this issue · comments

Incorrect:

static public function name()
{
}

https://yadi.sk/i/lf-ZLcu6_MxDVw

Incorrect:

function name()
{
}

https://yadi.sk/i/bAbl8KYzcGpLwg

Correct:

public static function name()
{
}

https://yadi.sk/i/-BnRF7Q8zYAEBQ

The main characteristics of a named function are 'function' and its name: function name().

return /(\s+)?(?:abstract\s+)?(?:public|private|protected)?\s+(?:static\s+)?function\s+(\w+)\s*\((.+)?\)(?:\s*:\s*(\\?\w+))?/;

'abstract' and 'static' are optional properties.

Duplicate of #6