|
| 1 | +<?xml version="1.0"?> |
| 2 | +<ruleset name="PeckaDesign"> |
| 3 | + <config name="installed_paths" value="../../slevomat/coding-standard"/> |
| 4 | + |
| 5 | + <arg value="n"/> |
| 6 | + |
| 7 | + <rule ref="PSR12"> |
| 8 | + <exclude name="Generic.WhiteSpace.DisallowTabIndent"/> |
| 9 | + <exclude name="PSR12.Files.DeclareStatement"/> |
| 10 | + <exclude name="PSR12.Files.FileHeader"/> |
| 11 | + <exclude name="PSR12.Files.OpenTag"/> |
| 12 | + <exclude name="PSR12.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace"/> |
| 13 | + <exclude name="Squiz.Functions.MultiLineFunctionDeclaration.NewlineBeforeOpenBrace"/> |
| 14 | + </rule> |
| 15 | + |
| 16 | + <!-- TypeHints --> |
| 17 | + <rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"> |
| 18 | + <properties> |
| 19 | + <property name="declareOnFirstLine" value="true"/> |
| 20 | + <property name="linesCountAfterDeclare" value="1"/> |
| 21 | + <property name="spacesCountAroundEqualsSign" value="1"/> |
| 22 | + </properties> |
| 23 | + </rule> |
| 24 | + |
| 25 | + <!-- Arrays --> |
| 26 | + <rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/> |
| 27 | + |
| 28 | + <!-- Classes --> |
| 29 | + <rule ref="Generic.Classes.DuplicateClassName"/> |
| 30 | + <rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference"/> |
| 31 | + <rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/> |
| 32 | + <rule ref="SlevomatCodingStandard.Classes.PropertySpacing"> |
| 33 | + <properties> |
| 34 | + <property name="minLinesCountBeforeWithComment" value="1"/> |
| 35 | + <property name="maxLinesCountBeforeWithComment" value="1"/> |
| 36 | + <property name="minLinesCountBeforeWithoutComment" value="1"/> |
| 37 | + <property name="maxLinesCountBeforeWithoutComment" value="1"/> |
| 38 | + </properties> |
| 39 | + </rule> |
| 40 | + <rule ref="SlevomatCodingStandard.Classes.MethodSpacing"> |
| 41 | + <properties> |
| 42 | + <property name="minLinesCount" value="2"/> |
| 43 | + <property name="maxLinesCount" value="2"/> |
| 44 | + </properties> |
| 45 | + </rule> |
| 46 | + <rule ref="SlevomatCodingStandard.Classes.ClassMemberSpacing"> |
| 47 | + <properties> |
| 48 | + <property name="linesCountBetweenMembers" value="2"/> |
| 49 | + </properties> |
| 50 | + </rule> |
| 51 | + |
| 52 | + <!-- Namespaces --> |
| 53 | + <rule ref="SlevomatCodingStandard.Namespaces.NamespaceSpacing"> |
| 54 | + <properties> |
| 55 | + <property name="linesCountBeforeNamespace" value="1"/> |
| 56 | + <property name="linesCountAfterNamespace" value="1"/> |
| 57 | + </properties> |
| 58 | + </rule> |
| 59 | + <rule ref="SlevomatCodingStandard.Namespaces.UseSpacing"> |
| 60 | + <properties> |
| 61 | + <property name="linesCountBeforeFirstUse" value="1"/> |
| 62 | + <property name="linesCountBetweenUseTypes" value="1"/> |
| 63 | + <property name="linesCountAfterLastUse" value="1"/> |
| 64 | + </properties> |
| 65 | + </rule> |
| 66 | + |
| 67 | + <!-- ControlStructures --> |
| 68 | + <rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition" /> |
| 69 | + <rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison"/> |
| 70 | + <rule ref="SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing"> |
| 71 | + <properties> |
| 72 | + <property name="jumpStatements" type="array"> |
| 73 | + <element value="return"/> |
| 74 | + </property> |
| 75 | + </properties> |
| 76 | + </rule> |
| 77 | + |
| 78 | + <!-- Exceptions --> |
| 79 | + <rule ref="SlevomatCodingStandard.Exceptions.DeadCatch"/> |
| 80 | + |
| 81 | + <!-- Functions --> |
| 82 | + <rule ref="SlevomatCodingStandard.Functions.StaticClosure"/> |
| 83 | + <rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInCall"/> |
| 84 | + <rule ref="SlevomatCodingStandard.Functions.ArrowFunctionDeclaration"> |
| 85 | + <properties> |
| 86 | + <property name="spacesCountAfterKeyword" value="1"/> |
| 87 | + <property name="spacesCountBeforeArrow" value="1"/> |
| 88 | + <property name="spacesCountAfterArrow" value="1"/> |
| 89 | + <property name="allowMultiLine" value="true"/> |
| 90 | + </properties> |
| 91 | + </rule> |
| 92 | + |
| 93 | + <!-- Namespaces --> |
| 94 | + <rule ref="SlevomatCodingStandard.Namespaces.UnusedUses"> |
| 95 | + <properties> |
| 96 | + <property name="searchAnnotations" value="1"/> |
| 97 | + </properties> |
| 98 | + </rule> |
| 99 | + <rule ref="SlevomatCodingStandard.Namespaces.MultipleUsesPerLine"/> |
| 100 | + <rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/> |
| 101 | + |
| 102 | + <!-- PHP --> |
| 103 | + <rule ref="Generic.PHP.DeprecatedFunctions"/> |
| 104 | + <rule ref="Generic.PHP.ForbiddenFunctions"/> |
| 105 | + <rule ref="Generic.PHP.CharacterBeforePHPOpeningTag"/> |
| 106 | + |
| 107 | + <!-- WhiteSpace --> |
| 108 | + <rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/> |
| 109 | + |
| 110 | + <!-- Formatting --> |
| 111 | + <rule ref="Generic.Formatting.SpaceAfterCast"/> |
| 112 | + <rule ref="Generic.Formatting.SpaceAfterNot"> |
| 113 | + <properties> |
| 114 | + <property name="spacing" value="1" /> |
| 115 | + </properties> |
| 116 | + </rule> |
| 117 | + |
| 118 | + <!-- Variables --> |
| 119 | + <rule ref="SlevomatCodingStandard.Variables.UnusedVariable"> |
| 120 | + <properties> |
| 121 | + <property name="ignoreUnusedValuesWhenOnlyKeysAreUsedInForeach" value="true" /> |
| 122 | + </properties> |
| 123 | + </rule> |
| 124 | + |
| 125 | + <!-- Operators --> |
| 126 | + <rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/> |
| 127 | +</ruleset> |
0 commit comments