Skip to content

Commit

Permalink
Refactor parseMode
Browse files Browse the repository at this point in the history
  • Loading branch information
irazasyed committed Oct 17, 2024
1 parent fa246b5 commit b000059
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Traits/HasSharedLogic.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ public function normal(): static
/**
* Set the parse mode of the message.
*
* @param ParseMode|null $mode The parse mode to use
* @param ParseMode|string $mode The parse mode to use
*/
public function parseMode(?ParseMode $mode = null): static
public function parseMode(ParseMode|string $mode): static
{
$this->payload['parse_mode'] = $mode?->value;
$this->payload['parse_mode'] = ($mode instanceof ParseMode) ? $mode->value : $mode;

return $this;
}
Expand Down

0 comments on commit b000059

Please sign in to comment.