-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.dist.neon
44 lines (42 loc) · 1.4 KB
/
phpstan.dist.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
includes:
parameters:
level: 9
paths:
- src/
ignoreErrors:
- '#(has|with) no value type specified in iterable type array#'
- '#of class ReflectionClass constructor#'
- '#sprintf expects .+, mixed given#'
- '#generic class ReflectionClass but does not specify its types#'
services:
-
class: Symplify\PHPStanRules\Rules\ForbiddenFuncCallRule
tags: [phpstan.rules.rule]
arguments:
forbiddenFunctions:
- 'd'
- 'dd'
- 'dump'
- 'var_dump'
- 'extract'
- 'curl_*'
- 'compact'
- 'method_exists'
- 'property_exists'
- 'spl_autoload_register'
- 'spl_autoload_unregister'
- array_walk
-
class: Symplify\PHPStanRules\Rules\ForbiddenNodeRule
tags: [phpstan.rules.rule]
arguments:
forbiddenNodes:
- PhpParser\Node\Stmt\Trait_
- PhpParser\Node\Expr\Empty_
- PhpParser\Node\Stmt\Switch_
- PhpParser\Node\Expr\ErrorSuppress
- PhpParser\Node\Scalar\Encapsed
- PhpParser\Node\Scalar\EncapsedStringPart
# use pre* nodes instead
- PhpParser\Node\Expr\PostInc
- PhpParser\Node\Expr\PostDec