Skip to content

Instantly share code, notes, and snippets.

Forked from Ovsyanka/ruleset.xml
Last active May 19, 2021 14:17
What would you like to do?
PHPCS rules for PSR2 with tabs, same-line braces, and missing variable detection
<?xml version="1.0"?>
<ruleset name="PaytonsStandard">
Originally from
PSR2 with changes:
- tabs instead of spaces (
- bracers on end of line instead new line
- unused/undefined variable detection (
<arg name="tab-width" value="4"/>
<rule ref="PSR2">
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
<exclude name="PSR2.Classes.ClassDeclaration.OpenBraceNewLine" />
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<property name="indent" value="4"/>
<property name="tabIndent" value="true"/>
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie" />
<rule ref="Generic.Classes.OpeningBraceSameLine"/>
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment