-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathphpstan.neon
88 lines (68 loc) · 3.41 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
includes:
- vendor/symplify/phpstan-rules/config/symplify-rules.neon
- phpstan-baseline.neon
parameters:
level: 8
paths:
- bin
- src
- config
- tests
reportUnmatchedIgnoredErrors: false
ignoreErrors:
# for autowire
- '#Class Fop\\MeetupCom\\Guzzle\\Oauth2AwareClient extends @final class GuzzleHttp\\Client#'
# for autowiring
-
message: '#There should be no empty class#'
path: src/MeetupCom/Guzzle/Oauth2AwareClient.php
# @todo fix in repository on github
-
message: '#Do not use chained method calls\. Put each on separated lines#'
path: src/Meetup/Repository/*Repository.php
-
message: '#Anonymous variables in a method call can lead to false dead methods\. Make sure the variable type is known#'
path: src/Meetup/Repository/*Repository.php
# init repository
-
message: '#Autowired/inject method name "boot\(\)" must respect "autowire/inject\(\*\)" name#'
path: src/Meetup/Repository/AbstractRepository.php
# abstract repository
-
message: '#Instead of abstract class, use specific service with composition#'
path: src/Meetup/Repository/AbstractRepository.php
# too strict for commands
-
message: '#Private method in is not allowed here \- it should only delegate to others\. Decouple the private method to a new service class#'
path: src/Command/ImportCommand.php
# generics false positive
- '#Method Fop\\Meetup\\Repository\\AbstractRepository\:\:fetchAll\(\) should return array<TEntity of Fop\\Meetup\\Contract\\ArrayableInterface> but returns array<int, Fop\\Meetup\\Contract\\ArrayableInterface>#'
# array shape on purpose
-
message: '#Instead of array shape, use value object with specific types in constructor and getters#'
path: src/Twig/Extension/GlobalCountTwigExtension.php
# json serialize
-
message: '#Complete known array shape to the method @return type#'
path: src/Meetup/ValueObject/Meetup.php
# false positive
- '#Add explicit array type to assigned "\$venue" expression#'
-
message: '#Instead of calling all public methods of value object, pass it directly#'
path: src/MeetupCom/Meetup/MeetupComMeetupFactory.php
# false positive - @todo fix in Rector
-
message: '#Class method "(deleteAll|insert|fetchAll)\(\)" is never used#'
path: src/Meetup/Repository/AbstractRepository.php
# allow shapes to avoid overly API complexity
- '#Instead of array shape, use value object with specific types in constructor and getters#'
- '#Parameter (.*?) expects array(.*?), (array|non\-empty\-array(.*?)) given#'
- '#Offset (.*?) does not exist on array#'
# false positive
- '#Relative file path "Import meetups from meetup\.com" is not allowed, use absolute one with __DIR__#'
-
message: '#Method call return value that should be used, but is not#'
path: src/Meetup/Repository/AbstractRepository.php
-
message: '#Use "\$this\-><method>\(\)" instead of "parent\:\:<method>\(\)" unless in the same named method#'
path: src/Meetup/Repository/AbstractRepository.php