1<?xml version="1.0"?> 2<ruleset name="Custom ruleset"> 3 <description>Mikio for PHP CodeSniffer</description> 4 5 <file>conf</file> 6 <file>icons/icons.php</file> 7 <file>lang</file> 8 <file>css.php</file> 9 <file>detail.php</file> 10 <file>main.php</file> 11 <file>mediamanager.php</file> 12 <file>mikio.php</file> 13 14 <exclude-pattern>*/.gitignore</exclude-pattern> 15 <exclude-pattern>*/*.css</exclude-pattern> 16 <exclude-pattern>*/*.js</exclude-pattern> 17 <exclude-pattern>*/*.ini</exclude-pattern> 18 <exclude-pattern>*/*.md</exclude-pattern> 19 <exclude-pattern>*/*.txt</exclude-pattern> 20 <exclude-pattern>*/*.xml</exclude-pattern> 21 22 <arg name="colors" /> 23 <arg value="p" /> 24 25 <ini name="memory_limit" value="128M" /> 26 27 <!-- PHPCompatibility --> 28 <!-- <rule ref="PHPCompatibility"> 29 <config name="testVersion" value="5.6-" /> 30 </rule> --> 31 32 <!-- Use PSR12 --> 33 <rule ref="PSR12"> 34 <exclude name="PSR12.Files.FileHeader.SpacingInsideBlock" /> 35 </rule> 36 37 <!-- Use PSR1 --> 38 <rule ref="PSR1"> 39 <exclude name="PSR1.Files.SideEffects" /> 40 </rule> 41 42 <!-- Ban some functions --> 43 <rule ref="Generic.PHP.ForbiddenFunctions"> 44 <properties> 45 <property name="forbiddenFunctions" type="array"> 46 <element key="sizeof" value="count" /> 47 <element key="delete" value="unset" /> 48 <element key="print" value="echo" /> 49 <element key="is_null" value="null" /> 50 <element key="create_function" value="null" /> 51 </property> 52 </properties> 53 </rule> 54 55 <!-- Private methods MUST not be prefixed with an underscore --> 56 <rule ref="PSR2.Methods.MethodDeclaration.Underscore"> 57 <type>error</type> 58 </rule> 59 60 <!-- Private properties MUST not be prefixed with an underscore --> 61 <rule ref="PSR2.Classes.PropertyDeclaration.Underscore"> 62 <type>error</type> 63 </rule> 64 65 <!-- We use custom indent rules for arrays --> 66 <rule ref="Generic.Arrays.ArrayIndent" /> 67 <rule ref="Squiz.Arrays.ArrayDeclaration.KeyNotAligned"> 68 <severity>0</severity> 69 </rule> 70 <rule ref="Squiz.Arrays.ArrayDeclaration.ValueNotAligned"> 71 <severity>0</severity> 72 </rule> 73 <rule ref="Squiz.Arrays.ArrayDeclaration.CloseBraceNotAligned"> 74 <severity>0</severity> 75 </rule> 76 <rule ref="Squiz.Arrays.ArrayDeclaration.CloseBraceNewLine"> 77 <severity>0</severity> 78 </rule> 79 80 <!-- Include some sniffs from other standards that don't conflict with PEAR --> 81 <rule ref="Squiz.Arrays.ArrayBracketSpacing" /> 82 <rule ref="Squiz.Arrays.ArrayDeclaration" /> 83 <!-- <rule ref="Squiz.Commenting.ClosingDeclarationComment" /> --> 84 <rule ref="Squiz.ControlStructures.ControlSignature" /> 85 <!-- <rule ref="Squiz.ControlStructures.ElseIfDeclaration" /> --> 86 <!-- <rule ref="Squiz.Commenting.BlockComment" /> --> 87 <rule ref="Squiz.Commenting.DocCommentAlignment" /> 88 <rule ref="Squiz.Commenting.EmptyCatchComment" /> 89 <!-- <rule ref="Squiz.Commenting.InlineComment" /> --> 90 <rule ref="Squiz.Commenting.LongConditionClosingComment" /> 91 <!-- <rule ref="Squiz.Commenting.PostStatementComment" /> --> 92 <rule ref="Squiz.Commenting.VariableComment" /> 93 <rule ref="Squiz.Commenting.FunctionComment" /> 94 <rule ref="Squiz.Formatting.OperatorBracket" /> 95 <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing" /> 96 <rule ref="Squiz.Operators.ComparisonOperatorUsage" /> 97 <!-- <rule ref="Squiz.PHP.DisallowInlineIf" /> --> 98 <rule ref="Squiz.Scope.MethodScope" /> 99 <!-- <rule ref="Squiz.Strings.ConcatenationSpacing" /> --> 100 <rule ref="Squiz.WhiteSpace.ControlStructureSpacing" /> 101 <!-- <rule ref="Squiz.WhiteSpace.FunctionClosingBraceSpace" /> --> 102 <rule ref="Squiz.WhiteSpace.FunctionSpacing.Before" /> 103 <!-- <rule ref="Squiz.WhiteSpace.MemberVarSpacing" /> --> 104 <rule ref="Squiz.WhiteSpace.OperatorSpacing" /> 105 <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace" /> 106 <rule ref="Generic.Arrays.DisallowLongArraySyntax" /> 107 <rule ref="Generic.Commenting.Todo" /> 108 <rule ref="Generic.Commenting.Fixme" /> 109 <rule ref="Generic.ControlStructures.DisallowYodaConditions" /> 110 <rule ref="Generic.ControlStructures.InlineControlStructure" /> 111 <rule ref="Generic.Formatting.DisallowMultipleStatements" /> 112 <rule ref="Generic.Formatting.SpaceAfterCast" /> 113 <rule ref="Generic.NamingConventions.ConstructorName" /> 114 <rule ref="Generic.PHP.DeprecatedFunctions" /> 115 <rule ref="Generic.PHP.LowerCaseKeyword" /> 116 <rule ref="Generic.Strings.UnnecessaryStringConcat" /> 117 <rule ref="Generic.WhiteSpace.IncrementDecrementSpacing" /> 118 <rule ref="PSR2.Classes.PropertyDeclaration" /> 119 <rule ref="PSR2.Methods.MethodDeclaration" /> 120 <!-- <rule ref="PSR2.Files.EndFileNewline" /> --> 121 <rule ref="Zend.Files.ClosingTag" /> 122</ruleset>