Repository navigation
Expand file tree
/
Copy pathphpstan.neon
More file actions
101 lines (85 loc) · 3.42 KB
/
Copy pathphpstan.neon
File metadata and controls
101 lines (85 loc) · 3.42 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
parameters:
level: 8
paths:
- bin/ecs.php
- packages
- src
- tests
- ecs.php
- rector.php
excludePaths:
- scoper.php
# tests
- '*/Source/*'
- '*/Fixture/*'
# see https://github.com/symplify/phpstan-rules#usage
symplify:
pathStrings: true
# enabled by default
naming: true
complexity: true
configurable: true
static: true
symfony: true
symfonyConfig: true
doctrine: true
phpunit: true
mocks: true
ctor: true
# see https://github.com/tomasVotruba/unused-public
unused_public:
methods: true
properties: true
constants: true
# see https://github.com/TomasVotruba/type-coverage
type_coverage:
return: 99
param: 99
property: 99
bootstrapFiles:
- tests/bootstrap.php
errorFormat: symplify
treatPhpDocTypesAsCertain: false
ignoreErrors:
# on purpose to override a config
-
message: '#Missing call to parent\:\:setUp\(\) method#'
paths:
- tests/Skipper/Skipper/Skipper/SkipperTest.php
- tests/Skipper/Skipper/Skip/SkipSkipperTest.php
- tests/Skipper/SkipCriteriaResolver/SkippedPathsResolver/SkippedPathsResolverTest.php
- src/Testing/PHPUnit/AbstractCheckerTestCase.php
# intentional: hack to autoload contants
- '#Call to new PHP_CodeSniffer\\Util\\Tokens\(\) on a separate line has no effect#'
# coding-standard: runtime-defined PHP_CodeSniffer token constants resolve differently per env
# (either "Constant ... not found" or a string leaking into an int-kind array)
-
message: '#Constant T_OPEN_CURLY_BRACKET|T_START_NOWDOC not found#'
reportUnmatched: false
-
message: '#Parameter \#1 \$possibleKind of method PhpCsFixer\\Tokenizer\\Token\:\:isGivenKind\(\) expects int\|list<int>, array\{.*PHPCS_T_OPEN_CURLY.*\} given#'
path: packages/coding-standard/src/TokenAnalyzer/NewlineAnalyzer.php
reportUnmatched: false
# coding-standard: intentional cross-version condition
-
message: '#Comparison operation ">\=" between int<\d+, \d+> and (.*?) is always true#'
path: packages/coding-standard/src/TokenAnalyzer/DocblockRelatedParamNamesResolver.php
-
identifier: smaller.alwaysFalse
path: src/Configuration/ConfigInitializer.php
# parent constructor requires a PHP_CodeSniffer Ruleset, which ECS does not use
-
identifier: symplify.noConstructorOverride
path: src/SniffRunner/ValueObject/File.php
# static::class is the late-bound class name, not a constant that can change
-
identifier: symplify.forbiddenStaticClassConstFetch
path: packages/coding-standard/src/Fixer/AbstractSymplifyFixer.php
# property_exists() is needed to read the fixer configuration
-
message: '#Function "property_exists\(\)" cannot be used/left in the code#'
path: src/Blink/BlinkConfigDumper.php
# nullable on purpose - hack to avoid running both rules together
-
identifier: symplify.noNullableServiceInConstructor
path: packages/coding-standard/src/Fixer/LineLength/LineLengthFixer.php