2017 © Pedro PelĆ”ez
 

library codestyle

ArtFocus Coding Standards for PHP CodeSniffer

image

artfocus/codestyle

ArtFocus Coding Standards for PHP CodeSniffer

  • Wednesday, May 11, 2016
  • by hranicka
  • Repository
  • 0 Watchers
  • 0 Stars
  • 10,645 Installations
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

ArtFocus Coding Standards for PHP CodeSniffer

  • Based on Consistence, so read it carefully.
  • But it differs in some cases:
    • Arrays: Arrays without key are allowed also when the first key is specified (Nette\Database $criteria).
    • Comments: Inline comments are allowed (code conditions, code folding).
    • Comments: Type parameters are not checked (allow shortcuts like int, bool).
    • Constants: Uppercase constants including TRUE, FALSE, NULL (Nette Code Style).
    • Formatting: There is not space after type cast.
    • Formatting: Heredoc syntax is allowed (eg. in tests).
    • Functions: Opening brace of function with multiline arguments must be on the same line as closing parenthesis.
    • Strings: Double quotes are permitted when contains a variable.
    • Whitespace: There is no space after type cast.
    • and some other differences.

Example Usage

Install into your project the best via Composer:, (*1)

$ composer require artfocus/codestyle

Run PHP CodeSniffer like this:, (*2)

$ vendor/bin/phpcs --standard=/path/to/Artfocus/ruleset.xml -sp src tests

Versioning

This packages uses semver.org., (*3)

The Versions

11/05 2016

dev-master

9999999-dev

ArtFocus Coding Standards for PHP CodeSniffer

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Jaroslav Hranička

11/05 2016

v3.0.1

3.0.1.0

ArtFocus Coding Standards for PHP CodeSniffer

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Jaroslav Hranička

21/04 2016

v3.0.0

3.0.0.0

ArtFocus Coding Standards for PHP CodeSniffer

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

by Jaroslav Hranička

04/04 2016

v2.0.2

2.0.2.0

ArtFocus Coding Standards for PHP CodeSniffer

  Sources   Download

MIT

The Requires

  • php ^5.4|^7.0

 

The Development Requires

by Jaroslav Hranička

01/04 2016

v2.0.1

2.0.1.0

ArtFocus Coding Standards for PHP CodeSniffer

  Sources   Download

MIT

The Requires

  • php ^5.4|^7.0

 

The Development Requires

by Jaroslav Hranička

03/02 2016

dev-spaces-not-tabs

dev-spaces-not-tabs

ArtFocus Coding Standards for PHP CodeSniffer

  Sources   Download

MIT

The Requires

  • php ^5.4|^7.0

 

The Development Requires

by Jaroslav Hranička

22/12 2015

v2.0.0

2.0.0.0

ArtFocus Coding Standards for PHP CodeSniffer

  Sources   Download

MIT

The Development Requires

by Jaroslav Hranička

21/12 2015

v2.0.0-beta1

2.0.0.0-beta1

ArtFocus Coding Standards for PHP CodeSniffer

  Sources   Download

MIT

The Development Requires

by Jaroslav Hranička

22/05 2015

v1.0.2

1.0.2.0

ArtFocus Coding Standards for PHP CodeSniffer

  Sources   Download

MIT

by Jaroslav Hranička

20/05 2015

v1.0.1

1.0.1.0

ArtFocus Coding Standards for PHP CodeSniffer

  Sources   Download

MIT

by Jaroslav Hranička

17/05 2015

v1.0.0

1.0.0.0

ArtFocus Coding Standards for PHP CodeSniffer

  Sources   Download

MIT

by Jaroslav Hranička