定制 chiron/coding-standard 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

chiron/coding-standard

Composer 安装命令:

composer require chiron/coding-standard

包简介

A common coding standard for Chiron's PHP libraries.

README 文档

README

Latest Version on Packagist Software License Total Downloads

Chiron PHP Coding Standard based on PSR-12, Doctrine, and Slevomat Coding Standards

Table of Contents

Introduction

This library provides the Chiron Coding Standard rules for PHP_CodeSniffer (phpcs). It is inspired by and built upon the Doctrine Coding Standard and the Slevomat Coding Standard.

Install

The only thing you need before getting started is Composer.

Install PHP Coding Standard:

To install the latest version of this library, run the command below:

$ composer require chiron/coding-standard

The latest version of PHP Coding Standard requires PHP 7.1 at least.

Usage

Just add the default phpcs.xml.dist file (it can be found in the root directory) to your project and you are ready to use the Chiron Coding Standard when running phpcs.

Advanced

If you need to suppress some errors, use the following tags in your php code.

// phpcs:ignoreFile

// phpcs:ignore

// phpcs:disable
// phpcs:enable

Ignoring parts of a file
Ignoring files and folders

Versioning

This library follows SemVer with following rules.

Coding Standard document should be considered the source of truth and main object of SemVer.

  • MAJOR version will be incremented if new rules are added to the document.
  • MINOR version will be incremented if new sniffs are implemented to check for existing described rules.
  • PATCH version will be incremented for bug fixing - fixing a bug is considered everything which does not conform to the document - this may even lead to (temporarily) disabling an existing sniff - or part of it, until a better check is available or it is properly fixed.

The implementation of the automatic checks (both custom sniffs and the ruleset.xml file) are not subject to the SemVer and may change over time to accommodate changes in PHP_CodeSniffer and provided default sniffs, which are used also by this standard.

Recommended dependency on this package is on MINOR version (e.g. ~1.0.0), which means effectively:

  • No new rules will be added.
  • New automatic checks may be added.
  • You get fixes for existing automatic checks, or some of them may be disabled, if regressions are found.

Change Log

Please see CHANGELOG for more information on recent changes.

Contributing

Please see CONTRIBUTING for details.

Support

Please see SUPPORT for details.

Credits

License

The MIT License (MIT). Please see the License File for more information.

统计信息

  • 总下载量: 8.99k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 4
  • 依赖项目数: 40
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-08-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固