forked from psalm/psalm-plugin-doctrine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml.dist
66 lines (59 loc) · 3.03 KB
/
phpcs.xml.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?xml version="1.0"?>
<ruleset
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"
name="doctrine-psalm-plugin">
<!-- display progress -->
<arg value="p"/>
<arg name="colors"/>
<!-- Paths to check -->
<file>src</file>
<file>stubs</file>
<file>bundle-stubs</file>
<file>tests</file>
<exclude-pattern>*/tests/_run/*</exclude-pattern>
<!-- Include full Doctrine Coding Standard -->
<rule ref="Doctrine">
<!-- inapplicable for this project -->
<exclude name="Generic.Strings.UnnecessaryStringConcat.Found" />
<exclude name="PSR2.Classes.PropertyDeclaration.Underscore" />
<exclude name="Squiz.Commenting.FunctionComment.InvalidNoReturn" />
<exclude name="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming.SuperfluousSuffix" />
<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing" />
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification" />
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint" />
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingAnyTypeHint" />
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint" />
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification" />
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint" />
<exclude name="SlevomatCodingStandard.Namespaces.UseSpacing.IncorrectLinesCountBetweenDifferentTypeOfUse" />
<exclude name="Squiz.NamingConventions.ValidVariableName.PublicHasUnderscore" />
<!-- conflicts with other rules -->
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing" /> <!-- [> PSR12.Functions.ReturnTypeDeclaration <] -->
</rule>
<!-- inherit rules from: -->
<rule ref="PSR12">
<!-- conflicts with other rules -->
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace"/>
</rule>
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Generic.Files.ByteOrderMark"/>
<rule ref="Generic.Files.LineEndings"/>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="absoluteLineLimit" value="120"/><!-- even though psr-2 specifies it as soft-limit only -->
</properties>
</rule>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.ForbiddenFunctions"/>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
<properties>
<property name="ignoreBlankLines" value="false"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Namespaces.UseSpacing.UseSpacingSniff">
<properties>
<property name="linesCountBetweenUseTypes" value="1"/>
</properties>
</rule>
</ruleset>