Skip to content

Commit

Permalink
chore: Match more strict psalm typings
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Knorr <[email protected]>
  • Loading branch information
juliusknorr committed Nov 26, 2024
1 parent a7f8f7c commit 24c69e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/AppInfo/DashboardWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function getWidgetButtons(string $userId): array {
public function getItems(string $userId, ?string $since = null, int $limit = 7): array {
$notes = $this->notesService->getTopNotes($userId);
$notes = array_slice($notes, 0, $limit);
return array_map(function (Note $note) {
return array_values(array_map(function (Note $note): WidgetItem {
$excerpt = '';
try {
$excerpt = $note->getExcerpt();
Expand All @@ -109,7 +109,7 @@ public function getItems(string $userId, ?string $since = null, int $limit = 7):
? $this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/starred.svg'))
: $this->getIconUrl();
return new WidgetItem($note->getTitle(), $excerpt, $link, $icon, (string)$note->getModified());
}, $notes);
}, $notes));
}

public function getIconUrl(): string {
Expand Down
4 changes: 4 additions & 0 deletions lib/Service/TagService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public function __construct(ITagManager $tagManager) {
$this->tagger = $tagManager->load('files');
}

/**
* @param list<int> $fileIds
* @return void
*/
public function loadTags(array $fileIds) : void {
$this->cachedTags = $this->tagger->getTagsForObjects($fileIds);
}
Expand Down

0 comments on commit 24c69e2

Please sign in to comment.