Skip to content

Commit 3999dcf

Browse files
Merge pull request #54689 from nextcloud/bugfix/noid/fix-missing-return-type
2 parents c0595e9 + 102c778 commit 3999dcf

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/public/Comments/ICommentsManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public function searchForObjects(string $search, string $objectType, array $obje
181181
* @param \DateTime|null $notOlderThan optional, timestamp of the oldest comments
182182
* that may be returned
183183
* @param string $verb Limit the verb of the comment - Added in 14.0.0
184-
* @return Int
184+
* @return int
185185
* @since 9.0.0
186186
*/
187187
public function getNumberOfCommentsForObject($objectType, $objectId, ?\DateTime $notOlderThan = null, $verb = '');
@@ -195,7 +195,7 @@ public function getNumberOfCommentsForObject($objectType, $objectId, ?\DateTime
195195
* @return array<string, int>
196196
* @since 32.0.0
197197
*/
198-
public function getNumberOfCommentsForObjects(string $objectType, array $objectIds, ?\DateTime $notOlderThan = null, string $verb = '');
198+
public function getNumberOfCommentsForObjects(string $objectType, array $objectIds, ?\DateTime $notOlderThan = null, string $verb = ''): array;
199199

200200
/**
201201
* @param string $objectType the object type, e.g. 'files'

tests/lib/Comments/FakeManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ public function getCommentsWithVerbForObjectSinceComment(
5656
return [];
5757
}
5858

59-
public function getNumberOfCommentsForObject($objectType, $objectId, ?\DateTime $notOlderThan = null, $verb = '') {
59+
public function getNumberOfCommentsForObject($objectType, $objectId, ?\DateTime $notOlderThan = null, $verb = ''): int {
6060
}
6161

62-
public function getNumberOfCommentsForObjects(string $objectType, array $objectIds, ?\DateTime $notOlderThan = null, string $verb = '') :array {
62+
public function getNumberOfCommentsForObjects(string $objectType, array $objectIds, ?\DateTime $notOlderThan = null, string $verb = ''): array {
6363
return array_fill_keys($objectIds, 0);
6464
}
6565

0 commit comments

Comments
 (0)