定制 ionbytes/coding-standard 二次开发

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

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

ionbytes/coding-standard

最新稳定版本:1.0.0

Composer 安装命令:

composer require --dev ionbytes/coding-standard

包简介

IonBytes Coding Standard

README 文档

README

Installation

  1. Install via composer by running:
    composer require --dev ionbytes/coding-standard
  2. Create the phpcs.xml.dist file in root path of you repository:
    <?xml version="1.0"?>
    <ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
        
        <arg name="basepath" value="."/>
        <arg name="cache" value=".phpcs-cache"/>
        <arg name="colors"/>
        <arg name="extensions" value="php"/>
        <arg name="parallel" value="80"/>
        
        <!-- Show progress -->
        <arg value="sp"/>
        
        <!-- Paths to check -->
        <file>src</file>
        <file>tests</file>
        
        <!-- Include all rules from the IonBytes Coding Standard -->
        <rule ref="IonBytes"/>
    </ruleset>
  3. Add composer scripts into your composer.json:
    {
      "scripts": {
        "cs-check": "phpcs",
        "cs-fix": "phpcbf -vpw"
      }
    }

Usage

  • To run checks only:

    composer run cs
  • To automatically fix violations coding standards:

    composer run cs-fix

License

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

统计信息

  • 总下载量: 130
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-04