Skip to content

Commit 175db47

Browse files
committed
Typehint and update docs.
1 parent 90be284 commit 175db47

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/TelegramFile.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class TelegramFile implements JsonSerializable
2020
*
2121
* @return self
2222
*/
23-
public static function create($content = ''): self
23+
public static function create(string $content = ''): self
2424
{
2525
return new self($content);
2626
}
@@ -30,7 +30,7 @@ public static function create($content = ''): self
3030
*
3131
* @param string $content
3232
*/
33-
public function __construct($content = '')
33+
public function __construct(string $content = '')
3434
{
3535
$this->content($content);
3636
$this->payload['parse_mode'] = 'Markdown';
@@ -39,11 +39,11 @@ public function __construct($content = '')
3939
/**
4040
* Notification message (Supports Markdown).
4141
*
42-
* @param $content
42+
* @param string $content
4343
*
4444
* @return $this
4545
*/
46-
public function content($content): self
46+
public function content(string $content): self
4747
{
4848
$this->payload['caption'] = $content;
4949

src/TelegramMessage.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class TelegramMessage implements JsonSerializable
1717
*
1818
* @return self
1919
*/
20-
public static function create($content = ''): self
20+
public static function create(string $content = ''): self
2121
{
2222
return new self($content);
2323
}
@@ -27,7 +27,7 @@ public static function create($content = ''): self
2727
*
2828
* @param string $content
2929
*/
30-
public function __construct($content = '')
30+
public function __construct(string $content = '')
3131
{
3232
$this->content($content);
3333
$this->payload['parse_mode'] = 'Markdown';
@@ -36,11 +36,11 @@ public function __construct($content = '')
3636
/**
3737
* Notification message (Supports Markdown).
3838
*
39-
* @param $content
39+
* @param string $content
4040
*
4141
* @return $this
4242
*/
43-
public function content($content): self
43+
public function content(string $content): self
4444
{
4545
$this->payload['text'] = $content;
4646

0 commit comments

Comments
 (0)