1 | <?php |
||
22 | class Bot |
||
23 | { |
||
24 | /** |
||
25 | * Bot constructor. |
||
26 | * @param null|string $token |
||
27 | * @param array $options |
||
28 | * @throws TelegramCoreException |
||
29 | 1 | */ |
|
30 | public function __construct($token = null, $options = []) |
||
41 | 1 | ||
42 | public function message() |
||
46 | |||
47 | public function getMe() |
||
53 | |||
54 | public function send($method, $params = []) |
||
63 | |||
64 | |||
65 | } |
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: