承接 linnk/allman-codesniffer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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:

  1. I believe in Allman indent style.
  2. 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.84k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 12
  • Watchers: 3
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-08-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固