accessToken; } /** * Determine if the current API token has a given scope. */ public function anikeenTokenCan(string $scope): bool { $scopes = $this->accessToken ? $this->accessToken->scopes : []; return in_array('*', $scopes) || in_array($scope, $this->accessToken->scopes); } /** * Set the current access token for the user. */ public function withAnikeenAccessToken(stdClass $accessToken): self { $this->accessToken = $accessToken; return $this; } }