A common coding standard for Courierist PHP code.
It is a fork from ramsey/coding-standard. The fork is adopted and dedicated to Courierist Team.
This project adheres to a code of conduct. By participating in this project and its community, you are expected to uphold this code.
Install this package as a development dependency using Composer.
composer require --dev galsd/courierist-coding-standard dev-main
To use this coding standard, add <rule ref="Courierist"/>
to your phpcs.xml
configuration.
Here are the contents of an example phpcs.xml.dist
file that you may place in
the root of your repository:
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
<arg name="extensions" value="php"/>
<arg name="colors"/>
<arg value="sp"/>
<file>./src</file>
<file>./tests</file>
<rule ref="Courierist"/>
</ruleset>
Then, run PHP_CodeSniffer:
./vendor/bin/phpcs
Contributions are welcome! To contribute, please familiarize yourself with CONTRIBUTING.md.
The galsd/courierist-coding-standard library is copyright © Courierist Team and licensed for use under the terms of the MIT License (MIT). Please see LICENSE for more information.