-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.tests.neon
More file actions
44 lines (37 loc) · 1.59 KB
/
phpstan.tests.neon
File metadata and controls
44 lines (37 loc) · 1.59 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
includes:
- phpstan.common.neon
parameters:
resultCachePath: '%tmpDir%/resultCache-tests.php'
level: 6
paths:
- tests
scanDirectories:
- src
# Test-specific relaxed rules
checkMissingCallableSignature: false
checkExplicitMixedMissingReturn: false
treatPhpDocTypesAsCertain: false
polluteScopeWithLoopInitialAssignments: false
polluteScopeWithAlwaysIterableForeach: false
# Exception handling - relaxed for tests
exceptions:
check:
missingCheckedExceptionInThrows: false
tooWideThrowType: false
implicitThrows: false
# Ignore common test patterns that are acceptable
ignoreErrors:
# Unresolvable native types (intersection types with MockObject)
- '#Property .* has unresolvable native type#'
- '#Return type of call to method .* contains unresolvable type#'
- '#Parameter .* contains unresolvable type#'
# Named arguments in PHPUnit (not allowed in some cases)
- '#Method .* invoked with named argument .*, but it''s not allowed because of @no-named-arguments#'
# Test configuration array type mismatches (acceptable in tests)
- '#Parameter .* of method .* expects .*, array\{.*\} given#'
- '#Parameter .* of class .* constructor expects .*, array\{.*\} given#'
# Mock comparison patterns
- '#Strict comparison using === between .* and .*MockObject.* will always evaluate to false#'
# Exclude files with anonymous class readonly issues
excludePaths:
- tests/Unit/Storage/AbstractPromptStorageTest.php