2022-09-02 10:15:13 +10:00

122 lines
4.8 KiB
XML

<?xml version="1.0"?>
<ruleset name="Custom ruleset">
<description>Mikio for PHP CodeSniffer</description>
<file>conf</file>
<file>icons/icons.php</file>
<file>lang</file>
<file>css.php</file>
<file>detail.php</file>
<file>main.php</file>
<file>mediamanager.php</file>
<file>mikio.php</file>
<exclude-pattern>*/.gitignore</exclude-pattern>
<exclude-pattern>*/*.css</exclude-pattern>
<exclude-pattern>*/*.js</exclude-pattern>
<exclude-pattern>*/*.ini</exclude-pattern>
<exclude-pattern>*/*.md</exclude-pattern>
<exclude-pattern>*/*.txt</exclude-pattern>
<exclude-pattern>*/*.xml</exclude-pattern>
<arg name="colors" />
<arg value="p" />
<ini name="memory_limit" value="128M" />
<!-- PHPCompatibility -->
<!-- <rule ref="PHPCompatibility">
<config name="testVersion" value="5.6-" />
</rule> -->
<!-- Use PSR12 -->
<rule ref="PSR12">
<exclude name="PSR12.Files.FileHeader.SpacingInsideBlock" />
</rule>
<!-- Use PSR1 -->
<rule ref="PSR1">
<exclude name="PSR1.Files.SideEffects" />
</rule>
<!-- Ban some functions -->
<rule ref="Generic.PHP.ForbiddenFunctions">
<properties>
<property name="forbiddenFunctions" type="array">
<element key="sizeof" value="count" />
<element key="delete" value="unset" />
<element key="print" value="echo" />
<element key="is_null" value="null" />
<element key="create_function" value="null" />
</property>
</properties>
</rule>
<!-- Private methods MUST not be prefixed with an underscore -->
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
<type>error</type>
</rule>
<!-- Private properties MUST not be prefixed with an underscore -->
<rule ref="PSR2.Classes.PropertyDeclaration.Underscore">
<type>error</type>
</rule>
<!-- We use custom indent rules for arrays -->
<rule ref="Generic.Arrays.ArrayIndent" />
<rule ref="Squiz.Arrays.ArrayDeclaration.KeyNotAligned">
<severity>0</severity>
</rule>
<rule ref="Squiz.Arrays.ArrayDeclaration.ValueNotAligned">
<severity>0</severity>
</rule>
<rule ref="Squiz.Arrays.ArrayDeclaration.CloseBraceNotAligned">
<severity>0</severity>
</rule>
<rule ref="Squiz.Arrays.ArrayDeclaration.CloseBraceNewLine">
<severity>0</severity>
</rule>
<!-- Include some sniffs from other standards that don't conflict with PEAR -->
<rule ref="Squiz.Arrays.ArrayBracketSpacing" />
<rule ref="Squiz.Arrays.ArrayDeclaration" />
<!-- <rule ref="Squiz.Commenting.ClosingDeclarationComment" /> -->
<rule ref="Squiz.ControlStructures.ControlSignature" />
<!-- <rule ref="Squiz.ControlStructures.ElseIfDeclaration" /> -->
<!-- <rule ref="Squiz.Commenting.BlockComment" /> -->
<rule ref="Squiz.Commenting.DocCommentAlignment" />
<rule ref="Squiz.Commenting.EmptyCatchComment" />
<!-- <rule ref="Squiz.Commenting.InlineComment" /> -->
<rule ref="Squiz.Commenting.LongConditionClosingComment" />
<!-- <rule ref="Squiz.Commenting.PostStatementComment" /> -->
<rule ref="Squiz.Commenting.VariableComment" />
<rule ref="Squiz.Commenting.FunctionComment" />
<rule ref="Squiz.Formatting.OperatorBracket" />
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing" />
<rule ref="Squiz.Operators.ComparisonOperatorUsage" />
<!-- <rule ref="Squiz.PHP.DisallowInlineIf" /> -->
<rule ref="Squiz.Scope.MethodScope" />
<!-- <rule ref="Squiz.Strings.ConcatenationSpacing" /> -->
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing" />
<!-- <rule ref="Squiz.WhiteSpace.FunctionClosingBraceSpace" /> -->
<rule ref="Squiz.WhiteSpace.FunctionSpacing.Before" />
<!-- <rule ref="Squiz.WhiteSpace.MemberVarSpacing" /> -->
<rule ref="Squiz.WhiteSpace.OperatorSpacing" />
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" />
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
<rule ref="Generic.Commenting.Todo" />
<rule ref="Generic.Commenting.Fixme" />
<rule ref="Generic.ControlStructures.DisallowYodaConditions" />
<rule ref="Generic.ControlStructures.InlineControlStructure" />
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
<rule ref="Generic.Formatting.SpaceAfterCast" />
<rule ref="Generic.NamingConventions.ConstructorName" />
<rule ref="Generic.PHP.DeprecatedFunctions" />
<rule ref="Generic.PHP.LowerCaseKeyword" />
<rule ref="Generic.Strings.UnnecessaryStringConcat" />
<rule ref="Generic.WhiteSpace.IncrementDecrementSpacing" />
<rule ref="PSR2.Classes.PropertyDeclaration" />
<rule ref="PSR2.Methods.MethodDeclaration" />
<!-- <rule ref="PSR2.Files.EndFileNewline" /> -->
<rule ref="Zend.Files.ClosingTag" />
</ruleset>