2017 © Pedro Peláez
 

library coding-standard

Set of rules for PHP_CodeSniffer preferring tabs and based on Nette coding standard.

image

dtforce/coding-standard

Set of rules for PHP_CodeSniffer preferring tabs and based on Nette coding standard.

  • Friday, February 24, 2017
  • by maresja1
  • Repository
  • 3 Watchers
  • 0 Stars
  • 731 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

Coding Standard

Set of rules for PHP_CodeSniffer preferring tabs and based on Nette coding standard., (*1)

Check rules overview for examples., (*2)

Install

$ composer require dtforce/coding-standard --dev

Usage

Run with Php_CodeSniffer:, (*3)

$ vendor/bin/phpcs src --standard=vendor/dtforce/coding-standard/src/DTForceCodingStandard/ruleset.xml -p

That's all!, (*4)

PhpStorm Integration

If you use PhpStorm, code sniffer can check your syntax as you write. How to integrate?, (*5)

How to be both Lazy and Safe

Composer hook

In case you don't want to use Php_CodeSniffer manually for every change in the code you make, you can add pre-commit hook via composer.json:, (*6)

"scripts": {
    "post-install-cmd": [
        "DTForce\\CodingStandard\\Composer\\ScriptHandler::addPhpCsToPreCommitHook"
    ],
    "post-update-cmd": [
        "DTForce\\CodingStandard\\Composer\\ScriptHandler::addPhpCsToPreCommitHook"
    ]
}

Every time you try to commit, Php_CodeSniffer will run on changed .php files only., (*7)

This is much faster than checking whole project, running manually or wait for CI., (*8)

Pretty cool, huh?, (*9)

The Versions

24/02 2017

dev-master

9999999-dev

Set of rules for PHP_CodeSniffer preferring tabs and based on Nette coding standard.

  Sources   Download

MIT

The Requires

 

06/09 2016

1.0.6

1.0.6.0

Set of rules for PHP_CodeSniffer preferring tabs and based on Nette coding standard.

  Sources   Download

MIT

The Requires

 

29/06 2016

1.0.5

1.0.5.0

Set of rules for PHP_CodeSniffer preferring tabs and based on Nette coding standard.

  Sources   Download

MIT

The Requires

 

23/11 2015

v1.0.4

1.0.4.0

Set of rules for PHP_CodeSniffer preferring tabs and based on Nette coding standard.

  Sources   Download

MIT

The Requires

 

22/11 2015

v1.0.3

1.0.3.0

Set of rules for PHP_CodeSniffer preferring tabs and based on Nette coding standard.

  Sources   Download

MIT

The Requires

 

22/11 2015

v1.0.2

1.0.2.0

Set of rules for PHP_CodeSniffer preferring tabs and based on Nette coding standard.

  Sources   Download

MIT

The Requires

 

22/11 2015

v1.0.1

1.0.1.0

Set of rules for PHP_CodeSniffer preferring tabs and based on Nette coding standard.

  Sources   Download

MIT

The Requires

 

22/11 2015

v1.0.0

1.0.0.0

Set of rules for PHP_CodeSniffer preferring tabs and based on Nette coding standard.

  Sources   Download

MIT

The Requires