Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[main] Update nextcloud/ocp dependency #13750

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions lib/Controller/ChatController.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
* @psalm-import-type TalkChatMessage from ResponseDefinitions
* @psalm-import-type TalkChatMessageWithParent from ResponseDefinitions
* @psalm-import-type TalkChatReminder from ResponseDefinitions
* @psalm-import-type TalkRichObjectParameter from ResponseDefinitions
* @psalm-import-type TalkRoom from ResponseDefinitions
*/
class ChatController extends AEnvironmentAwareController {
Expand Down Expand Up @@ -289,8 +290,10 @@ public function shareObjectToChat(string $objectType, string $objectId, string $
return new DataResponse([], Http::STATUS_NOT_FOUND);
}

/** @var TalkRichObjectParameter $data */
$data = $metaData !== '' ? json_decode($metaData, true) : [];
if (!is_array($data)) {
/** @var TalkRichObjectParameter $data */
$data = [];
}
$data['type'] = $objectType;
Expand Down
2 changes: 1 addition & 1 deletion lib/Dashboard/TalkWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function getWidgetOptions(): WidgetOptions {
}

/**
* @return \OCP\Dashboard\Model\WidgetButton[]
* @return list<WidgetButton>
*/
public function getWidgetButtons(string $userId): array {
$buttons = [];
Expand Down
11 changes: 2 additions & 9 deletions lib/Model/AttachmentMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@
/**
* @method Attachment mapRowToEntity(array $row)
* @method Attachment findEntity(IQueryBuilder $query)
* @method Attachment[] findEntities(IQueryBuilder $query)
* @method list<Attachment> findEntities(IQueryBuilder $query)
* @template-extends QBMapper<Attachment>
*/
class AttachmentMapper extends QBMapper {
use TTransactional;

/**
* @param IDBConnection $db
*/
public function __construct(IDBConnection $db) {
parent::__construct($db, 'talk_attachments', Attachment::class);
}
Expand All @@ -42,11 +39,7 @@ public function createAttachmentFromRow(array $row): Attachment {
}

/**
* @param int $roomId
* @param string $objectType
* @param int $offset
* @param int $limit
* @return Attachment[]
* @return list<Attachment>
* @throws \OCP\DB\Exception
*/
public function getAttachmentsByType(int $roomId, string $objectType, int $offset, int $limit): array {
Expand Down
38 changes: 4 additions & 34 deletions lib/Model/AttendeeMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,15 @@
/**
* @method Attendee mapRowToEntity(array $row)
* @method Attendee findEntity(IQueryBuilder $query)
* @method Attendee[] findEntities(IQueryBuilder $query)
* @method list<Attendee> findEntities(IQueryBuilder $query)
* @template-extends QBMapper<Attendee>
*/
class AttendeeMapper extends QBMapper {
/**
* @param IDBConnection $db
*/
public function __construct(IDBConnection $db) {
parent::__construct($db, 'talk_attendees', Attendee::class);
}

/**
* @param int $roomId
* @param string $actorType
* @param string $actorId
* @return Attendee
* @throws DoesNotExistException
*/
public function findByActor(int $roomId, string $actorType, string $actorId): Attendee {
Expand All @@ -48,11 +41,8 @@ public function findByActor(int $roomId, string $actorType, string $actorId): At
}

/**
* @param int $id
* @return Attendee
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
* @throws DBException
*/
public function getById(int $id): Attendee {
$query = $this->db->getQueryBuilder();
Expand All @@ -64,10 +54,6 @@ public function getById(int $id): Attendee {
}

/**
* @param int $id
* @param string $token
* @return Attendee
* @throws DBException
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
*/
Expand All @@ -82,10 +68,7 @@ public function getByRemoteIdAndToken(int $id, string $token): Attendee {
}

/**
* @param int $roomId
* @param string $actorType
* @param int|null $lastJoinedCall
* @return Attendee[]
* @return list<Attendee>
*/
public function getActorsByType(int $roomId, string $actorType, ?int $lastJoinedCall = null): array {
$query = $this->db->getQueryBuilder();
Expand All @@ -102,10 +85,7 @@ public function getActorsByType(int $roomId, string $actorType, ?int $lastJoined
}

/**
* @param int $roomId
* @param array $actorTypes
* @param int|null $lastJoinedCall
* @return Attendee[]
* @return list<Attendee>
*/
public function getActorsByTypes(int $roomId, array $actorTypes, ?int $lastJoinedCall = null): array {
$query = $this->db->getQueryBuilder();
Expand All @@ -122,9 +102,7 @@ public function getActorsByTypes(int $roomId, array $actorTypes, ?int $lastJoine
}

/**
* @param int $roomId
* @param array $participantType
* @return Attendee[]
* @return list<Attendee>
* @throws DBException
*/
public function getActorsByParticipantTypes(int $roomId, array $participantType): array {
Expand All @@ -140,12 +118,6 @@ public function getActorsByParticipantTypes(int $roomId, array $participantType)
return $this->findEntities($query);
}

/**
* @param int $roomId
* @param string $actorType
* @param int|null $lastJoinedCall
* @return int
*/
public function getActorsCountByType(int $roomId, string $actorType, ?int $lastJoinedCall = null): int {
$query = $this->db->getQueryBuilder();
$query->select($query->func()->count('*', 'num_actors'))
Expand All @@ -165,9 +137,7 @@ public function getActorsCountByType(int $roomId, string $actorType, ?int $lastJ
}

/**
* @param int $roomId
* @param int[] $participantType
* @return int
*/
public function countActorsByParticipantType(int $roomId, array $participantType): int {
$query = $this->db->getQueryBuilder();
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/BanMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* @method Ban mapRowToEntity(array $row)
* @method Ban findEntity(IQueryBuilder $query)
* @method Ban[] findEntities(IQueryBuilder $query)
* @method list<Ban> findEntities(IQueryBuilder $query)
* @template-extends QBMapper<Ban>
*/
class BanMapper extends QBMapper {
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/BotConversationMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* @method BotConversation mapRowToEntity(array $row)
* @method BotConversation findEntity(IQueryBuilder $query)
* @method BotConversation[] findEntities(IQueryBuilder $query)
* @method list<BotConversation> findEntities(IQueryBuilder $query)
* @template-extends QBMapper<BotConversation>
*/
class BotConversationMapper extends QBMapper {
Expand All @@ -29,7 +29,7 @@ public function __construct(
}

/**
* @return BotConversation[]
* @return list<BotConversation>
*/
public function findForToken(string $token): array {
$query = $this->db->getQueryBuilder();
Expand Down
6 changes: 3 additions & 3 deletions lib/Model/BotServerMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @method BotServer mapRowToEntity(array $row)
* @method BotServer findEntity(IQueryBuilder $query)
* @method BotServer[] findEntities(IQueryBuilder $query)
* @method list<BotServer> findEntities(IQueryBuilder $query)
* @template-extends QBMapper<BotServer>
*/
class BotServerMapper extends QBMapper {
Expand Down Expand Up @@ -84,7 +84,7 @@ public function deleteById(int $botId): int {
}

/**
* @return BotServer[]
* @return list<BotServer>
*/
public function findByIds(array $botIds): array {
$query = $this->db->getQueryBuilder();
Expand All @@ -96,7 +96,7 @@ public function findByIds(array $botIds): array {
}

/**
* @return BotServer[]
* @return list<BotServer>
*/
public function getAllBots(): array {
$query = $this->db->getQueryBuilder();
Expand Down
8 changes: 4 additions & 4 deletions lib/Model/ConsentMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* @method Consent mapRowToEntity(array $row)
* @method Consent findEntity(IQueryBuilder $query)
* @method Consent[] findEntities(IQueryBuilder $query)
* @method list<Consent> findEntities(IQueryBuilder $query)
* @template-extends QBMapper<Consent>
*/
class ConsentMapper extends QBMapper {
Expand All @@ -26,7 +26,7 @@ public function __construct(
}

/**
* @return Consent[]
* @return list<Consent>
*/
public function findForToken(string $token): array {
$query = $this->db->getQueryBuilder();
Expand All @@ -46,7 +46,7 @@ public function deleteByToken(string $token): int {
}

/**
* @return Consent[]
* @return list<Consent>
*/
public function findForActor(string $actorType, string $actorId): array {
$query = $this->db->getQueryBuilder();
Expand All @@ -68,7 +68,7 @@ public function deleteByActor(string $actorType, string $actorId): int {
}

/**
* @return Consent[]
* @return list<Consent>
*/
public function findForTokenByActor(string $token, string $actorType, string $actorId): array {
$query = $this->db->getQueryBuilder();
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/InvitationMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* @method Invitation mapRowToEntity(array $row)
* @method Invitation findEntity(IQueryBuilder $query)
* @method Invitation[] findEntities(IQueryBuilder $query)
* @method list<Invitation> findEntities(IQueryBuilder $query)
* @template-extends QBMapper<Invitation>
*/
class InvitationMapper extends QBMapper {
Expand Down Expand Up @@ -66,7 +66,7 @@ public function getByRemoteAndAccessToken(

/**
* @param IUser $user
* @return Invitation[]
* @return list<Invitation>
*/
public function getInvitationsForUser(IUser $user): array {
$qb = $this->db->getQueryBuilder();
Expand Down
11 changes: 3 additions & 8 deletions lib/Model/PollMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,21 @@
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Db\MultipleObjectsReturnedException;
use OCP\AppFramework\Db\QBMapper;
use OCP\DB\Exception;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;

/**
* @method Poll findEntity(IQueryBuilder $query)
* @method list<Poll> findEntities(IQueryBuilder $query)
* @template-extends QBMapper<Poll>
*/
class PollMapper extends QBMapper {
/**
* @param IDBConnection $db
*/
public function __construct(IDBConnection $db) {
parent::__construct($db, 'talk_polls', Poll::class);
}

/**
* @return Poll[]
* @return list<Poll>
*/
public function getDraftsByRoomId(int $roomId): array {
$query = $this->db->getQueryBuilder();
Expand All @@ -43,11 +41,8 @@ public function getDraftsByRoomId(int $roomId): array {
}

/**
* @param int $pollId
* @return Poll
* @throws DoesNotExistException
* @throws MultipleObjectsReturnedException
* @throws Exception
*/
public function getByPollId(int $pollId): Poll {
$query = $this->db->getQueryBuilder();
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/ProxyCacheMessageMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* @method ProxyCacheMessage mapRowToEntity(array $row)
* @method ProxyCacheMessage findEntity(IQueryBuilder $query)
* @method ProxyCacheMessage[] findEntities(IQueryBuilder $query)
* @method list<ProxyCacheMessage> findEntities(IQueryBuilder $query)
* @template-extends QBMapper<ProxyCacheMessage>
*/
class ProxyCacheMessageMapper extends QBMapper {
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/ReminderMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* @method Reminder mapRowToEntity(array $row)
* @method Reminder findEntity(IQueryBuilder $query)
* @method Reminder[] findEntities(IQueryBuilder $query)
* @method list<Reminder> findEntities(IQueryBuilder $query)
* @template-extends QBMapper<Reminder>
*/
class ReminderMapper extends QBMapper {
Expand All @@ -44,7 +44,7 @@ public function findForUserAndMessage(string $userId, string $token, int $messag
}

/**
* @return Reminder[]
* @return list<Reminder>
*/
public function findRemindersToExecute(\DateTime $dateTime): array {
$query = $this->db->getQueryBuilder();
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/RetryNotificationMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* @method RetryNotification mapRowToEntity(array $row)
* @method RetryNotification findEntity(IQueryBuilder $query)
* @method RetryNotification[] findEntities(IQueryBuilder $query)
* @method list<RetryNotification> findEntities(IQueryBuilder $query)
* @template-extends QBMapper<RetryNotification>
*/
class RetryNotificationMapper extends QBMapper {
Expand All @@ -26,7 +26,7 @@ public function __construct(
}

/**
* @return RetryNotification[]
* @return list<RetryNotification>
*/
public function getAllDue(\DateTimeInterface $dueDateTime, ?int $limit = 500): array {
$query = $this->db->getQueryBuilder();
Expand Down
Loading
Loading