phpstorm 格式化代码

MAC 安装phpcs、phpcbf

composer global require 'squizlabs/php_codesniffer=*'
Changed current directory to /Users/huangrong/.composer
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing squizlabs/php_codesniffer (3.3.0): Downloading (100%)
Writing lock file
Generating autoload files
composer require friendsofphp/php-cs-fixer
Using version ^2.12 for friendsofphp/php-cs-fixer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 19 installs, 0 updates, 0 removals
  - Installing symfony/stopwatch (v4.1.1): Downloading (100%)
  - Installing symfony/process (v4.1.1): Downloading (100%)
  - Installing symfony/polyfill-php72 (v1.8.0): Downloading (100%)
  - Installing paragonie/random_compat (v2.0.17): Downloading (100%)
  - Installing symfony/polyfill-php70 (v1.8.0): Downloading (100%)
  - Installing symfony/options-resolver (v4.1.1): Downloading (100%)
  - Installing symfony/finder (v4.1.1): Downloading (100%)
  - Installing symfony/polyfill-ctype (v1.8.0): Downloading (100%)
  - Installing symfony/filesystem (v4.1.1): Downloading (100%)
  - Installing symfony/event-dispatcher (v4.1.1): Downloading (100%)
  - Installing symfony/polyfill-mbstring (v1.8.0): Downloading (100%)
  - Installing symfony/console (v4.1.1): Downloading (100%)
  - Installing psr/log (1.0.2): Downloading (100%)
  - Installing php-cs-fixer/diff (v1.3.0): Downloading (100%)
  - Installing doctrine/lexer (v1.0.1): Downloading (100%)
  - Installing doctrine/annotations (v1.6.0): Downloading (100%)
  - Installing composer/xdebug-handler (1.1.0): Downloading (100%)
  - Installing composer/semver (1.4.2): Downloading (100%)
  - Installing friendsofphp/php-cs-fixer (v2.12.2): Downloading (100%)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/event-dispatcher suggests installing symfony/http-kernel ()
symfony/console suggests installing psr/log-implementation (For using the console logger)
symfony/console suggests installing symfony/lock ()
friendsofphp/php-cs-fixer suggests installing php-cs-fixer/phpunit-constraint-isidenticalstring (For IsIdenticalString constraint.)
friendsofphp/php-cs-fixer suggests installing php-cs-fixer/phpunit-constraint-xmlmatchesxsd (For XmlMatchesXsd constraint.)
Writing lock file
Generating autoload files

文章参考

https://blog.csdn.net/m0_38092942/article/details/80006144

https://qq52o.me/2460.html
http://www.zshanjun.com/discussions/24

转载于:https://www.cnblogs.com/itafter/p/9732156.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值