-
Notifications
You must be signed in to change notification settings - Fork 7
/
phpstan.neon
46 lines (43 loc) · 1.58 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
parameters:
# https://phpstan.org/config-reference
level: max
bootstrapFiles:
- tests/bootstrap.php
paths:
- src
- examples
disallowedSuperglobals:
-
superglobal: [ '$GLOBALS', '$_SERVER', '$_GET', '$_POST', '$_FILES', '$_COOKIE', '$_SESSION', '$_REQUEST', '$_ENV' ]
message: 'use the Request methods instead'
disallowedFunctionCalls:
-
function:
- 'dump()'
- 'die()'
- 'exit()'
- 'var_dump()'
- 'dd()'
message: 'Did you forget to remove debug code?'
-
function:
- 'sizeof()'
message: 'use count() instead'
-
function:
- 'ctype_digit()'
message: 'this method has limitations when the passed variable is not a string, use filter_var() instead'
-
function:
- 'date()'
- 'strtotime()'
message: 'Use date object methods instead'
includes:
# https://github.com/phpstan/phpstan-strict-rules
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/spaze/phpstan-disallowed-calls/extension.neon
- vendor/spaze/phpstan-disallowed-calls/disallowed-dangerous-calls.neon
- vendor/spaze/phpstan-disallowed-calls/disallowed-execution-calls.neon
- vendor/spaze/phpstan-disallowed-calls/disallowed-insecure-calls.neon