-
-
Notifications
You must be signed in to change notification settings - Fork 140
/
phpstan.neon
110 lines (87 loc) · 6.03 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
parameters:
level: 8
paths:
- %currentWorkingDirectory%/src
- %currentWorkingDirectory%/tests
ignoreErrors:
# Conditionals for class for compatibility, remove when dropping support for Symfony 4.4 and earlier
-
message: '/Comparison operation ">=" between 4 and 5 is always false\./'
path: %currentWorkingDirectory%/src/DataCollector/WebsocketCompatibilityDataCollector.php
-
message: '/Comparison operation ">=" between 5 and 5 is always true\./'
path: %currentWorkingDirectory%/src/DataCollector/WebsocketCompatibilityDataCollector.php
-
message: '/Else branch is unreachable because previous condition is always true\./'
path: %currentWorkingDirectory%/src/DataCollector/WebsocketCompatibilityDataCollector.php
# Conditionals for interface compatibility, remove when dropping support for Symfony 5.2 and earlier
- '/Call to an undefined method Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface::getUsername\(\)\./'
# Ignore errors for Symfony config builder
-
message: '/Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::(.*)\(\)\./'
path: %currentWorkingDirectory%/src/DependencyInjection/Configuration.php
# Runtime check which matches doc block
-
message: '/Result of && is always false./'
path: %currentWorkingDirectory%/src/Periodic/DoctrinePeriodicPing.php
-
message: '/Result of && is always false./'
path: %currentWorkingDirectory%/src/Topic/TopicManager.php
# Dynamic properties added throughout Ratchet
- '/Access to an undefined property PHPUnit\\Framework\\MockObject\\MockObject::\$(resourceId|PeriodicTimer|Session|WAMP|remoteAddress)\./'
- '/Access to an undefined property PHPUnit\\Framework\\MockObject\\MockObject|Ratchet\\ConnectionInterface::\$(resourceId|PeriodicTimer|Session|WAMP|remoteAddress)\./'
- '/Access to an undefined property PHPUnit\\Framework\\MockObject\\MockObject&Ratchet\\ConnectionInterface::\$(resourceId|PeriodicTimer|Session|WAMP|remoteAddress)\./'
- '/Access to an undefined property Ratchet\\ConnectionInterface::\$(resourceId|PeriodicTimer|Session|WAMP|remoteAddress)\./'
# Extra arguments added to Ratchet interface implementations
- '/Method Ratchet\\ComponentInterface::onOpen\(\) invoked with 2 parameters, 1 required\./'
- '/Method Ratchet\\ConnectionInterface::close\(\) invoked with 1 parameter, 0 required\./'
# The param's doc block says this should be a string, however the code explicitly handles a Topic object too
- '/Parameter #2 \$errorUri of method Ratchet\\Wamp\\WampConnection::callError\(\) expects string, Ratchet\\Wamp\\Topic given\./'
# The param's doc block says this should be a string, however it effectively supports arrays as well
- '/Parameter #4 \$details of method Ratchet\\Wamp\\WampConnection::callError\(\) expects string\|null, .* given\./'
# The param's doc block says this should be a subclass of the interface
-
message: '/Parameter #1 \$conn of method Ratchet\\Wamp\\Topic::(add|remove)\(\) expects Ratchet\\Wamp\\WampConnection, Ratchet\\ConnectionInterface given\./'
path: %currentWorkingDirectory%/src/Topic/TopicManager.php
# Method has mixed return
-
message: '/Method Gos\\Bundle\\WebSocketBundle\\Server\\App\\Stack\\BlockedIpCheck::onOpen\(\) has no return typehint specified\./'
path: %currentWorkingDirectory%/src/Server/App/Stack/BlockedIpCheck.php
-
message: '/Method Gos\\Bundle\\WebSocketBundle\\Server\\App\\Stack\\OriginCheck::onOpen\(\) has no return typehint specified\./'
path: %currentWorkingDirectory%/src/Server/App/Stack/OriginCheck.php
# Type checks are not being detected
-
message: '/Parameter #1 \$object of function get_class expects object, string given\./'
path: %currentWorkingDirectory%/src/Server/App/WampApplication.php
# Interfaces which lack return typehints, re-evaluate for 3.0
-
message: '/Method Gos\\Bundle\\WebSocketBundle\\Server\\App\\PushableWampServerInterface::onPush\(\) has no return typehint specified\./'
path: %currentWorkingDirectory%/src/Server/App/PushableWampServerInterface.php
-
message: '/Method Gos\\Bundle\\WebSocketBundle\\Server\\Type\\ServerInterface::launch\(\) has no return typehint specified\./'
path: %currentWorkingDirectory%/src/Server/Type/ServerInterface.php
-
message: '/Method Gos\\Bundle\\WebSocketBundle\\Topic\\TopicInterface::(onSubscribe|onUnSubscribe|onPublish)\(\) has no return typehint specified\./'
path: %currentWorkingDirectory%/src/Topic/TopicInterface.php
# Ignore missing typehints from parent interfaces
-
message: '/Method Gos\\Bundle\\WebSocketBundle\\Topic\\TopicManager::(getTopic|onUnsubscribe)\(\) has parameter \$topic with no typehint specified\./'
path: %currentWorkingDirectory%/src/Topic/TopicManager.php
# Tests error handling for untyped argument
-
message: '/Parameter #1 \$connection of class Gos\\Bundle\\WebSocketBundle\\Periodic\\DoctrinePeriodicPing constructor expects Doctrine\\DBAL\\Connection\|Doctrine\\DBAL\\Driver\\PingableConnection, stdClass given\./'
path: %currentWorkingDirectory%/tests/Periodic/DoctrinePeriodicPingTest.php
-
message: '/Parameter #1 \$topic of method Gos\\Bundle\\WebSocketBundle\\Topic\\TopicManager::getTopic\(\) expects Ratchet\\Wamp\\Topic\|string, null given\./'
path: %currentWorkingDirectory%/tests/Topic/TopicManagerTest.php
# Properties in test stubs don't have typehinted properties, ignore for now
-
message: '/Property class@anonymous.* has no typehint specified\./'
path: %currentWorkingDirectory%/tests/*
# Ignore lack of json_* error checking in tests
-
message: '/Parameter #2 \$msg of method Gos\\Bundle\\WebSocketBundle\\Server\\WampServer::onMessage\(\) expects string, string\|false given\./'
path: %currentWorkingDirectory%/tests/Server/WampServerTest.php
reportUnmatchedIgnoredErrors: false
checkMissingIterableValueType: false