1 | <?php |
||
12 | abstract class TelegramMethods implements TelegramMethodDefinitions |
||
13 | { |
||
14 | /** |
||
15 | * Most of the methods will return a Message object on success, so set that as default. |
||
16 | * |
||
17 | * @return string |
||
18 | */ |
||
19 | 15 | public static function bindToObjectType(): string |
|
23 | |||
24 | /** |
||
25 | * Special transformations can be done in this method, before making the actual request this method will be called |
||
26 | * @return TelegramMethods |
||
27 | */ |
||
28 | 21 | public function performSpecialConditions(): TelegramMethods |
|
36 | } |
||
37 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: