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
phpstorm 格式化代码的更多相关文章
- phpstorm 格式化代码方法
hpstorm 代码格式化方法: 快捷键:Ctrl + Alt + L 设置代码样式:File -> Settings -> Code Style ->PHP 根据个人php代码规范 ...
- phpStorm格式化代码快捷键
Ctrl+Alt+L
- phpstorm 无法格式化代码
phpstorm 默认的格式化代码的快捷键是 Ctrl + Alt + L,但是按了没有反应. 原因是当时开着网易云音乐,占用了这个快捷键,关了就好了.另外其他的程序比如QQ也有可能占用这个快捷键.
- phpstorm2019.1 实现保存(ctrl+s)同时格式化代码
1.选择Edit(编辑)->Macros(宏)->Start Macro Recording(开始录制宏),如下图: 2.直接按想要录制的快捷键,先按Ctrl+ALT+L,然后键盘按Ctr ...
- vim格式化代码实际上就是 "缩进代码", 命令是等号=
vim格式化代码实际上就是 "缩进代码", 命令是等号= 格式化就是 vim 根据 文件的类型, 自动的对代码进行 缩进 缩进的类型有多种, 都是用等号命令: = 全部格式化 : ...
- vim 添加php自动补全 并格式化代码
自动补全,修改/etc/vimrc的配置 vim /etc/vimrc 添加: filetype plugin on autocmd FileType php set omnifunc=phpcomp ...
- Eclipse保存文件时自动格式化代码
实现效果:Ctrl+S会自动格式化并保存代码. 应用上图所示效果之后,在每次对Eclipse保存的时候都会实现自动格式化代码. 1. Fomated All lines,格式化该文件的所有代码:还是 ...
- Eclipse格式化代码快捷键失效问题
一般情况下,Eclipse快捷键失效是因为与其它软件快捷键冲突,Eclipse格式化代码快捷键正好与搜狗输入法的“简繁切换”的快捷键冲突,将搜狗输入法的快捷键修改一下就行了.
- [VIM] 格式化代码
快速使用vim格式化代码 在vim的编辑模式i下直接ESC退出道命令模式之后直接敲入如下命令: gg=G 将全部代码格式化 nG=mG 将第n行到第m行的代码格式化 注:如果ESC ...
随机推荐
- SideBar---fixed定位
<style> /*外层fixed*/ body{ width:2000px; height:2000px; background:#000; } .wrap { position: ...
- Runtime.getRuntime().addShutdownHook(Thread)
Runtime.getRuntime().addShutdownHook(Thread)为虚拟机添加关闭时添加钩子线程
- 书写优雅的shell脚本(插曲) - kill
shell之kill.killall.xkill.pkill 2013-01-08 22:03:28| 分类: Linux|举报|字号订阅 1 kill kill的应用是和ps 或pgrep 命令结 ...
- SPOJ:Decreasing Number of Visible Box(不错的,背包?贪心?)
Shadowman loves to collect box but his roommates woogieman and itman don't like box and so shadowman ...
- YUIDoc的使用方法小结
一.YUIDoc概述以及安装YUIDoc是为YUI Library用来生成HTML版API文档的一系列工具集,文档的生成完全基于JavaDoc风格的代码注释规则.该工具是基于Python语言编写,并且 ...
- [TJOI2012]防御
https://www.zybuluo.com/ysner/note/1332539 题面 戳我 解析 一道挺棒棒的线段树. 显然一次伤害到来时我们要先看看区间内哪些点的护甲没了. 这个可以通过维护区 ...
- 在线制作一键生成微信小程序实现原理之需求分析
随着微信小程序接口不断的放开,小程序在今年或许是明年必将成为商家的一个标配,这个标配的标准就是要开发周期短,费用低,功能实用.只有这样才能让线下的广大商家快速接入.现在也有好多公司开发出了一键生成快速 ...
- API介绍
API(Application Programming Interface,应用程序编程接口)是一些预先定义的函数,目的是提供应用程序与开发人员基于某软件或硬件得以访问一组例程的能力,而又无需访问源码 ...
- 编写hadoop程序并打成jar包上传到hadoop集群运行
准备工作: 1. hadoop集群(我用的是hadoop-2.7.3版本),这里hadoop有两种:1是编译好的hadoop-2.7.3:2是源代码hadoop-2.7.3-src: 2. 自己的机器 ...
- (二十四)权限控制(粗粒度)-通过filter
扩展:权限控制(粗粒度)-通过filter 过滤器编写步骤: 1.编写一个类 实现filter接口 重写方法 2.编写配置文件 <filter> <filter-mapping> ...