Skip to content

Commit

Permalink
chore(Page): extend parameter type to IToken|INamedToken
Browse files Browse the repository at this point in the history
Otherwise Psalm would complain

   OC\Authentication\Token\IToken
   does not contain
   OC\Authentication\Token\INamedToken

which is understandable.
  • Loading branch information
thlehmann-ionos committed Aug 20, 2024
1 parent e426182 commit cfe09e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private function getAppTokens(): array {
return [];
}

return array_map(function (IToken $token) use ($sessionToken) {
return array_map(function (IToken|INamedToken $token) use ($sessionToken) {
$data = $token->jsonSerialize();
$data['canDelete'] = true;
$data['canRename'] = $token instanceof INamedToken && $data['type'] !== IToken::WIPE_TOKEN;
Expand Down

0 comments on commit cfe09e7

Please sign in to comment.