-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathphpstan.neon
More file actions
86 lines (66 loc) · 3.29 KB
/
phpstan.neon
File metadata and controls
86 lines (66 loc) · 3.29 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
parameters:
level: 8
reportUnmatchedIgnoredErrors: false
# requires exact closure types
checkMissingCallableSignature: true
paths:
- 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\\Console\\Command\\ListCheckersCommand\:\:getObjectClasses\(\) should return (.*?)#'
- '#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
# optional
-
message: '#Method Symplify\\EasyCodingStandard\\Config\\ECSConfig\:\:singleton\(\) has parameter \$concrete with no signature specified for Closure#'
path: src/Config/ECSConfig.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