yzc164 发表于 2017-12-29 14:45:47

vscode 中使用php-cs-fixer和PHP Formatter 插件规范化PHP代码

//打印日志信息,用于调试  
"phpformatter.logging":true,
  
//不使用composer方式
  
"phpformatter.composer":false,
  
//添加自定义参数,默认的参数level已经在新版本中移出所以会导致运行出错
  
//RULES=[@PSR1,@PSR2,@Symfony]
  
//source:https://github.com/FriendsOfPHP/PHP-CS-Fixer#usage
  
"phpformatter.arguments":["--rules=@Symfony"],
  
// Should point to php-cs-fixer.phar file, if you have installed this manually (without Composer). Should include .phar extension.
  
// php-cs-fixer.phar路径,使用composer方式时可以不填
  
"phpformatter.pharPath":"d:/wamp/bin/php/php5.5.12/php-cs-fixer.phar",
  
// If the pharPath is set, and you are not using Composer, and you haven't added PHP to your PATH, this should point to the php.exe file.
  
// php路径,使用composer方式时可以不填
  
"phpformatter.phpPath":"d:/wamp/bin/php/php5.5.12/php.exe"
  
页: [1]
查看完整版本: vscode 中使用php-cs-fixer和PHP Formatter 插件规范化PHP代码