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

phpstorm 格式化代码的更多相关文章

  1. phpstorm 格式化代码方法

    hpstorm 代码格式化方法: 快捷键:Ctrl + Alt + L 设置代码样式:File -> Settings -> Code Style ->PHP 根据个人php代码规范 ...

  2. phpStorm格式化代码快捷键

    Ctrl+Alt+L    

  3. phpstorm 无法格式化代码

    phpstorm 默认的格式化代码的快捷键是 Ctrl + Alt + L,但是按了没有反应. 原因是当时开着网易云音乐,占用了这个快捷键,关了就好了.另外其他的程序比如QQ也有可能占用这个快捷键.

  4. phpstorm2019.1 实现保存(ctrl+s)同时格式化代码

    1.选择Edit(编辑)->Macros(宏)->Start Macro Recording(开始录制宏),如下图: 2.直接按想要录制的快捷键,先按Ctrl+ALT+L,然后键盘按Ctr ...

  5. vim格式化代码实际上就是 "缩进代码", 命令是等号=

    vim格式化代码实际上就是 "缩进代码", 命令是等号= 格式化就是 vim 根据 文件的类型, 自动的对代码进行 缩进 缩进的类型有多种, 都是用等号命令: = 全部格式化 : ...

  6. vim 添加php自动补全 并格式化代码

    自动补全,修改/etc/vimrc的配置 vim /etc/vimrc 添加: filetype plugin on autocmd FileType php set omnifunc=phpcomp ...

  7. Eclipse保存文件时自动格式化代码

    实现效果:Ctrl+S会自动格式化并保存代码. 应用上图所示效果之后,在每次对Eclipse保存的时候都会实现自动格式化代码. 1. Fomated All lines,格式化该文件的所有代码:还是 ...

  8. Eclipse格式化代码快捷键失效问题

    一般情况下,Eclipse快捷键失效是因为与其它软件快捷键冲突,Eclipse格式化代码快捷键正好与搜狗输入法的“简繁切换”的快捷键冲突,将搜狗输入法的快捷键修改一下就行了.

  9. [VIM] 格式化代码

    快速使用vim格式化代码 在vim的编辑模式i下直接ESC退出道命令模式之后直接敲入如下命令: gg=G        将全部代码格式化 nG=mG    将第n行到第m行的代码格式化 注:如果ESC ...

随机推荐

  1. HihoCoder1705: 座位问题(STL)

    描述 HIHO银行等待区有一排N个座位,从左到右依次编号1~N.现在有M位顾客坐在座位上,其中第i位坐在编号Ai的座位上. 之后又陆续来了K位顾客,(K + M ≤ N) 他们都会选择坐在最" ...

  2. BZOJ_3963_[WF2011]MachineWorks_斜率优化+CDQ分治

    BZOJ_3963_[WF2011]MachineWorks_斜率优化+CDQ分治 Description 你是任意性复杂机器公司(Arbitrarily Complex Machines, ACM) ...

  3. maven(二)创建一个maven的web项目中解决Cannot change version of project facet Dynamic web module to 2.5

    我们用Eclipse创建Maven结构的web项目的时候选择了Artifact Id为maven-artchetype-webapp,由于这个catalog比较老,用的servlet还是2.3的,而一 ...

  4. wsdl 生成代码 WCF

    具体方法: 打开Microsoft Visual Studio 2008->Visual Studio Tools->Visual Studio 2008 命令提示窗口. 输入:wsdl ...

  5. 【Cocos2dx】新建场景、场景的切换、设置启动场景与菜单的新建

    这是Cocos2dx最简单的部分.主要是体现对场景的操作,其实这东西就是Flash的舞台,安卓的Activity,WIN32窗体程序的Framework窗体,网页的body,反正就是对那个容纳各种东西 ...

  6. 转载:PowerPivot for excel 100 Create KPI

    PowerPivot for excel 100 Create KPI      最近在了解PowerPivot,遇到了一些问题,不过还好最近都解决了,下面介绍一下关于在PowerPivot里面如何创 ...

  7. HTML中的align和valign这两个属性

    转自:https://www.douban.com/note/325833958/ align和valign属性均是规定表格相对于周围元素的对齐方式,区别就在于: 1.align属性趋向于左右对齐,其 ...

  8. Prepare for Mac App Store Submission--为提交到Mac 应用商店做准备

    返回 Mac App Store Prepare for Mac App Store Submission 提交到Mac 应用商店之前的准备 Most of your time is spent on ...

  9. grep在指定类型的文件中查找字符 (转载)

    转自:http://blog.csdn.net/qvbfndcwy/article/details/8127329 find -name '*.php'|xargs grep 'include'//在 ...

  10. javascript的回调函数

    函数也是对象 想弄明白回调函数,首先的清楚地明白函数的规则.在javascript中,函数是比较奇怪的,但它确确实实是对象.确切地说,函数是用Function()构造函数创建的Function对象.F ...