-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathphpstan.neon
More file actions
98 lines (76 loc) · 4.05 KB
/
Copy pathphpstan.neon
File metadata and controls
98 lines (76 loc) · 4.05 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
parameters:
level: 8
# reportUnmatchedIgnoredErrors: false
# requires exact closure types
checkMissingCallableSignature: true
# symplify - see https://github.com/symplify/phpstan-rules#usage
pathStrings: true
paths:
- packages
- src
- tests
- ecs.php
- rector.php
excludePaths:
- scoper.php
# tests
- '*/Source/*'
- '*/Fixture/*'
# 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: 94.4
property: 99
bootstrapFiles:
- tests/bootstrap.php
treatPhpDocTypesAsCertain: true
ignoreErrors:
# set above
-
path: src/Parallel/Application/ParallelFileProcessor.php
message: '#Cannot call method (.*?)\(\) on Symplify\\EasyParallel\\ValueObject\\ProcessPool\|null#'
- '#Method Symplify\\EasyCodingStandard\\Application\\SingleFileProcessor\:\:processFilePath\(\) should return array\{file_diffs\?\: array<Symplify\\EasyCodingStandard\\ValueObject\\Error\\FileDiff>, coding_standard_errors\?\: array<Symplify\\EasyCodingStandard\\SniffRunner\\ValueObject\\Error\\CodingStandardError>\} but returns array<(.*?), array<Symplify\\EasyCodingStandard\\SniffRunner\\ValueObject\\Error\\CodingStandardError\|Symplify\\EasyCodingStandard\\ValueObject\\Error\\FileDiff>>#'
# false positive on custom config tets
-
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
# testing instance of on purpose
-
message: '#Call to method PHPUnit\\Framework\\Assert\:\:assertInstanceOf#'
path: tests/*
# overly detailed
- '#PHPDoc tag @var with type string\|false is not subtype of native type non\-empty\-string\|false#'
# array validation on purpose
- '#Call to static method Webmozart\\Assert\\Assert\:\:allString\(\) with (non-empty-array|list|array)<string> will always evaluate to true#'
- '#Call to static method Webmozart\\Assert\\Assert\:\:allIsArray\(\) with array<class\-string<PHP_CodeSniffer\\Sniffs\\Sniff\|PhpCsFixer\\Fixer\\FixerInterface>, array<mixed>> will always evaluate to true#'
# hack to autoload contants
- '#Call to new PHP_CodeSniffer\\Util\\Tokens\(\) on a separate line has no effect#'
# php version condition
-
identifier: smaller.alwaysFalse
path: src/Configuration/ConfigInitializer.php
# false positive
-
identifier: offsetAssign.dimType
path: src/Console/Output/JsonOutputFormatter.php
# coding-standard: runtime-defined PHP_CodeSniffer/php-cs-fixer token constants
- '#Constant T_OPEN_CURLY_BRACKET|T_START_NOWDOC not found#'
# coding-standard: php-cs-fixer interface generics intentionally left unspecified
- '#Class (.*?) implements generic interface PhpCsFixer\\Fixer\\ConfigurableFixerInterface but does not specify its types\: TFixerInputConfig, TFixerComputedConfig#'
# 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
# coding-standard: intentional null removal
-
message: '#Parameter \#1 \$array \(array<int, PhpCsFixer\\Tokenizer\\Token>\) to function array_filter does not contain falsy values, the array will always stay the same#'
path: packages/coding-standard/src/TokenRunner/Traverser/TokenReverser.php