2017 © Pedro Peláez
 

library phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

image

chromatix/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  • Tuesday, February 27, 2018
  • by chromatix
  • Repository
  • 2 Watchers
  • 1 Stars
  • 3,920 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 15 Open issues
  • 19 Versions
  • 17 % Grown

The README.md

phpcs-config-chromatix

Shareable config for phpcs for custom standards at Chromatix Digital Agency., (*1)

Based heavily on the WordPress Coding Standards but with some of our own too. Most notably, two spaces instead of tabs. Soz., (*2)

This config is still in development. If you have suggestions for improvement or if you disagree with anything this config makes you do, feel free to file an issue., (*3)

Writing PHP outside of the WordPress context? We still use WordPress standards, but obviously without the need for using WordPress-specific functions. See phpcs-config-chromatix-no-wordpress., (*4)

Installation

Install globally to use on any project:, (*5)

composer global require chromatix/phpcs-config-chromatix

Install locally to one project:, (*6)

composer require chromatix/phpcs-config-chromatix

You'll also need to have phpcs installed in the same manner, and set your phpcs installed_paths like follows:, (*7)

vendor/bin/phpcs --config-set installed_paths ../../chromatix,../../wp-coding-standards/wpcs

It's probably ideal to do this in a post-install-cmd script in your composer.json; see this package's composer.json for an example of a cross-platform way to do so (it might look a bit complicated, but unfortunately is required... at least in our testing so far, anyway!)., (*8)

Usage

Add this to your phpcs.xml file:, (*9)

<?xml version="1.0"?>
<ruleset>
  <rule ref="phpcs-config-chromatix"/>
</ruleset>

Then:, (*10)

  • Using globally?, (*11)

    Run phpcs *.php, (*12)

  • Using locally?, (*13)

    Run vendor/bin/phpcs *.php, (*14)

    Alternatively, you'll probably find it useful to add a script to your composer.json:, (*15)

    "scripts": { "lint": "find . -type d \( -name '.git' -o -name 'vendor' -o -name 'node_modules' \) -prune -o -type f -name '*.php' -print | xargs vendor/bin/phpcs" }, (*16)

    Then you can just run composer lint., (*17)

See also

License

MIT., (*18)

The Versions

27/02 2018

dev-master

9999999-dev https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

27/02 2018

v0.0.17

0.0.17.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

13/02 2018

dev-amrit

dev-amrit https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

22/01 2018

v0.0.16

0.0.16.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

13/12 2017

v0.0.15

0.0.15.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

11/12 2017

v0.0.14

0.0.14.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

22/11 2017

v0.0.13

0.0.13.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

14/11 2017

v0.0.12

0.0.12.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

08/11 2017

v0.0.11

0.0.11.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

06/11 2017

v0.0.10

0.0.10.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

04/11 2017

v0.0.9

0.0.9.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

03/11 2017

v0.0.8

0.0.8.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

03/11 2017

v0.0.7

0.0.7.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

03/11 2017

v0.0.6

0.0.6.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

02/11 2017

v0.0.5

0.0.5.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

24/10 2017

v0.0.4

0.0.4.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

23/10 2017

v0.0.3

0.0.3.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

23/10 2017

v0.0.2

0.0.2.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix

23/10 2017

v0.0.1

0.0.1.0 https://github.com/ChromatixAU/phpcs-config-chromatix

Chromatix custom config for phpcs. Based heavily on the WordPress Coding Standards but with some of our own too.

  Sources   Download

MIT

The Requires

 

wordpress phpcs php phpcs-config chromatix