Refix scope
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
991d9b5c3a
commit
4ea2daf04d
|
@ -158,9 +158,11 @@ class DefaultToken extends Entity implements IToken {
|
||||||
return $scope;
|
return $scope;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setScope(array $scope = null) {
|
public function setScope($scope) {
|
||||||
if ($scope !== null) {
|
if (\is_array($scope)) {
|
||||||
parent::setScope(json_encode($scope));
|
parent::setScope(json_encode($scope));
|
||||||
|
} else {
|
||||||
|
parent::setScope((string)$scope);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ interface IToken extends JsonSerializable {
|
||||||
*
|
*
|
||||||
* @param array $scope
|
* @param array $scope
|
||||||
*/
|
*/
|
||||||
public function setScope(array $scope = null);
|
public function setScope($scope);
|
||||||
|
|
||||||
public function getName(): string;
|
public function getName(): string;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue