linnk/allman-codesniffer
最新稳定版本:2.0
Composer 安装命令:
composer require linnk/allman-codesniffer
包简介
Allman CodeSniffer & Linnk Standards
关键字:
README 文档
README
This is a continuation of my previous fixer PHP_Allman, this time based on PHP_CodeSniffer, which is proven to be more powerful and flexible in the long run.
The principles are the same for this standard:
- I believe in Allman indent style.
- I believe in tabs instead of spaces.
Example:
while (x == y)
{
something();
something_else();
if (true)
{
one_more();
}
}
final_thing();
Installation
Using composer in your projects:
# Require PHP_CodeSniffer and this Allman_CodeSniffer (standard) composer require squizlabs/php_codesniffer composer require linnk/allman-codesniffer # Add Allman standard to install_paths vendor/bin/phpcs --config-set installed_paths vendor/linnk/allman-codesniffer/ # Set Allman as default :) vendor/bin/phpcs --config-set default_standard Allman # Verifying vendor/bin/phpcs -e
How to use:
$ composer/bin/phpcs path/to/your/code
Global installation for general purposes:
# Global installation composer global require squizlabs/php_codesniffer composer global require linnk/allman-codesniffer # Set `phpcs` and `phpcbf` in PATH export PATH="$PATH:$HOME/.composer/vendor/bin" # Set installed_paths phpcs --config-set installed_paths ~/.composer/vendor/linnk/allman-codesniffer/ # Set Allman as default phpcs --config-set default_standard Allman
## Contributing
# Clone repo $ git clone https://github.com/Linnk/Allman_CodeSniffer.git # Installation $ composer install # Configuration $ composer/bin/phpcs --config-set installed_paths /full/path/to/Allman_CodeSniffer/ $ composer/bin/phpcs --config-set default_standard Allman $ composer/bin/phpcs --config-set report_width auto
Notice: ^ Our composer folder here is composer instead of vendor. The irony of following standards.
TO-DO: Add instructions for podman container
统计信息
- 总下载量: 1.56k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-08-16