-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpstan.neon.dist
More file actions
76 lines (61 loc) · 2.37 KB
/
Copy pathphpstan.neon.dist
File metadata and controls
76 lines (61 loc) · 2.37 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
# phpstan.neon.dist
includes:
- phpstan-baseline.neon
parameters:
reportUnmatchedIgnoredErrors: false
level: 6
paths:
- src
- starmus-audio-recorder.php
- uninstall.php
tmpDir: .phpstan-cache
# Configure WordPress-specific settings
bootstrapFiles:
- tests/wordpress-mocks.php
# WordPress stubs for core function and constant discovery
stubFiles:
- vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
# Consolidated and cleaned-up exclusion paths
excludePaths:
analyse:
# Exclude the entire vendor directory from *source code* analysis
- vendor/*
# Exclude other known directories
- node_modules/*
- tests/*
- wp-admin/*
- wp-content/*
- wordpress-installer/*
- src/cli/*
# Consolidated and cleaned-up ignore errors
ignoreErrors:
# WordPress/ACF functions and methods
- '#Call to an undefined method ACF#'
- '#Function get_field not found#'
- '#Function update_field not found#'
- '#Undefined variable: \$wpdb#'
- '#Access to an undefined property#'
# WordPress constants not in stubs
- '#Constant AUTH_SALT not found#'
- '#Constant AUTH_KEY not found#'
- '#Constant SECURE_AUTH_KEY not found#'
- '#Constant SECURE_AUTH_SALT not found#'
# WordPress template type generics (known wp_unslash issue)
- '#Unable to resolve the template type T in call to function wp_unslash#'
# Core PHP functions that PHPStan doesn't recognize
- '#Undefined function .*(defined|function_exists|class_exists|file_exists|dirname|intval|array_unique|max|ceil|rawurlencode|usort|array_slice)#'
# Standard exception types
- '#Undefined type .*(Throwable|RuntimeException|LogicException)#'
# Plugin constants defined elsewhere
- '#Constant STARMUS_URL not found#'
- '#Constant STARMUS_PATH not found#'
- '#Undefined constant.*STARMUS_DAL_OVERRIDE_KEY#'
# Missing service classes (to be implemented)
- '#Use of unknown class.*StarmusStatsDataService#'
- '#has unknown class.*StarmusStatsDataService#'
- '#invalid type.*StarmusStatsDataService#'
# WordPress-specific patterns
- '#Method.*has parameter.*with generic class WP_REST_Request but does not specify its types#'
# Allow African runtime monitoring patterns
- '#error_log.*STARMUS PHP.*is not allowed#'
- '#Call to function set_error_handler.*not found#'