FakeManager.php 3.5 KB

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