File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 15
15
strategy :
16
16
fail-fast : true
17
17
matrix :
18
- php : ['8.1', '8. 2', '8.3']
18
+ php : ['8.2', '8.3']
19
19
dependencies : [lowest, highest]
20
20
experimental : [false]
21
21
Original file line number Diff line number Diff line change 14
14
*/
15
15
class Telegram
16
16
{
17
- /** @var HttpClient HTTP Client */
18
- protected readonly HttpClient $ http ;
19
-
20
- /** @var null|string Telegram Bot API Token. */
21
- protected ?string $ token ;
22
-
23
17
/** @var string Telegram Bot API Base URI */
24
18
protected string $ apiBaseUri ;
25
19
26
20
public function __construct (
27
- ?string $ token = null ,
28
- HttpClient $ httpClient = new HttpClient ,
21
+ protected ?string $ token = null ,
22
+ protected HttpClient $ http = new HttpClient ,
29
23
string $ apiBaseUri = 'https://api.telegram.org '
30
24
) {
31
- $ this ->token = $ token ;
32
- $ this ->http = $ httpClient ;
33
25
$ this ->setApiBaseUri ($ apiBaseUri );
34
26
}
35
27
@@ -115,9 +107,9 @@ public function sendMessage(array $params): ?ResponseInterface
115
107
*
116
108
* @throws CouldNotSendNotification
117
109
*/
118
- public function sendFile (array $ params , string | array $ type , bool $ multipart = false ): ?ResponseInterface
110
+ public function sendFile (array $ params , string $ type , bool $ multipart = false ): ?ResponseInterface
119
111
{
120
- return $ this ->sendRequest ('send ' .Str::studly (( array ) $ type[ 0 ] ), $ params , $ multipart );
112
+ return $ this ->sendRequest ('send ' .Str::studly ($ type ), $ params , $ multipart );
121
113
}
122
114
123
115
/**
You can’t perform that action at this time.
0 commit comments