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. sql注入原理与实践

    转自:http://blog.csdn.net/stilling2006/article/details/8526458 1.1.1 摘要 日前,国内最大的程序员社区CSDN网站的用户数据库被黑客公开 ...

  2. ssl原理及应用

    今天学习网络通信,看到使用ssl(Secure Sockets Layer)进行加密,由于对ssl只是有些概念上的了解,对于具体应用原理.过程和如何使用不慎了解,于是学习了一番,总结如下: 1. 为什 ...

  3. 「LuoguP3865」 【模板】ST表 (线段树

    题目背景 这是一道ST表经典题——静态区间最大值 请注意最大数据时限只有0.8s,数据强度不低,请务必保证你的每次查询复杂度为 O(1) 题目描述 给定一个长度为 N 的数列,和 M 次询问,求出每一 ...

  4. Servlet分页查询

    分页查询: 1.逻辑分页查询:用户第一次访问时就把全部数据访问出来,添加到一个大集合中,然后放到session中,进行转发.通过页码等的计算,把要显示的内容添加到一个小集合中,转发.遍历小集合以显示当 ...

  5. IOCP编程小结(中)

    上一篇主要谈了一些基本理念,本篇将谈谈我个人总结的一些IOCP编程技巧. 网络游戏前端服务器的需求和设计 首先介绍一下这个服务器的技术背景.在分布式网络游戏服务器中,前端连接服务器是一种很常见的设计. ...

  6. Oracle ORA-01033: ORACLE initialization or shutdown in progress 错误解决办法Windows版(手贱强制重启电脑的后果)

    转自:https://blog.csdn.net/rrrrroy_ha/article/details/80601497

  7. JAVA基础-面向对象06

    一.封装 1. 封装概念和体现 封装:包装的意思,隐藏被封装的事物的信息:生活中的包装:快递:食品:电子产品……方便:好看易用:安全: Java程序中的包装: 类:包装了同一类事物的共性信息: 函数: ...

  8. EasyUI创建选项卡并判断是否打开

    //创建选项卡:判断选项卡是否打开,如果以打开则定位到选项卡,否则创建 function addPanel(title) { var bol = $('#main_tabs').tabs('exist ...

  9. 简述网站、B/S架构与C/S架构

    一.什么是网站? 定义:网站是指在因特网上根据一定的规则,使用HTML等工具制作的用于展示特定内容相关网页的集合. 简单地说,网站是一种沟通工具(或者说是一种软件——建设网站也是软件开发的一种),我们 ...

  10. git apply

    1. git 安装   2.git 与服务器的验证   1.生成ssh ssh-keygen -t rsa -C "1107247128@qq.com" 2.查看生成的pub文件, ...