Skip to content

Instantly share code, notes, and snippets.

@dionedomingo
Created February 5, 2020 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dionedomingo/7e013b34590ce844a81db1f5282de34d to your computer and use it in GitHub Desktop.
Save dionedomingo/7e013b34590ce844a81db1f5282de34d to your computer and use it in GitHub Desktop.
Iposen CodeSniffer Codeing standard ruleset for VSCode and PHPStorm
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_iPosen" xsi:noNamespaceSchemaLocation="../../../phpcs.xsd">
<description>The PHP_iPosen coding standard builds on the Squiz coding standard.</description>
<!-- Include the whole Squiz standard except FunctionComment, which we override -->
<rule ref="Squiz">
<exclude name="Squiz.Files.FileExtension.ClassFound"/>
<exclude name="Squiz.NamingConventions.ValidVariableName.NotCamelCaps"/>
<exclude name="Squiz.Commenting.ClosingDeclarationComment.Missing" />
</rule>
<!-- Private properties MUST not be prefixed with an underscore -->
<rule ref="PSR2.Classes.PropertyDeclaration.Underscore">
<type>error</type>
</rule>
<!-- Private methods MUST not be prefixed with an underscore -->
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
<type>error</type>
</rule>
<rule ref="PSR2">
<exclude name="PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose"/>
<exclude name="Generic.Files.LineLength"/>
<exclude name="Generic.WhiteSpace.DisallowTabIndent.TabsUsed"/>
</rule>
</ruleset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment