mathroc / php-coding-standard

ProtonLabs Coding Standard for PHP_CodeSniffer (extending PSR12)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Proton PHP Coding Standards

PHP from Packagist Packagist Version

Installation & Usage

Install the package with composer

composer req protonlabs/php-coding-standard --dev

To use it in your phpcs xml, add a rule pointing to the ruleset.xml

<?xml version="1.0"?>
<ruleset name="ProtonLabs PHP CodeSniffer Standard">
    <!-- Proton Coding Standard – https://github.com/ProtonMail/php-coding-standard -->
    <rule ref="vendor/protonlabs/php-coding-standard/Proton/ruleset.xml">
        <!-- sniffs to exclude -->
        <!-- <exclude name="SlevomatCodingStandard.PHP.UselessParentheses"/> -->
    </rule>

    <exclude-pattern>*/vendor/*</exclude-pattern>
</ruleset>

About

ProtonLabs Coding Standard for PHP_CodeSniffer (extending PSR12)

License:MIT License


Languages

Language:PHP 100.0%