diff --git a/lib/Capabilities.php b/lib/Capabilities.php index 811cbd0c737..9732d2a7715 100644 --- a/lib/Capabilities.php +++ b/lib/Capabilities.php @@ -272,18 +272,18 @@ public function getCapabilities(): array { $capabilities['config']['signaling']['hello-v2-token-key'] = $pubKey; } - /** @var ?string[] $predefinedBackgrounds */ + /** @var ?list $predefinedBackgrounds */ $predefinedBackgrounds = null; $cachedPredefinedBackgrounds = $this->talkCache->get('predefined_backgrounds'); if ($cachedPredefinedBackgrounds !== null) { // Try using cached value - /** @var string[]|null $predefinedBackgrounds */ + /** @var list|null $predefinedBackgrounds */ $predefinedBackgrounds = json_decode($cachedPredefinedBackgrounds, true); } if (!is_array($predefinedBackgrounds)) { // Cache was empty or invalid, regenerate - /** @var string[] $predefinedBackgrounds */ + /** @var list $predefinedBackgrounds */ $predefinedBackgrounds = []; if (file_exists(__DIR__ . '/../img/backgrounds')) { $directoryIterator = new \DirectoryIterator(__DIR__ . '/../img/backgrounds'); diff --git a/lib/Model/BanMapper.php b/lib/Model/BanMapper.php index 4662a87cc85..46295244973 100644 --- a/lib/Model/BanMapper.php +++ b/lib/Model/BanMapper.php @@ -39,6 +39,9 @@ public function findForBannedActorAndRoom(string $bannedActorType, string $banne return $this->findEntity($query); } + /** + * @return list + */ public function findByRoomId(int $roomId, ?string $bannedActorType = null): array { $query = $this->db->getQueryBuilder(); $query->select('*') diff --git a/lib/ResponseDefinitions.php b/lib/ResponseDefinitions.php index 3bf27613baa..1dabd974698 100644 --- a/lib/ResponseDefinitions.php +++ b/lib/ResponseDefinitions.php @@ -113,7 +113,7 @@ * isReplyable: bool, * markdown: bool, * reactions: array|\stdClass, - * reactionsSelf?: string[], + * reactionsSelf?: list, * referenceId: string, * timestamp: int, * token: string, @@ -156,7 +156,7 @@ * inviterDisplayName: string, * } * - * @psalm-type TalkMatterbridgeConfigFields = array> + * @psalm-type TalkMatterbridgeConfigFields = list> * * @psalm-type TalkMatterbridge = array{ * enabled: bool, @@ -184,7 +184,7 @@ * participantType: int, * permissions: int, * roomToken: string, - * sessionIds: string[], + * sessionIds: list, * status?: string, * statusClearAt?: ?int, * statusIcon?: ?string, @@ -321,15 +321,15 @@ * server: string, * signalingMode: string, * sipDialinInfo: string, - * stunservers: array{urls: string[]}[], + * stunservers: list}>, * ticket: string, - * turnservers: array{urls: string[], username: string, credential: mixed}[], + * turnservers: list, username: string, credential: mixed}>, * userId: ?string, * } * * @psalm-type TalkCapabilities = array{ - * features: string[], - * features-local: string[], + * features: list, + * features-local: list, * config: array{ * attachments: array{ * allowed: bool, @@ -340,8 +340,8 @@ * breakout-rooms: bool, * recording: bool, * recording-consent: int, - * supported-reactions: string[], - * predefined-backgrounds: string[], + * supported-reactions: list, + * predefined-backgrounds: list, * can-upload-background: bool, * sip-enabled: bool, * sip-dialout-enabled: bool, @@ -374,7 +374,7 @@ * hello-v2-token-key?: string, * }, * }, - * config-local: array, + * config-local: array>, * version: string, * } */ diff --git a/lib/Service/PollService.php b/lib/Service/PollService.php index 8f226bf3606..3048a2ed9fa 100644 --- a/lib/Service/PollService.php +++ b/lib/Service/PollService.php @@ -93,7 +93,7 @@ public function createPoll(int $roomId, string $actorType, string $actorId, stri /** * @param int $roomId - * @return Poll[] + * @return list */ public function getDraftsForRoom(int $roomId): array { return $this->pollMapper->getDraftsByRoomId($roomId); @@ -135,7 +135,7 @@ public function updatePoll(Participant $participant, Poll $poll): void { /** * @param Participant $participant * @param Poll $poll - * @return Vote[] + * @return list */ public function getVotesForActor(Participant $participant, Poll $poll): array { return $this->voteMapper->findByPollIdForActor( @@ -147,7 +147,7 @@ public function getVotesForActor(Participant $participant, Poll $poll): array { /** * @param Poll $poll - * @return Vote[] + * @return list */ public function getVotes(Poll $poll): array { return $this->voteMapper->findByPollId($poll->getId()); @@ -157,7 +157,7 @@ public function getVotes(Poll $poll): array { * @param Participant $participant * @param Poll $poll * @param int[] $optionIds Options the user voted for - * @return Vote[] + * @return list * @throws \RuntimeException */ public function votePoll(Participant $participant, Poll $poll, array $optionIds): array {