|
8 | 8 | <file>src</file>
|
9 | 9 | <file>tests</file>
|
10 | 10 |
|
| 11 | + <config name="installed_paths" value="../../slevomat/coding-standard"/> |
| 12 | + |
11 | 13 | <arg value="ps"/>
|
12 | 14 | <arg name="parallel" value="8"/>
|
13 | 15 | <!--<arg name="cache" value=".build/phpcs.cache"/>-->
|
|
20 | 22 | <type>error</type>
|
21 | 23 | </rule>
|
22 | 24 |
|
| 25 | + <!-- |
| 26 | + Slevomat https://github.com/slevomat/coding-standard |
| 27 | + --> |
| 28 | + |
| 29 | + <rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/> |
| 30 | + <rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation"/> |
| 31 | + <rule ref="SlevomatCodingStandard.Arrays.DisallowPartiallyKeyed"/> |
| 32 | + |
| 33 | + <rule ref="SlevomatCodingStandard.Attributes.DisallowAttributesJoining"/> |
| 34 | + <rule ref="SlevomatCodingStandard.Attributes.DisallowMultipleAttributesPerLine"/> |
| 35 | + <rule ref="SlevomatCodingStandard.Attributes.RequireAttributeAfterDocComment"/> |
| 36 | + |
| 37 | + <rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/> |
| 38 | + <rule ref="SlevomatCodingStandard.Classes.DisallowConstructorPropertyPromotion"/> |
| 39 | + <rule ref="SlevomatCodingStandard.Classes.ForbiddenPublicProperty"/> |
| 40 | + <rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference"/> |
| 41 | + |
| 42 | + <rule ref="SlevomatCodingStandard.Commenting.DeprecatedAnnotationDeclaration"/> |
| 43 | + <rule ref="SlevomatCodingStandard.Commenting.EmptyComment"/> |
| 44 | + <rule ref="SlevomatCodingStandard.Commenting.UselessFunctionDocComment"/> |
| 45 | + <rule ref="SlevomatCodingStandard.Commenting.UselessInheritDocComment"/> |
| 46 | + |
| 47 | + <rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/> |
| 48 | + <rule ref="SlevomatCodingStandard.ControlStructures.DisallowContinueWithoutIntegerOperandInSwitch"/> |
| 49 | + <rule ref="SlevomatCodingStandard.ControlStructures.DisallowShortTernaryOperator"/> |
| 50 | + <rule ref="SlevomatCodingStandard.ControlStructures.DisallowTrailingMultiLineTernaryOperator"/> |
| 51 | + <rule ref="SlevomatCodingStandard.ControlStructures.NewWithoutParentheses"/> |
| 52 | + <rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator"/> |
| 53 | + <rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator"/> |
| 54 | + <rule ref="SlevomatCodingStandard.ControlStructures.RequireNullSafeObjectOperator"/> |
| 55 | + <rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison"/> |
| 56 | + <rule ref="SlevomatCodingStandard.ControlStructures.UselessTernaryOperator"/> |
| 57 | + |
| 58 | + <rule ref="SlevomatCodingStandard.Exceptions.RequireNonCapturingCatch"/> |
| 59 | + |
| 60 | + <rule ref="SlevomatCodingStandard.Functions.DisallowEmptyFunction"/> |
| 61 | + <rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInCall"/> |
| 62 | + <rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration"/> |
| 63 | + <rule ref="SlevomatCodingStandard.Functions.StrictCall"/> |
| 64 | + |
| 65 | + <rule ref="SlevomatCodingStandard.Namespaces.RequireOneNamespaceInFile"/> |
| 66 | + <rule ref="SlevomatCodingStandard.Namespaces.UseDoesNotStartWithBackslash"/> |
| 67 | + <rule ref="SlevomatCodingStandard.Namespaces.UselessAlias"/> |
| 68 | + <rule ref="SlevomatCodingStandard.Namespaces.UnusedUses"/> |
| 69 | + |
| 70 | + <rule ref="SlevomatCodingStandard.Numbers.DisallowNumericLiteralSeparator"/> |
| 71 | + |
| 72 | + <rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/> |
| 73 | + <rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/> |
| 74 | + |
| 75 | + <rule ref="SlevomatCodingStandard.PHP.OptimizedFunctionsWithoutUnpacking"/> |
| 76 | + <rule ref="SlevomatCodingStandard.PHP.ShortList"/> |
| 77 | + <rule ref="SlevomatCodingStandard.PHP.TypeCast"/> |
| 78 | + <rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/> |
| 79 | + |
| 80 | + <rule ref="SlevomatCodingStandard.Strings.DisallowVariableParsing"/> |
| 81 | + |
| 82 | + <!--<rule ref="SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint"/>--> |
| 83 | + <rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints"/> |
| 84 | + <rule ref="SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition"/> |
| 85 | + <rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/> |
| 86 | + <rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint"/> |
| 87 | + <rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint"/> |
| 88 | + |
| 89 | + <!--<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"/>--> |
| 90 | + |
| 91 | + <rule ref="SlevomatCodingStandard.Variables.DisallowVariableVariable"/> |
| 92 | + <rule ref="SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable"/> |
| 93 | + <rule ref="SlevomatCodingStandard.Variables.UselessVariable"/> |
| 94 | + |
| 95 | + <rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"> |
| 96 | + <properties> |
| 97 | + <property name="linesCountBeforeDeclare" value="0"/> |
| 98 | + <property name="linesCountAfterDeclare" value="1"/> |
| 99 | + <property name="spacesCountAroundEqualsSign" value="0"/> |
| 100 | + </properties> |
| 101 | + </rule> |
| 102 | + |
| 103 | + <rule ref="SlevomatCodingStandard.Functions.RequireMultiLineCall"> |
| 104 | + <properties> |
| 105 | + <property name="minLineLength" value="131"/> |
| 106 | + </properties> |
| 107 | + </rule> |
| 108 | + |
| 109 | + <rule ref="SlevomatCodingStandard.Variables.DisallowSuperGlobalVariable"> |
| 110 | + <exclude-pattern>examples</exclude-pattern> |
| 111 | + <exclude-pattern>src/Storage/SessionStorage.php</exclude-pattern> |
| 112 | + <exclude-pattern>tests/Storage/SessionStorageTest.php</exclude-pattern> |
| 113 | + </rule> |
| 114 | + |
| 115 | + <rule ref="SlevomatCodingStandard.TypeHints.UnionTypeHintFormat"> |
| 116 | + <properties> |
| 117 | + <property name="withSpaces" value="no"/> |
| 118 | + <property name="shortNullable" value="no"/> |
| 119 | + <property name="nullPosition" value="last"/> |
| 120 | + </properties> |
| 121 | + </rule> |
| 122 | + |
| 123 | + <rule ref="SlevomatCodingStandard.Variables.UnusedVariable"> |
| 124 | + <properties> |
| 125 | + <property name="ignoreUnusedValuesWhenOnlyKeysAreUsedInForeach" value="true"/> |
| 126 | + </properties> |
| 127 | + <exclude-pattern>examples</exclude-pattern> |
| 128 | + </rule> |
| 129 | + |
| 130 | + |
23 | 131 | <!--
|
24 | 132 | PHPCS built-in https://tentyp.dev/library/php/phpcs/
|
25 | 133 | -->
|
|
0 commit comments