-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
phpstan.neon
47 lines (35 loc) · 2.02 KB
/
phpstan.neon
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
includes:
- config/services/services.neon
- config/naming-rules.neon
parameters:
treatPhpDocTypesAsCertain: false
errorFormat: symplify
level: 8
paths:
- src
- config
- tests
excludePaths:
# parallel
- packages/*-phpstan-printer/tests/*ToPhpCompiler/Fixture*
# tests
- '*/tests/**/Source/*'
- */stubs/*
- */Fixture/*
ignoreErrors:
- '#Method Symplify\\PHPStanRules\\Reflection\\ReflectionParser\:\:parseNativeClassReflection\(\) has parameter \$reflectionClass with generic class ReflectionClass but does not specify its types\: T#'
# overly detailed
- '#Class Symplify\\PHPStanRules\\(.*?) extends generic class PHPStan\\Testing\\RuleTestCase but does not specify its types\: TRule#'
- '#Method Symplify\\PHPStanRules\\(.*?)\:\:getRule\(\) return type with generic interface PHPStan\\Rules\\Rule does not specify its types\: TNodeType#'
- '#Parameter \#2 \$expectedErrors of method PHPStan\\Testing\\RuleTestCase<PHPStan\\Rules\\Rule>\:\:analyse\(\) expects list<array\{0\: string, 1\: int, 2\?\: string\|null\}>, (.*?) given#'
# part of public contract
- '#Method Symplify\\PHPStanRules\\Tests\\Rules\\(.*?)\\(.*?)Test\:\:testRule\(\) has parameter \$(expectedError(.*?)|expectedErrors) with no value type specified in iterable type array#'
# useful to have IDE know the types
- identifier: phpstanApi.instanceofType
# fast effective check
-
message: '#Function is_a\(\) is a runtime reflection concept that might not work in PHPStan because it uses fully static reflection engine#'
path: src/Rules/SeeAnnotationToTestRule.php
# used in tests
- '#Public constant "Symplify\\PHPStanRules\\(.*?)Rule\:\:ERROR_MESSAGE" is never used#'
- '#Although PHPStan\\Node\\InClassNode is covered by backward compatibility promise, this instanceof assumption might break because (.*?) not guaranteed to always stay the same#'