定制 ubc/ctlt-coding-standard 二次开发

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

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

ubc/ctlt-coding-standard

Composer 安装命令:

composer require ubc/ctlt-coding-standard

包简介

CTLT PHP CodeSniffer Coding Standard

README 文档

README

A code standard based on Symfony 2 coding standards.

Installation (Composer)

  1. Install composer

  2. Add the dependency to composer.json:

    {
        "require-dev": {
            "ubc/ctlt-coding-standard": "~1.0",
        }
    }
  3. Install dependencies

    composer update

  4. Use it

    phpcs --standard=vendor/ubc/ctlt-coding-standard/ruleset.xml --runtime-set installed_paths vendor/m6web/symfony2-coding-standard src/*

Or add the following Phing task:

<target name="phpcs"
    description="Find coding standard violations using PHP_CodeSniffer and print human readable output. Intended for usage on the command line before committing.">
    <phpcodesniffer standard="${vendordir}/ubc/ctlt-coding-standard/ruleset.xml">
        <config name="installed_paths" value="${vendordir}/m6web/symfony2-coding-standard"/>
        <fileset dir="${sourcedir}">
            <include name="**/*.php" />
        </fileset>
    </phpcodesniffer>
</target>

Installation (Pear)

  1. Install phpcs:

     pear install PHP_CodeSniffer
    
  2. Find your PEAR directory:

     pear config-show | grep php_dir
    
  3. Copy, symlink or check out this repo and Symfony2 coding standard to the phpcs Standards directory:

     cd /path/to/pear/PHP/CodeSniffer/Standards
     git clone git://github.com/opensky/Symfony2-coding-standard.git Symfony2
     git clone git://github.com/ubc/CTLT-PHP-coding-standard.git CTLT
    
  4. Set CTLT as your default coding standard:

     phpcs --config-set default_standard CTLT
    
  5. ...

  6. Profit!

     cd /path/to/my/project
     phpcs
     phpcs path/to/my/file.php
    

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-07-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固