public function setAccessToken($accessToken) { if (is_string($accessToken)) { $this->accessToken = $accessToken; return $this; } throw new \InvalidArgumentException('The Telegram bot access token must be of type "string"'); }