Skip to content

Commit e4a7333

Browse files
committed
Fix up PHPStan config for branch
1 parent bc50163 commit e4a7333

File tree

1 file changed

+24
-42
lines changed

1 file changed

+24
-42
lines changed

phpstan.neon.dist

Lines changed: 24 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,31 @@
11
parameters:
22
level: 7
33
paths:
4-
- %currentWorkingDirectory%/Client
5-
- %currentWorkingDirectory%/Command
6-
- %currentWorkingDirectory%/DataCollector
7-
- %currentWorkingDirectory%/DependencyInjection
8-
- %currentWorkingDirectory%/Event
9-
- %currentWorkingDirectory%/Periodic
10-
- %currentWorkingDirectory%/Pusher
11-
- %currentWorkingDirectory%/Router
12-
- %currentWorkingDirectory%/RPC
13-
- %currentWorkingDirectory%/Server
14-
- %currentWorkingDirectory%/Tests
15-
- %currentWorkingDirectory%/Topic
16-
- %currentWorkingDirectory%/GosWebSocketBundle.php
17-
- %currentWorkingDirectory%/GosWebSocketEvents.php
4+
- %currentWorkingDirectory%/src
5+
- %currentWorkingDirectory%/tests
186
ignoreErrors:
19-
# Method conditionally used, remove when dropping support for Symfony 4.3 and earlier
20-
-
21-
message: '/Call to an undefined method Symfony\\Component\\Security\\Core\\Authentication\\Token\\TokenInterface::getRoles\(\)\./'
22-
path: %currentWorkingDirectory%/Client/ClientManipulator.php
23-
24-
# Conditional class for compatibility, remove when dropping support for Symfony 4.4 and earlier
7+
# Conditionals for class for compatibility, remove when dropping support for Symfony 4.4 and earlier
258
-
269
message: '/Comparison operation ">=" between 4 and 5 is always false\./'
27-
path: %currentWorkingDirectory%/DataCollector/WebsocketCompatibilityDataCollector.php
10+
path: %currentWorkingDirectory%/src/DataCollector/WebsocketCompatibilityDataCollector.php
2811

29-
# Method conditionally used, remove when dropping support for Symfony 4.1 and earlier
3012
-
31-
message: '/Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder::root\(\)\./'
32-
path: %currentWorkingDirectory%/DependencyInjection/Configuration.php
13+
message: '/Comparison operation ">=" between 5 and 5 is always true\./'
14+
path: %currentWorkingDirectory%/src/DataCollector/WebsocketCompatibilityDataCollector.php
3315

34-
# Runtime check which matches doc block
3516
-
36-
message: '/Result of && is always false./'
37-
path: %currentWorkingDirectory%/Periodic/DoctrinePeriodicPing.php
17+
message: '/Else branch is unreachable because previous condition is always true\./'
18+
path: %currentWorkingDirectory%/src/DataCollector/WebsocketCompatibilityDataCollector.php
3819

39-
# Class conditionally used, remove when dropping support for Symfony 4.3 and earlier
20+
# Ignore errors for Symfony config builder
4021
-
41-
message: '/Instantiated class Symfony\\Component\\Security\\Core\\Role\\Role not found\./'
42-
path: %currentWorkingDirectory%/Tests/Client/ClientManipulatorTest.php
22+
message: '/Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::(.*)\(\)\./'
23+
path: %currentWorkingDirectory%/src/DependencyInjection/Configuration.php
4324

44-
# Legacy event dispatcher signature used, remove when dropping support for Symfony 4.3 and earlier
45-
- '/Method Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface::dispatch\(\) invoked with 2 parameters, 1 required\./'
46-
- '/Parameter #1 \$event of method Symfony\\Contracts\\EventDispatcher\\EventDispatcherInterface::dispatch\(\) expects object, string given\./'
25+
# Runtime check which matches doc block
26+
-
27+
message: '/Result of && is always false./'
28+
path: %currentWorkingDirectory%/src/Periodic/DoctrinePeriodicPing.php
4729

