finetic/coding-standard 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

finetic/coding-standard

最新稳定版本:v4.0.0

Composer 安装命令:

composer require finetic/coding-standard

包简介

Finetic PHP CodeSniffer Coding Standard

README 文档

README

Extending the default PHP_CodeSniffer with Finetic rules

Note: Adding new phpcs-rules to this package must result in a major version update!

Installation

Require the package:

composer require --dev finetic/coding-standard

Setup

Create a phpcs.xml or phpcs.xml.dist-file in the root of your project, and include the default Finetic ruleset:

<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="phpcs-for-your-project">
    <!-- include root folder of project -->
    <file>.</file>

    <!-- exclude paths -->
    <exclude-pattern>./src/Migrations</exclude-pattern>
    <exclude-pattern>./vendor</exclude-pattern>

    <!-- include all rules in the Finetic ruleset -->
    <rule ref="Finetic"/>
</ruleset>

Change the name of the ruleset, modify the excluded paths and/or include custom rulesets for your project.

Usage

Since you now have a phpcs.xml file in the root of your project, you can run the default phpcs-command: vendor/bin/phpcs.

More information

For more information on how to use PHP CodeSniffer, check the PHP CodeSniffer repository.

Contributing

If you want to to contribute, create a merge request with one sniff per merge request. Please provide an example in the description of what the sniff is about with a good and bad code snippet.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-24