-
Notifications
You must be signed in to change notification settings - Fork 69
/
phpstan.neon
61 lines (50 loc) · 2.29 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
includes:
- vendor/symplify/phpstan-extensions/config/config.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
# symplify
- vendor/symplify/phpstan-rules/config/static-rules.neon
- vendor/symplify/phpstan-rules/config/services/services.neon
services:
-
class: Symplify\PHPStanRules\Rules\RequireMethodCallArgumentConstantRule
tags: [phpstan.rules.rule]
arguments:
constantArgByMethodByType:
GitWrapper\GitWorkingCopy:
run: [0]
parameters:
level: max
reportUnmatchedIgnoredErrors: false
paths:
- src
- tests
ignoreErrors:
- '#Access to an undefined property object::\$data#'
- '#no value type specified in iterable type#'
- '#TValue#'
- '#Method GitWrapper\\GitWrapper\:\:getEnvVar\(\) has no return typehint specified#'
- '#Method GitWrapper\\GitWrapper\:\:setEnvVar\(\) has parameter \$value with no typehint specified#'
- '#Method GitWrapper\\GitCommand\:\:getOption\(\) has parameter \$default with no typehint specified#'
- '#Method GitWrapper\\GitCommand\:\:getOption\(\) has no return typehint specified#'
- '#Constant string value need to only have small letters, _, \-, \. and numbers#'
-
message: '#Do not use factory/method call in constructor\. Put factory in config and get service with dependency injection#'
paths:
- "src/Process/GitProcess.php"
- "src/GitWrapper.php"
- "src/GitBranches.php"
-
message: '#Do not use scalar or array as constructor parameter\. Use "Symplify\\PackageBuilder\\Parameter\\ParameterProvider" service instead#'
paths:
- "src/Process/GitProcess.php"
- "src/GitWrapper.php"
- "src/GitCommand.php"
- "src/GitBranches.php"
- "src/GitWorkingCopy.php"
# fix after tests are running in CI
- '#Spread operator is not allowed#'
- '#Method "needsMerge\(\)" returns bool type, so the name should start with is/has/was#'
-
message: '#Unreachable statement \- code above always terminates#'
paths:
- tests/Source/StreamSuppressFilter.php