最近项目加上了校验规则,你懂的 phpcs 安装 phpcs pear install PHP_CodeSniffer 使用 phpcs --config-set encoding=utf-8 phpcs --config-set tab_width=4 phpcs --config-set show_warings=0 phpcs --config-show Array ( [encoding] = utf-8 [tab_width]
最近项目加上了校验规则,你懂的
phpcs
安装 phpcs
pear install PHP_CodeSniffer
使用
phpcs --config-set encoding=utf-8 phpcs --config-set tab_width=4 phpcs --config-set show_warings=0 phpcs --config-show Array ( [encoding] => utf-8 [tab_width] => 4 [show_warnings] => 0 ) phpcs -s *.php
由于项目中校验了 Doc comment,file comment ,我使用了
立即学习“PHP免费学习笔记(深入)”;
DoxygenToolkit.vim
插件做function comment,但是对于 file comment,doc comment 来说DoxygenToolkit 并不满足我的项目
于是我花了一点时间用 python 写了一个小的 vim 插件,专门添加符合我需求的注释,
commentvim.vim git hub 地址 : https://github.com/childeYin/vim-comment-plugin
原文地址:PHP_CodeSniffer 格式校验规则, 感谢原作者分享。
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号