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. 将svn的项目转移到另外一个仓库中

    前几天在做一个项目的时候,因为需要,需要将Server A 上SVN仓库 repos1中的项目pro1迁移到Server B 上的SVN仓库中,首先想到的是:通过复制,但是仔细一想,这样是不可能的:然 ...

  2. Code-NFine:NFine介绍

    ylbtech-Code-NFine:NFine介绍 1. NFine平台介绍返回顶部 1. 使用时请务必保留来源,请勿用于违反我国法律的web平台.如诈骗等非法平台网站.版权最终解释权归<NF ...

  3. 开发一个最简单的Cardboard虚拟现实应用(四)做一个Cardboard第一人称控制器

    [开源互助-原创文章,转载请说明出处]第三帖中已经创建了一个cardboard自带的demo应用,但它是不能移动的,玩家只能站在原地,通过头部转动来观察四周,除此之外,玩家并没有更多的手段与游戏场景进 ...

  4. 机器学习(2):简单线性回归 | 一元回归 | 损失计算 | MSE

    前文再续书接上一回,机器学习的主要目的,是根据特征进行预测.预测到的信息,叫标签. 从特征映射出标签的诸多算法中,有一个简单的算法,叫简单线性回归.本文介绍简单线性回归的概念. (1)什么是简单线性回 ...

  5. 【Codeforces Round #411 (Div. 1)】Codeforces 804C Ice cream coloring (DFS)

    传送门 分析 这道题做了好长时间,题意就很难理解. 我们注意到这句话Vertices which have the i-th (1 ≤ i ≤ m) type of ice cream form a ...

  6. hdoj5818【模拟】

    2016 Multi-University Training Contest 7 1010 思路: 我相信T的绝对是直接根据题目意思来了. 正确的一点小转变,比较一下那个队列小,然后把小的给大的,每次 ...

  7. python __builtins__ help类 (32)

    32.'help', 接收对象作为参数,更详细地返回该对象的所有属性和方法 class _Helper(builtins.object) | Define the builtin 'help'. | ...

  8. poj 2960 S-Nim【SG函数】

    预处理出SG函数,然后像普通nim一样做即可 #include<iostream> #include<cstdio> using namespace std; const in ...

  9. hdu1085 Holding Bin-Laden Captive!【生成函数】

    列出生成函数的多项式之后暴力乘即可 #include<iostream> #include<cstdio> #include<cstring> using name ...

  10. 跟我一起玩Win32开发(5):具有单选标记的菜单

    帅哥们,美女们,下午好,我又来误人子弟,请做好准备. 今天,我们的目的是,想要实现下图中的这种菜单效果. 就是一种类似单选按钮的菜单,多个菜单项中,同时只有一个会被选中. 首先,我们在资源编辑器中,设 ...