kamelot/code-sniffer

Ruleset for phpcodesniffer. (C'est mon premier package composer. C'est mon premier gitflow. C'est mon premier Ruleset. Tout feedback est bien venu

0.2.2 2017-11-20 12:19 UTC

README

Some custom PHP codesniffer rules

https://packagist.org/packages/kamelot/code-sniffer

Rule List

@todo would include a ticket/issue id

Examples

Using report:

vendor/bin/phpcs --standard=standard/Kamelot/ruleset.xml --extensions=php \
--encoding=utf-8 -n tests/Kamelot/ok/ --colors

Default usage

vendor/bin/phpcs --standard=standard/Kamelot/ruleset.xml --extensions=php \
--encoding=utf-8 -n src --colors

Testing code

Run commands

Checking if everything is wrong :-)

vendor/bin/phpcs --standard=standard/Kamelot/ruleset.xml \
--extensions=php --encoding=utf-8 -n tests/Kamelot/errors

Checking if everything is OK

vendor/bin/phpcs --standard=standard/Kamelot/ruleset.xml \
--extensions=php --encoding=utf-8 -n tests/Kamelot/ok

PhpUnit

You can do that through phpunit now

vendor/bin/phpunit

Installation

Installation through Composer

composer require kamelot/CodeSniffer