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:
authorVitor Mattos <vitor@php.rio>2022-04-07 01:05:22 +0300
committerVitor Mattos <vitor@php.rio>2022-04-07 01:05:30 +0300
commit94c29af7fe1c56a17f2be37a9c3bb5543f56a404 (patch)
treee23fb1daa83a29c5c2c2b08f099fad7fe06185b4 /lib
parentc07251f0c67d3c02debe1f6dbe0e12ee3fe9f99a (diff)
Fix psalm issues
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib')
-rw-r--r--lib/Chat/Command/Executor.php6
-rw-r--r--lib/Events/CommandEvent.php2
-rw-r--r--lib/Events/EndCallForEveryoneEvent.php6
-rw-r--r--lib/Service/HostedSignalingServerService.php2
4 files changed, 7 insertions, 9 deletions
diff --git a/lib/Chat/Command/Executor.php b/lib/Chat/Command/Executor.php
index ed71f517f..3a51239c7 100644
--- a/lib/Chat/Command/Executor.php
+++ b/lib/Chat/Command/Executor.php
@@ -115,7 +115,7 @@ class Executor {
$message->setVerb('command');
}
- protected function execHelp(Room $room, IComment $message, string $arguments, Participant $participant): string {
+ protected function execHelp(Room $room, IComment $message, string $arguments, Participant $participant): ?string {
if ($arguments !== '' && $arguments !== 'help') {
return $this->execHelpSingleCommand($room, $message, $arguments);
}
@@ -160,7 +160,7 @@ class Executor {
return implode("\n", $helps);
}
- protected function execHelpSingleCommand(Room $room, IComment $message, string $arguments): string {
+ protected function execHelpSingleCommand(Room $room, IComment $message, string $arguments): ?string {
try {
$input = explode(' ', $arguments, 2);
if (count($input) === 1) {
@@ -186,7 +186,7 @@ class Executor {
}
}
- protected function execApp(Room $room, IComment $message, Command $command, string $arguments): string {
+ protected function execApp(Room $room, IComment $message, Command $command, string $arguments): ?string {
$event = $this->createEvent($room, $message, $command, $arguments);
$this->dispatcher->dispatch(self::EVENT_APP_EXECUTE, $event);
return $event->getOutput();
diff --git a/lib/Events/CommandEvent.php b/lib/Events/CommandEvent.php
index 7a9e099b5..3c62182bb 100644
--- a/lib/Events/CommandEvent.php
+++ b/lib/Events/CommandEvent.php
@@ -51,7 +51,7 @@ class CommandEvent extends ChatEvent {
$this->output = $output;
}
- public function getOutput(): string {
+ public function getOutput(): ?string {
return $this->output;
}
}
diff --git a/lib/Events/EndCallForEveryoneEvent.php b/lib/Events/EndCallForEveryoneEvent.php
index b960c31a8..9710e0602 100644
--- a/lib/Events/EndCallForEveryoneEvent.php
+++ b/lib/Events/EndCallForEveryoneEvent.php
@@ -48,9 +48,8 @@ class EndCallForEveryoneEvent extends ModifyRoomEvent {
/**
* Only available in the after-event
- * @return string[]
*/
- public function getSessionIds(): array {
+ public function getSessionIds(): ?array {
return $this->sessionIds;
}
@@ -64,9 +63,8 @@ class EndCallForEveryoneEvent extends ModifyRoomEvent {
/**
* Only available in the after-event
- * @return string[]
*/
- public function getUserIds(): array {
+ public function getUserIds(): ?array {
return $this->userIds;
}
}
diff --git a/lib/Service/HostedSignalingServerService.php b/lib/Service/HostedSignalingServerService.php
index ced054d78..64aa6f73b 100644
--- a/lib/Service/HostedSignalingServerService.php
+++ b/lib/Service/HostedSignalingServerService.php
@@ -243,7 +243,7 @@ class HostedSignalingServerService {
*
* @return (\ArrayAccess|array|mixed)[]|\ArrayAccess
*
- * @psalm-return list<created: mixed, owner: <array>, status: mixed, signaling: <array>>
+ * @psalm-return \ArrayAccess|array{created: mixed, owner: \ArrayAccess|array, status: mixed, signaling?: \ArrayAccess|array}
*/
public function fetchAccountInfo(AccountId $accountId) {
try {