1
0

FakeManager.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace Test\Comments;
  8. use OC\Comments\Comment;
  9. use OCP\Comments\IComment;
  10. use OCP\Comments\ICommentsManager;
  11. use OCP\IUser;
  12. /**
  13. * Class FakeManager
  14. */
  15. class FakeManager implements ICommentsManager {
  16. public function get($id) {
  17. }
  18. public function getTree($id, $limit = 0, $offset = 0) {
  19. }
  20. public function getForObject(
  21. $objectType,
  22. $objectId,
  23. $limit = 0,
  24. $offset = 0,
  25. ?\DateTime $notOlderThan = null,
  26. ) {
  27. }
  28. public function getForObjectSince(
  29. string $objectType,
  30. string $objectId,
  31. int $lastKnownCommentId,
  32. string $sortDirection = 'asc',
  33. int $limit = 30,
  34. bool $includeLastKnown = false,
  35. ): array {
  36. return [];
  37. }
  38. public function getCommentsWithVerbForObjectSinceComment(
  39. string $objectType,
  40. string $objectId,
  41. array $verbs,
  42. int $lastKnownCommentId,
  43. string $sortDirection = 'asc',
  44. int $limit = 30,
  45. bool $includeLastKnown = false,
  46. ): array {
  47. return [];
  48. }
  49. public function getNumberOfCommentsForObject($objectType, $objectId, ?\DateTime $notOlderThan = null, $verb = '') {
  50. }
  51. public function search(string $search, string $objectType, string $objectId, string $verb, int $offset, int $limit = 50): array {
  52. return [];
  53. }
  54. public function create($actorType, $actorId, $objectType, $objectId) {
  55. }
  56. public function delete($id) {
  57. }
  58. public function getReactionComment(int $parentId, string $actorType, string $actorId, string $reaction): IComment {
  59. return new Comment();
  60. }
  61. public function retrieveAllReactions(int $parentId): array {
  62. return [];
  63. }
  64. public function retrieveAllReactionsWithSpecificReaction(int $parentId, string $reaction): array {
  65. return [];
  66. }
  67. public function supportReactions(): bool {
  68. return false;
  69. }
  70. public function save(IComment $comment) {
  71. }
  72. public function deleteReferencesOfActor($actorType, $actorId) {
  73. }
  74. public function deleteCommentsAtObject($objectType, $objectId) {
  75. }
  76. public function setReadMark($objectType, $objectId, \DateTime $dateTime, IUser $user) {
  77. }
  78. public function getReadMark($objectType, $objectId, IUser $user) {
  79. }
  80. public function deleteReadMarksFromUser(IUser $user) {
  81. }
  82. public function deleteReadMarksOnObject($objectType, $objectId) {
  83. }
  84. public function registerEventHandler(\Closure $closure) {
  85. }
  86. public function registerDisplayNameResolver($type, \Closure $closure) {
  87. }
  88. public function resolveDisplayName($type, $id) {
  89. }
  90. public function getNumberOfUnreadCommentsForFolder($folderId, IUser $user) {
  91. }
  92. public function getNumberOfUnreadCommentsForObjects(string $objectType, array $objectIds, IUser $user, $verb = ''): array {
  93. return [];
  94. }
  95. public function getActorsInTree($id) {
  96. }
  97. public function load(): void {
  98. }
  99. public function searchForObjects(string $search, string $objectType, array $objectIds, string $verb, int $offset, int $limit = 50): array {
  100. return [];
  101. }
  102. public function getNumberOfCommentsForObjectSinceComment(string $objectType, string $objectId, int $lastRead, string $verb = ''): int {
  103. return 0;
  104. }
  105. public function getNumberOfCommentsWithVerbsForObjectSinceComment(string $objectType, string $objectId, int $lastRead, array $verbs): int {
  106. return 0;
  107. }
  108. public function getLastCommentBeforeDate(string $objectType, string $objectId, \DateTime $beforeDate, string $verb = ''): int {
  109. return 0;
  110. }
  111. public function getLastCommentDateByActor(string $objectType, string $objectId, string $verb, string $actorType, array $actors): array {
  112. return [];
  113. }
  114. public function deleteCommentsExpiredAtObject(string $objectType, string $objectId = ''): bool {
  115. return true;
  116. }
  117. }