-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathphpstan.neon
More file actions
61 lines (61 loc) · 2.91 KB
/
Copy pathphpstan.neon
File metadata and controls
61 lines (61 loc) · 2.91 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
parameters:
level: 4
treatPhpDocTypesAsCertain: false
tmpDir: .phpstan
paths:
- src
excludePaths:
- src/*.test.php
- src/**/*.test.php
- vendor
- reference
reportUnmatchedIgnoredErrors: false
parallel:
maximumNumberOfProcesses: 1
ignoreErrors:
# Allow dynamic array access patterns used throughout
- '#Cannot access offset .* on mixed#'
# PHPDoc type aliases not recognized
- '#invalid (return )?type TailwindPHP\\Ast\\AstNode#'
- '#invalid type TailwindPHP\\DesignSystem#'
- '#should return array<TailwindPHP\\Ast\\AstNode> but returns#'
# Functions from other files in same namespace
- '#Function .* not found#'
- '#Call to .* on an unknown class#'
- '#Constant .* not found#'
- '#static method .* not found#'
# Unused closure variables (intentional in ported code)
- '#Anonymous function has an unused use#'
# Strict comparison warnings on ported code
- '#Strict comparison using#'
# Null coalesce on arrays (intentional defensive coding)
- '#on left side of \?\? always exists#'
# Callable checks
- '#Trying to invoke null but#'
# Empty check on variable (defensive coding)
- '#Variable .* in empty\(\) always exists#'
# DefaultMap generics (complex ported pattern)
- '#does not accept TailwindPHP\\Utils\\DefaultMap#'
# Method return type issues with complex arrays
- '#should return array<string> but returns#'
# value-parser.php walk() - offset tracking via bitwise NOT changes sign
# PHPStan analyzes initial value (0) but loop modifies it
- '#Comparison operation .* between 0 and 0#'
- '#Comparison operation .* between \*NEVER\* and int<0, max>#'
- '#Result of && is always false#'
# math-operators.php $formattable flag — newer PHPStan rewords the same
# PHPDoc-driven false positive as "Right side of && is always false"
- '#Right side of && is always false#'
- '#Unreachable statement - code above always terminates#'
# Defensive type checking in ported code (may never match but kept for safety)
- '#Call to function is_string\(\) with .* will always evaluate to false#'
- '#If condition is always true#'
# selector-parser.php closures mutate flags via by-ref use bindings,
# which PHPStan cannot track (it sees only the initial false)
- '#Ternary operator condition is always false#'
- '#If condition is always false#'
# Comparison always true in ported escape logic
- '#Comparison operation .* between int<1, 255> and 1 is always true#'
- '#Comparison operation .* between int<1, max> and 0 is always true#'
# Return type variance in closures
- '#Anonymous function never returns null so it can be removed#'