Skip to content

Commit

Permalink
Merge pull request #1054 from irpcpro/patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
irazasyed authored Apr 5, 2023
2 parents 2aff248 + 23c5f81 commit 63ea11a
Showing 1 changed file with 5 additions and 5 deletions.
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

0 comments on commit 63ea11a

Please sign in to comment.