UmanIT coding standard for PHPCS
PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
UmanitPhp
UmanitSymfony
UmanitWordPress
README.md

README.md

PHPCS UmanIT Standard

A coding standard for PHPCS.

Installation

Our coding standard use Symfony2 and WordPress standards.

mkdir -p path/to/standards
git clone https://github.com/escapestudios/Symfony2-coding-standard.git path/to/standards/symfony
git clone https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git path/to/standards/wordpress
git clone https://github.com/umanit/phpcs-umanit-standard.git path/to/standards/umanit
phpcs --config-set installed_paths /absolute/path/to/standards/symfony,/absolute/path/to/standards/wordpress,/absolute/path/to/standards/umanit
phpcs -i

Basic usage

In the following commands, [standard] is one of the coding standards listed by phpcs -i.

To sniff a file or directory for coding standard violations :

phpcs --standard=[standard] -s --colors path/to/file/or/directory

To fix the violations automatically, run :

phpcbf --standard=[standard] path/to/file/or/directory