2017 © Pedro PelĂĄez
 

library coding-standard

Consistence - Coding Standard - PHP Code Sniffer rules

image

consistence/coding-standard

Consistence - Coding Standard - PHP Code Sniffer rules

  • Tuesday, June 19, 2018
  • by VasekPurchart
  • Repository
  • 6 Watchers
  • 51 Stars
  • 133,708 Installations
  • PHP
  • 119 Dependents
  • 0 Suggesters
  • 8 Forks
  • 0 Open issues
  • 34 Versions
  • 12 % Grown

The README.md

Consistence Coding Standard

Complete standard is described in a separate document., (*1)

This is a custom coding standard, which is used by all Consistence projects. It is also suitable to be used with any other project or as a foundation for your own standard., (*2)

The main objectives of this standard are:, (*3)

  • Strict (and predictable) code.
  • Prevent common mistakes.
  • Readability over writability (character count).
  • Be friendly to diffs - minimize impact of changes.
  • Do not write unnecessary/unreliable information.

Automatic checks

Automatic checks of this standard are implemented as sniffs for PHP_CodeSniffer (phpcs), but not all the rules are checked yet. PHP_CodeSniffer contains also tool for automatic correction of certain errors phpcbf, but this tool is also not 100% reliable - results produced by this may not conform to this standard., (*4)

These checks also include some code analysis tools, such as detecting unreachable code etc. These are not part of the standard, but should be helpful., (*5)

Stability

This package uses SemVer with following rules., (*6)

Coding Standard document should be considered the source of truth and main object of SemVer. * MAJOR version will be incremented if new rules are added to the document. * MINOR version will be incremented if new sniffs are implemented to check for existing described rules. * PATCH version will be incremented for bug fixing - fixing a bug is considered everything which does not conform to the document - this may even lead to (temporarily) disabling an existing sniff - or part of it, until a better check is available or it is properly fixed., (*7)

The implementation of the automatic checks (both custom sniffs and the ruleset.xml file) are not subject to the SemVer and may change over time to accommodate changes in PHP_CodeSniffer and provided default sniffs, which are used also by this standard., (*8)

Recommended dependency on this package is on MINOR version (e.g. ~1.0.0), which means effectively: * No new rules will be added. * New automatic checks may be added. * You get fixes for existing automatic checks, or some of them may be disabled, if regressions are found., (*9)

Installation & usage

Install package consistence/coding-standard with Composer:, (*10)

composer require --dev consistence/coding-standard

Then run phpcs with this standard: bash vendor/bin/phpcs --standard=vendor/consistence/coding-standard/Consistence/ruleset.xml --extensions=php --encoding=utf-8 -sp src, (*11)

For further usage options see the PHP_CodeSniffer documentation., (*12)

The Versions

19/06 2018

dev-master

9999999-dev

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

19/06 2018

3.4

3.4.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

19/06 2018

3.3.1

3.3.1.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

13/06 2018

3.3

3.3.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

12/06 2018

3.2

3.2.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

23/05 2018

dev-new-sniffs

dev-new-sniffs

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

23/05 2018

3.1

3.1.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

16/05 2018

dev-vp-dependencies

dev-vp-dependencies

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

26/03 2018

dev-remove-note

dev-remove-note

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

26/03 2018

dev-dev-dependencies

dev-dev-dependencies

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

23/03 2018

3.0.1

3.0.1.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

23/03 2018

3.0

3.0.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

09/03 2018

2.4

2.4.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

08/03 2018

2.3.1

2.3.1.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

15/12 2017

2.3

2.3.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

22/09 2017

2.2.1

2.2.1.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

21/09 2017

2.2

2.2.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

16/09 2017

2.1

2.1.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

16/06 2017

2.0

2.0.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

22/05 2017

1.1

1.1.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

04/05 2017

1.0

1.0.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

14/02 2017

dev-php-7-only

dev-php-7-only

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

14/02 2017

dev-php-7

dev-php-7

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

02/02 2017

0.13

0.13.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

06/09 2016

0.12

0.12.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

26/07 2016

0.11.1

0.11.1.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

10/04 2016

0.11

0.11.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

20/01 2016

0.10.1

0.10.1.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

28/12 2015

0.10

0.10.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

28/12 2015

0.9

0.9.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

29/11 2015

0.8

0.8.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

29/11 2015

0.7

0.7.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

06/05 2015

0.6

0.6.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

The Development Requires

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer

05/05 2015

0.5

0.5.0.0

Consistence - Coding Standard - PHP Code Sniffer rules

  Sources   Download

MIT

The Requires

 

phpcs codesniffer standard coding cs coding standard sniffer ruleset phpcodesniffer