-
Notifications
You must be signed in to change notification settings - Fork 22
/
phpstan.neon
57 lines (43 loc) · 2.03 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
48
49
50
51
52
53
54
55
56
57
parameters:
level: 5
bootstrapFiles:
- constants.php
paths:
- .
excludePaths:
- ./vendor/
- ./node_modules/
- ./tests/
- ./Libraries/FiveFiltersReadability
- ./Controllers/PF_JWT.php # Seems to have bugs in Firebase\JWT implementation.
scanFiles:
- ./Libraries/FiveFiltersReadability/Readability.php
- ./Controllers/PF_JWT.php
ignoreErrors:
- # Template files have variables included in function scope.
message: '#Variable \$[a-zA-Z0-9\\_]+ might not be defined.$#'
path: ./parts
- # WP-defined constant.
message: '#^Constant WPINC not found.$#'
- # WordPress standard for array documentation.
message: '#^PHPDoc tag @var above a (function|method) has no effect.$#'
- # PHPStan is being overly strict.
message: '#^Access to an undefined property.*$#'
path: ./Libraries/PFOpenGraph.php
- # Ignoring all PHPDoc-related issues in Jaxion.
message: '#^PHPDoc tag.*$#'
path: ./Libraries/Jaxion
- # WP_Query can return ints in `posts`, but doesn't in this case.
message: '#^Cannot access property \$[a-zA-Z0-9_]+ on int\|WP_Post\.$#'
path: ./Core/API/StatsEndpoint.php
- # get_taxonomies() is returning objects here, not strings.
message: '#Cannot access property \$rest_controller_class on string\.$#'
path: ./Core/API/PFEndpoint.php
- # False positive about property of a tidy object.
message: '#^Access to an undefined property tidy::\$value\.$#'
path: ./Controllers/PF_Readability.php
- # Non-typed stdClass objects passed in an array aren't understood by PHPStan. Should be refactored.
message: '#^Access to an undefined property object::\$[a-zA-Z]+\.$#'
path: ./modules/opml-subscribe/opml-subscribe.php
- # False positive about the $args param for cron jobs.
message: '#^Parameter \#\d \$args of function (wp_clear_scheduled_hook|wp_next_scheduled|wp_schedule_event|wp_schedule_single_event|wp_unschedule_event) expects array<int, mixed>, array<string, string> given\.$#'