Browse Source

Use more precise typing for setScope method parameter

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/41017/head
Côme Chilliet 3 years ago
parent
commit
58a57a714e
No known key found for this signature in database GPG Key ID: A3E2F658B28C760A
  1. 4
      lib/private/Authentication/Token/PublicKeyToken.php

4
lib/private/Authentication/Token/PublicKeyToken.php

@ -187,11 +187,11 @@ class PublicKeyToken extends Entity implements INamedToken, IWipeableToken {
return $scope;
}
public function setScope(mixed $scope): void {
public function setScope(string|array $scope): void {
if (is_array($scope)) {
parent::setScope(json_encode($scope));
} else {
parent::setScope((string)$scope);
parent::setScope($scope);
}
}

Loading…
Cancel
Save