-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon
More file actions
64 lines (48 loc) · 3.69 KB
/
phpstan.neon
File metadata and controls
64 lines (48 loc) · 3.69 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
parameters:
level: 8
paths:
- src
- tests
treatPhpDocTypesAsCertain: false
ignoreErrors:
# Acceptable: Array type hints without specific value types (mixed arrays are intentional throughout codebase)
# This is a design decision - we use mixed arrays for flexibility in many places
- '#has parameter .* with no value type specified in iterable type array#'
- '#has no value type specified in iterable type array#'
# Acceptable: Repository mock method() calls in tests (PHPUnit mocking pattern)
- '#Call to an undefined method GitStream\\Core\\Repository::method\(\)#'
# Acceptable: Laravel Prompts library type issues (library-specific callable/Closure handling)
- '#Parameter \$options of function Laravel\\Prompts\\suggest expects.*callable\(\): mixed\) given#'
- '#Parameter \$options of function Laravel\\Prompts\\search expects.*callable\(\): mixed given#'
- '#Parameter \$callback of function Laravel\\Prompts\\spin expects.*callable\(\): mixed given#'
- '#Parameter \$callback of function Laravel\\Prompts\\progress expects.*callable\(\): mixed\)\|null given#'
- '#Unable to resolve the template type TReturn in call to function Laravel\\Prompts\\(spin|progress)#'
- '#Argument of an invalid type int\|iterable supplied for foreach, only iterables are supported#'
- '#Method.*PromptsBaseCommand::progress\(\) should return array but returns array\|Laravel\\Prompts\\Progress#'
# Acceptable: Unused methods that may be used by future code or external integrations
- '#Method .* is unused#'
# Acceptable: Properties set but not directly read (may be used via magic methods or reflection)
- '#Property .* is never read, only written#'
# Acceptable: Always true/false conditions from defensive programming
- '#(If|Ternary operator) condition is always (true|false)#'
- '#(Negated boolean|Result of) .* is always (true|false)#'
# Acceptable: Empty checks on variables that always exist (defensive programming)
- '#Variable .* in empty\(\) always exists#'
# Acceptable: getcwd() can return false but is handled appropriately in context
- '#Parameter \#2 \$cwd of class Symfony\\Component\\Process\\Process constructor expects string\|null, string\|false given#'
# Acceptable: Array filter callbacks with relaxed return types (0|1|false is valid for filtering)
- '#Parameter \#2 \$callback of function array_filter expects.*Closure\(mixed\): \(0\|1\|false\)#'
# Acceptable: Nullable return types that never actually return null (defensive typing)
- '#Method .* never returns null so it can be removed from the return type#'
# Acceptable: file operations returning string|false (errors handled in context)
- '#Parameter .* expects .*, string\|false given#'
# Acceptable: Match expressions not handling all possible values (handled by default case)
- '#Match expression does not handle remaining values#'
# Acceptable: Provider methods that handle null internally
- '#Cannot call method .* on .*\|null#'
# Acceptable: Property access on nullable types (checked before access in actual code flow)
- '#Cannot access property .* on .*\|null#'
# Acceptable: Offset access on arrays that may be null (checked in code flow)
- '#Offset .* does not exist on array\|null#'
# Acceptable: Array keys with flexible types (int|string is valid for array keys)
- '#Possibly invalid array key type#'