Skip to content

ProtonLabs Coding Standard for PHP_CodeSniffer (extending PER coding style)

License

Notifications You must be signed in to change notification settings

ProtonMail/php-coding-standard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>