1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* Class that represents Telegram's Bot-API "sendPhoto" method. |
5
|
|
|
* |
6
|
|
|
* @package Teebot (Telegram bot framework) |
7
|
|
|
* |
8
|
|
|
* @author Stanislav Drozdov <[email protected]> |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace Teebot\Api\Method; |
12
|
|
|
|
13
|
|
|
use Teebot\Api\Entity\Message; |
14
|
|
|
use Teebot\Api\Traits\File; |
15
|
|
|
use Teebot\Api\Entity\InputFile; |
16
|
|
|
|
17
|
|
|
class SendPhoto extends AbstractMethod |
18
|
|
|
{ |
19
|
|
|
use File; |
20
|
|
|
|
21
|
|
|
const NAME = 'sendPhoto'; |
22
|
|
|
|
23
|
|
|
const RETURN_ENTITY = Message::class; |
24
|
|
|
|
25
|
|
|
protected $chat_id; |
26
|
|
|
|
27
|
|
|
protected $photo; |
28
|
|
|
|
29
|
|
|
protected $caption; |
30
|
|
|
|
31
|
|
|
protected $disable_notification; |
32
|
|
|
|
33
|
|
|
protected $reply_to_message_id; |
34
|
|
|
|
35
|
|
|
protected $reply_markup; |
36
|
|
|
|
37
|
|
|
protected $supportedProperties = [ |
38
|
|
|
'chat_id' => true, |
39
|
|
|
'photo' => true, |
40
|
|
|
'caption' => false, |
41
|
|
|
'disable_notification' => false, |
42
|
|
|
'reply_to_message_id' => false, |
43
|
|
|
'reply_markup' => false |
44
|
|
|
]; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @return mixed |
48
|
|
|
*/ |
49
|
|
|
public function getChatId() |
50
|
|
|
{ |
51
|
|
|
return $this->chat_id; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @param mixed $chat_id |
56
|
|
|
* |
57
|
|
|
* @return $this |
58
|
|
|
*/ |
59
|
|
|
public function setChatId($chat_id) |
60
|
|
|
{ |
61
|
|
|
$this->chat_id = $chat_id; |
62
|
|
|
|
63
|
|
|
return $this; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @return \CURLFile|string |
|
|
|
|
68
|
|
|
*/ |
69
|
|
|
public function getPhoto() |
70
|
|
|
{ |
71
|
|
|
return $this->photo; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @param string $photo |
76
|
|
|
* |
77
|
|
|
* @return $this |
78
|
|
|
*/ |
79
|
|
|
public function setPhoto($photo) |
80
|
|
|
{ |
81
|
|
|
$this->photo = $this->initInputFile($photo); |
82
|
|
|
|
83
|
|
|
return $this; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @return mixed |
88
|
|
|
*/ |
89
|
|
|
public function getCaption() |
90
|
|
|
{ |
91
|
|
|
return $this->caption; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @param mixed $caption |
96
|
|
|
* |
97
|
|
|
* @return $this |
98
|
|
|
*/ |
99
|
|
|
public function setCaption($caption) |
100
|
|
|
{ |
101
|
|
|
$this->caption = $caption; |
102
|
|
|
|
103
|
|
|
return $this; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* @return mixed |
108
|
|
|
*/ |
109
|
|
|
public function getDisableNotification() |
110
|
|
|
{ |
111
|
|
|
return $this->disable_notification; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @param mixed $disable_notification |
116
|
|
|
* |
117
|
|
|
* @return $this |
118
|
|
|
*/ |
119
|
|
|
public function setDisableNotification($disable_notification) |
120
|
|
|
{ |
121
|
|
|
$this->disable_notification = $disable_notification; |
122
|
|
|
|
123
|
|
|
return $this; |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @return mixed |
128
|
|
|
*/ |
129
|
|
|
public function getReplyToMessageId() |
130
|
|
|
{ |
131
|
|
|
return $this->reply_to_message_id; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @param mixed $reply_to_message_id |
136
|
|
|
* |
137
|
|
|
* @return $this |
138
|
|
|
*/ |
139
|
|
|
public function setReplyToMessageId($reply_to_message_id) |
140
|
|
|
{ |
141
|
|
|
$this->reply_to_message_id = $reply_to_message_id; |
142
|
|
|
|
143
|
|
|
return $this; |
144
|
|
|
} |
145
|
|
|
} |
146
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths