PSR-2 PHP_CodeSniffer Config

# phpcs.xml, this file must be under project root folder.

<?xml version="1.0"?>
<ruleset name="Basic Project Coding Standards">
    <rule ref="PSR2" />

    <!-- extra rules for the laugh ;-) LOL -->
    <rule ref="Generic.CodeAnalysis.EmptyStatement" />
    <rule ref="Generic.Classes.DuplicateClassName"/>
    <rule ref="Generic.CodeAnalysis.EmptyStatement"/>
    <rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
    <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
    <rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
    <rule ref="Generic.ControlStructures.InlineControlStructure"/>
    <rule ref="Squiz.PHP.NonExecutableCode"/>

    <file>./src</file>
    <file>./test</file>
</ruleset>

 

Views: 142