Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
PSR2 with tabs instead of spaces and bracers on the end of lines
<?xml version="1.0"?>
<ruleset name="MyStandard">
PSR2 with changes:
* tabs instead of spaces (
* bracers on end of line instead new line
<!-- tabs -->
<arg name="tab-width" value="4"/>
<rule ref="PSR2">
<!-- bracers -->
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
<exclude name="PSR2.Classes.ClassDeclaration.OpenBraceNewLine" />
<!-- tabs -->
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
<!-- tabs -->
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<property name="indent" value="4"/>
<property name="tabIndent" value="true"/>
<!-- bracers -->
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie" />
<rule ref="Generic.Classes.OpeningBraceSameLine"/>
Copy link

kirrie commented Mar 7, 2017

thanks for new ruleset. it works as expected for my phpcs.

Copy link

mtness commented May 15, 2017

Thank you, this is exactly what I was looking for!

Copy link

DRSDavidSoft commented Feb 23, 2018

Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment