定制 buddypress/bp-coding-standards 二次开发

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

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

buddypress/bp-coding-standards

最新稳定版本:v0.1.0

Composer 安装命令:

composer require --dev buddypress/bp-coding-standards

包简介

PHP_CodeSniffer rules (sniffs) to enforce BuddyPress minimum coding conventions

README 文档

README

PHP_CodeSniffer rules (sniffs) to enforce BuddyPress minimum coding conventions.

Minimal requirements

Installation

To use this standard in a project, declare it as a dependency.

composer require buddypress/bp-coding-standards

This will install the latest compatible version of PHPCS and WPCS to your vendor directory in order to run sniffs locally.

You can also manually add this to your project's composer.json file as part of the require property:

"require": {
    "buddypress/bp-coding-standards": "^0.2.0"
}

Using PHPCS

To use this standard with phpcs directly from your command line, use the command:

vendor/bin/phpcs --standard=BuddyPress .

Alternatively, you can set this as a composer script, which will automatically reference the correct version of phpcs and the dependent standards.

"scripts": {
    "phpcs" : "phpcs --standard=BuddyPress ."
}

Then use the following command:

composer run phpcs

You can also pass arguments to the composer phpcs script, following a -- operator like this:

composer run phpcs -- --report=summary

Extending the ruleset

You can create a custom ruleset for your project that extends or customizes these rules by creating your own phpcs.xml or phpcs.xml.dist file in your project, which references these rules, like this:

<?xml version="1.0"?>
<ruleset>
    <description>Example project ruleset</description>

    <!-- Include BuddyPress Rules -->
    <rule ref="BuddyPress" />

    <!-- Project customizations go here -->

</ruleset>

Change Log

Change log under CHANGELOG.md.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2024-02-15