4830
# Dynamic properties added throughout Ratchet
4931
- '/Access to an undefined property PHPUnit\\Framework\\MockObject\\MockObject::\$(resourceId|PeriodicTimer|Session|Wamp)\./'
@@ -64,45 +46,45 @@ parameters:
6446
# Method has mixed return
6547
-
6648
message: '/Method Gos\\Bundle\\WebSocketBundle\\Server\\App\\Stack\\OriginCheck::onOpen\(\) has no return typehint specified\./'
67-
path: %currentWorkingDirectory%/Server/App/Stack/OriginCheck.php
49+
path: %currentWorkingDirectory%/src/Server/App/Stack/OriginCheck.php
6850

6951
# Type checks are not being detected
7052
-
7153
message: '/Parameter #1 \$object of function get_class expects object, string given\./'
72-
path: %currentWorkingDirectory%/Server/App/WampApplication.php
54+
path: %currentWorkingDirectory%/src/Server/App/WampApplication.php
7355

7456
# Interfaces which lack return typehints, re-evaluate for 3.0
7557
-
7658
message: '/Method Gos\\Bundle\\WebSocketBundle\\Server\\App\\PushableWampServerInterface::onPush\(\) has no return typehint specified\./'
77-
path: %currentWorkingDirectory%/Server/App/PushableWampServerInterface.php
59+
path: %currentWorkingDirectory%/src/Server/App/PushableWampServerInterface.php
7860

7961
-
8062
message: '/Method Gos\\Bundle\\WebSocketBundle\\Server\\Type\\ServerInterface::launch\(\) has no return typehint specified\./'
81-
path: %currentWorkingDirectory%/Server/Type/ServerInterface.php
63+
path: %currentWorkingDirectory%/src/Server/Type/ServerInterface.php
8264

8365
-
8466
message: '/Method Gos\\Bundle\\WebSocketBundle\\Topic\\TopicInterface::(onSubscribe|onUnSubscribe|onPublish)\(\) has no return typehint specified\./'
85-
path: %currentWorkingDirectory%/Topic/TopicInterface.php
67+
path: %currentWorkingDirectory%/src/Topic/TopicInterface.php
8668

8769
# Ignore missing typehints from parent interfaces
8870
-
8971
message: '/Method Gos\\Bundle\\WebSocketBundle\\Topic\\TopicManager::(getTopic|onUnsubscribe)\(\) has parameter \$topic with no typehint specified\./'
90-
path: %currentWorkingDirectory%/Topic/TopicManager.php
72+
path: %currentWorkingDirectory%/src/Topic/TopicManager.php
9173

9274
# Tests error handling for untyped argument
9375
-
9476
message: '/Parameter #1 \$connection of class Gos\\Bundle\\WebSocketBundle\\Periodic\\DoctrinePeriodicPing constructor expects Doctrine\\DBAL\\Connection\|Doctrine\\DBAL\\Driver\\PingableConnection, stdClass given\./'
95-
path: %currentWorkingDirectory%/Tests/Periodic/DoctrinePeriodicPingTest.php
77+
path: %currentWorkingDirectory%/tests/Periodic/DoctrinePeriodicPingTest.php
9678

9779
# Properties in test stubs don't have typehinted properties, ignore for now
9880
-
9981
message: '/Property class@anonymous.* has no typehint specified\./'
100-
path: %currentWorkingDirectory%/Tests/*
82+
path: %currentWorkingDirectory%/tests/*
10183

10284
# Ignore lack of json_* error checking in tests
10385
-
10486
message: '/Parameter #2 \$msg of method Gos\\Bundle\\WebSocketBundle\\Server\\WampServer::onMessage\(\) expects string, string\|false given\./'
105-
path: %currentWorkingDirectory%/Tests/Server/WampServerTest.php
87+
path: %currentWorkingDirectory%/tests/Server/WampServerTest.php
10688
reportUnmatchedIgnoredErrors: false
10789
checkMissingIterableValueType: false
10890
checkGenericClassInNonGenericObjectType: false

0 commit comments

Comments
 (0)