norsys / php-coding-standard
Coding standard to Norsys PHP projects
Installs: 1 286
Dependents: 4
Suggesters: 0
Security: 0
Stars: 0
Watchers: 7
Forks: 0
Open Issues: 0
Requires
This package is auto-updated.
Last update: 2024-11-28 09:54:25 UTC
README
Installation
composer require norsys/php-coding-standard:~1.0 --dev
Quick usage
Launch phpcs
with Norsys PHP
ruleset
bin/phpcs --standard=vendor/norsys/php-coding-standard/php
Check style specific to write tests
bin/phpcs --standard=vendor/norsys/php-coding-standard/php/test
Use with Symfony
bin/phpcs --standard=vendor/norsys/php-coding-standard/symfony bin/phpcs --standard=vendor/norsys/php-coding-standard/symfony/test
Advanced usage
Create your ruleset my-ruleset.xml
<!-- my-ruleset.xml --> <?xml version="1.0"?> <ruleset name="MyCustomCheckStyleStandard"> <description>My custom check style standard based on Norsys</description> <!-- Add Norsys rules --> <rule ref="vendor/norsys/php-coding-standard/php"/> <!-- Your custom rules --> ... </ruleset>
Launch phpcs
with your ruleset
bin/phpcs --standard=my-ruleset.xml
Credits
Developped by Norsys
License
This project is licensed under the MIT license.