Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TelegramRequest.php #1054

Merged
merged 1 commit into from
Apr 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/TelegramRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ final class TelegramRequest
private ?string $accessToken;

/** @var string The HTTP method for this request. */
private string $method;
private ?string $method;

/** @var string The API endpoint for this request. */
private string $endpoint;
private ?string $endpoint;

/** @var array The headers to send with this request. */
private array $headers = [];
Expand Down Expand Up @@ -87,7 +87,7 @@ public function getAccessToken(): ?string
/**
* Set the bot access token for this request.
*/
public function setAccessToken(string $accessToken): self
public function setAccessToken(string|null $accessToken): self
{
$this->accessToken = $accessToken;

Expand Down Expand Up @@ -121,7 +121,7 @@ public function getEndpoint(): string
/**
* Set the endpoint for this request.
*/
public function setEndpoint(string $endpoint): self
public function setEndpoint(string|null $endpoint): self
{
$this->endpoint = $endpoint;

Expand Down Expand Up @@ -189,7 +189,7 @@ public function getMethod(): string
/**
* Set the HTTP method for this request.
*/
public function setMethod(string $method): self
public function setMethod(string|null $method): self
{
$this->method = strtoupper($method);

Expand Down