norsys/php-coding-standard

Coding standard to Norsys PHP projects

1.0.1 2018-03-06 14:04 UTC

This package is auto-updated.

Last update: 2024-04-28 08:16:06 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.

License