VS Code检测PHP代码规范及格式化

安装vscode插件:phpcs;

安装composer插件:

composer global require --dev squizlabs/php_codesniffer

VS Code设置默认格式:

"phpcs.standard": "PSR2"

安装vscode插件:php cs fixer

安装composer插件:

composer global require friendsofphp/php-cs-fixer

若无全局变量,VS Code设置默认路径:

"php-cs-fixer.executablePathWindows": "C:/Users/Administrator/AppData/Roaming/Composer/vendor/bin/php-cs-fixer.bat"

4,410 total views, 12 views today

Revisions

There are no revisions for this post.

Comments are closed.