-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathphpstan.neon
More file actions
50 lines (50 loc) · 1.57 KB
/
phpstan.neon
File metadata and controls
50 lines (50 loc) · 1.57 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
parameters:
parallel:
maximumNumberOfProcesses: 2
level: 5
bootstrapFiles:
- ../../stubs/glpi_constants.php
- ../../vendor/autoload.php
paths:
- ajax
- inc
- hook.php
- setup.php
- tools/phpstan/rules
excludePaths:
- '**/vendor/*'
- '**/tests/*'
- '**/tools/*'
scanDirectories:
- ../../inc
- ../../src
- tools/phpstan/rules
stubFiles:
- ../../stubs/glpi_constants.php
ignoreErrors:
- '/(Instantiated class|Class) (GlpiPlugin(\\\w+)+|Plugin\w+) not found/'
- '/Call to (static )?method \w+\(\) on an unknown class (GlpiPlugin(\\\w+)+|Plugin\w+)/'
- '/Access to (property \$\w+|constant \w+) on an unknown class (GlpiPlugin(\\\w+)+|Plugin\w+)/'
- '/PHPDoc tag \@var for variable \$\w+ contains unknown class (GlpiPlugin(\\\w+)+|Plugin\w+)/'
reportUnmatchedIgnoredErrors: false
rules:
- GlpiProject\Tools\PHPStan\Rules\GlobalVarTypeRule
services:
-
class: CustomPHPStanRules\HardcodedPasswordRule
tags: [phpstan.rules.rule]
-
class: CustomPHPStanRules\UnsafeFunctionsRule
tags: [phpstan.rules.rule]
-
class: CustomPHPStanRules\InputValidationRule
tags: [phpstan.rules.rule]
-
class: CustomPHPStanRules\SensitiveInfoExposureRule
tags: [phpstan.rules.rule]
-
class: CustomPHPStanRules\SqlInjectionRule
tags: [phpstan.rules.rule]
-
class: CustomPHPStanRules\PermissionControlRule
tags: [phpstan.rules.rule]