bigbite/phpcs-config

Big Bite's PHP Coding Standards.

Installs: 13 631

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 4

Forks: 2

Open Issues: 6

Type:phpcodesniffer-standard


README

This package contains the PHPCS configuration Big Bite use for all projects. It is primarily based upon WPCS and VIP WPCS, but is more strict, and contains additional Sniffs not included by those standards.

Installation

Run the following command in terminal:

composer require --dev bigbite/phpcs-config

Then run:

$ composer update

Create a .phpcs.xml.dist file in your project and add the following, replacing {PROJECT} with your project name:

<?xml version="1.0"?>
<ruleset name="{PROJECT} Rules">
	<rule ref="./vendor/bigbite/phpcs-config/BigBite" />
</ruleset>

Alternatively, you can install the standard globally:

composer global require --dev bigbite/phpcs-config

And reference the standard directly within your .phpcs.xml.dist:

<?xml version="1.0"?>
<ruleset name="{PROJECT} Rules">
	<rule ref="BigBite" />
</ruleset>

Developing

Please note that the PHPUnit test suite is not yet compatible with PHP 8.*.

Clone this repository, and then run composer install && composer install-cs.
Please run the following command prior to creating a PR, and ensure that there are no errors:

  • composer run all-checks

If you're feeling especially nice, you can run this command instead:

  • composer run all-checks-strict