-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathphpstan.neon
69 lines (67 loc) · 2.17 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
58
59
60
61
62
63
64
65
66
67
68
includes:
- vendor/spaze/phpstan-disallowed-calls/disallowed-dangerous-calls.neon
- vendor/spaze/phpstan-disallowed-calls/disallowed-execution-calls.neon
- vendor/spaze/phpstan-disallowed-calls-nette/disallowed-dangerous-calls.neon
parameters:
level: max
exceptions:
checkedExceptionClasses:
- Kiwicom\Loopbind\Exceptions\CheckedException
check:
missingCheckedExceptionInThrows: true
disallowedFunctionCalls:
-
function: 'sizeof()'
message: 'use count() instead.'
-
function: 'delete()'
message: 'use unset() instead.'
-
function: 'substr()'
message: 'use mb_substr() instead'
-
function: 'substr_count()'
message: 'use mb_substr_count() instead'
-
function: 'strtoupper()'
message: 'use mb_strtoupper() instead'
-
function: 'strtolower()'
message: 'use mb_strtolower() instead'
-
function: 'strstr()'
message: 'use mb_strstr() instead'
-
function: 'strrpos()'
message: 'use mb_strrpos() instead'
-
function: 'strripos()'
message: 'use mb_strripos() instead'
-
function: 'strrchr()'
message: 'use mb_strrchr() instead'
-
function: 'strpos()'
message: 'use mb_strpos() instead'
-
function: 'strlen()'
message: 'use mb_strlen() instead'
-
function: 'stristr()'
message: 'use mb_stristr() instead'
-
function: 'stripos()'
message: 'use mb_stripos() instead'
-
function: 'str_split()'
message: 'use mb_str_split() instead'
disallowedConstants:
-
constant: 'DATE_ISO8601'
message: 'use DATE_ATOM instead'
-
class: 'DateTimeInterface'
constant: 'ISO8601'
message: 'use DateTimeInterface::ATOM instead'
ignoreErrors:
- '#Calling exec\(\) is forbidden#' # This is neccessary for this tool