Skip to content

Commit 8993fa7

Browse files
committed
PHPStan adjustments
1 parent e805d58 commit 8993fa7

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

phpstan.neon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
parameters:
2-
level: 7
2+
level: 8
33
paths:
44
- %currentWorkingDirectory%/src
55
- %currentWorkingDirectory%/tests
@@ -105,6 +105,6 @@ parameters:
105105
-
106106
message: '/Parameter #2 \$msg of method Gos\\Bundle\\WebSocketBundle\\Server\\WampServer::onMessage\(\) expects string, string\|false given\./'
107107
path: %currentWorkingDirectory%/tests/Server/WampServerTest.php
108+
108109
reportUnmatchedIgnoredErrors: false
109110
checkMissingIterableValueType: false
110-
checkGenericClassInNonGenericObjectType: false

src/Server/App/Dispatcher/TopicDispatcher.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,15 @@ public function dispatch(
180180
try {
181181
$appTopic->registerPeriodicTimer($topic);
182182
} catch (\Throwable $e) {
183-
$this->logger->error(
184-
sprintf(
185-
'Error registering periodic timer for topic "%s"',
186-
$appTopic->getName()
187-
),
188-
['exception' => $e]
189-
);
183+
if (null !== $this->logger) {
184+
$this->logger->error(
185+
sprintf(
186+
'Error registering periodic timer for topic "%s"',
187+
$appTopic->getName()
188+
),
189+
['exception' => $e]
190+
);
191+
}
190192
}
191193
}
192194
}

0 commit comments

Comments
 (0)