Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-09-29 11:31:45 +0300
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2022-09-29 19:27:59 +0300
commitcceb2a2182dd7a4356ae5a9e7cd6eff8ee2507a7 (patch)
treed8176210ce18d04b24f80466e0e494f0b392fb8d /lib
parent87448e3ed2377dbb3dd1eebe140dcb070ef7bd4b (diff)
Fix CS and psalm
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Collaboration/Reference/TalkReferenceProvider.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Collaboration/Reference/TalkReferenceProvider.php b/lib/Collaboration/Reference/TalkReferenceProvider.php
index 5b171471a..f3b0b1ba2 100644
--- a/lib/Collaboration/Reference/TalkReferenceProvider.php
+++ b/lib/Collaboration/Reference/TalkReferenceProvider.php
@@ -40,7 +40,7 @@ use OCP\IL10N;
use OCP\IURLGenerator;
/**
- * @psalm-type ReferenceMatch = array{token: string, message: ?int}
+ * @psalm-type ReferenceMatch = array{token: string, message: int|null}
*/
class TalkReferenceProvider implements IReferenceProvider {
protected IURLGenerator $urlGenerator;
@@ -79,9 +79,9 @@ class TalkReferenceProvider implements IReferenceProvider {
$rewriteUrl = $this->urlGenerator->getAbsoluteURL('/call/');
if (str_starts_with($referenceText, $indexPhpUrl)) {
- $urlOfInterest = substr($referenceText, strlen($indexPhpUrl)) ?: null;
+ $urlOfInterest = substr($referenceText, strlen($indexPhpUrl));
} elseif (str_starts_with($referenceText, $rewriteUrl)) {
- $urlOfInterest = substr($referenceText, strlen($rewriteUrl)) ?: null;
+ $urlOfInterest = substr($referenceText, strlen($rewriteUrl));
} else {
return null;
}
@@ -178,7 +178,7 @@ class TalkReferenceProvider implements IReferenceProvider {
* Description is the plain text chat message
*/
if ($participant && !empty($referenceMatch['message'])) {
- $comment = $this->chatManager->getComment($room, $referenceMatch['message']);
+ $comment = $this->chatManager->getComment($room, (string) $referenceMatch['message']);
$message = $this->messageParser->createMessage($room, $participant, $comment, $this->l);
$this->messageParser->parseMessage($message);