-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathphpstan.neon
57 lines (55 loc) · 2.42 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
includes:
- phpstan-baseline.neon
# - vendor-bin/larastan/vendor/larastan/larastan/extension.neon
# - vendor/roavcome/no-floaters/rules.neon
# - vendor/phpstan/phpstan-strict-rules/rules.neon
# - vendor/ergebnis/phpstan-rules/rules.neon
# - vendor/ekino/phpstan-banned-code/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
- vendor/spaze/phpstan-disallowed-calls/disallowed-loose-calls.neon
parameters:
level: 5
paths:
- src
tmpDir: .build/phpstan
# checkOctaneCompatibility: true
# checkModelProperties: true
# checkMissingIterableValueType: true
# disallowFloatsEverywhere: true
# strictRules:
# allRules: false
# booleansInConditions: false
# uselessCast: false
# requireParentConstructorCall: false
# disallowedConstructs: false
# overwriteVariablesWithLoop: false
# closureUsesThis: false
# matchingInheritedMethodNames: false
# numericOperandsInArithmeticOperators: false
# strictCalls: false
# switchConditionsMatchingType: false
# noVariableVariables: false
disallowedFunctionCalls:
-
function: 'env()'
message: 'use config() instead'
-
function: 'env_explode()'
message: 'use config() instead'
-
function: 'env_getcsv()'
message: 'use config() instead'
ignoreErrors:
- "#^Unsafe usage of new static\\(\\)\\.$#"
- '#^Call to method .*\(\) on an unknown class Guanguans\\SoarPHP\\Concerns\\HasOptions\.$#'
- '#^Method Guanguans\\SoarPHP\\Support\\Rectors\\ToInternalExceptionRector\:\:refactor\(\) never returns \d so it can be removed from the return type\.$#'
- '#^Method Guanguans\\SoarPHP\\Support\\Rectors\\ToInternalExceptionRector\:\:refactor\(\) should return 1\|2\|3\|4\|array\<PhpParser\\Node\>\|PhpParser\\Node\|null but empty return statement found\.$#'
- '#^Unused result of "and" operator\.$#'
-
message: '#^Call to function function_exists\(\) with callable\-string will always evaluate to true\.$#'
path: src/Soar.php
-
message: '#^Calling var_dump\(\) is forbidden, use some logger instead\.$#'
path: src/Soar.php