Repository navigation
Expand file tree
/
Copy pathphpstan.neon
More file actions
39 lines (39 loc) · 1.99 KB
/
Copy pathphpstan.neon
File metadata and controls
39 lines (39 loc) · 1.99 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
parameters:
level: 1
paths:
- includes
- htdocs
excludePaths:
- includes/test
- vendor
bootstrapFiles:
- phpstan-bootstrap.php
ignoreErrors:
# Dynamic property pattern: SearchEngineInterface.__construct() and
# several other classes assign $args keys as object properties.
# TODO: add #[\AllowDynamicProperties] to affected classes.
- '#Access to an undefined property (\$this\([A-Z][A-Za-z]+\)|[A-Z][A-Za-z]+)::\$\w+\.#'
# Include-file context: routes.inc.php is always included from within
# MasterController::parseRequest() where $router is a local variable.
- message: '#Variable \$router might not be defined\.#'
path: includes/routes.inc.php
# Include-file context: htdocs page files are always included from
# htdocs/index.php where $db is already defined.
- message: '#Variable \$db might not be defined\.#'
path: htdocs
# Include-file context: EditionController and StructureController require()
# page PHP files that define $content before render() is called; same for
# LawController.
- message: '#Variable \$content might not be defined\.#'
path: includes/class.EditionController.inc.php
- message: '#Variable \$content might not be defined\.#'
path: includes/class.StructureController.inc.php
- message: '#Variable \$content might not be defined\.#'
path: includes/class.LawController.inc.php
# Include-file context: htdocs include files use variables set by their
# callers (htdocs/index.php bootstrap or the controller that included them).
- message: '#Variable \$(sidebar|law_object|args) might not be defined\.#'
path: htdocs
# require() paths use INCLUDE_PATH / WEB_ROOT constants resolved at runtime;
# PHPStan cannot evaluate them statically.
- '#Path in require(_once)?\(\) .+ is not a file or it does not exist\.#'