1 | <?php |
||
18 | class Update extends AbstractFiller |
||
19 | { |
||
20 | /** |
||
21 | * The update‘s unique identifier. Update identifiers start from a certain positive number and increase |
||
22 | * sequentially. This ID becomes especially handy if you’re using Webhooks, since it allows you to ignore repeated |
||
23 | * updates or to restore the correct update sequence, should they get out of order. |
||
24 | * @var int |
||
25 | */ |
||
26 | public $update_id = 0; |
||
27 | |||
28 | /** |
||
29 | * Optional. New incoming message of any kind — text, photo, sticker, etc. |
||
30 | * @var Message |
||
31 | */ |
||
32 | public $message = null; |
||
33 | |||
34 | /** |
||
35 | * Optional. New incoming inline query |
||
36 | * @var null |
||
37 | */ |
||
38 | public $inline_query = null; |
||
39 | |||
40 | /** |
||
41 | * Optional. The result of a inline query that was chosen by a user and sent to their chat partner |
||
42 | * @var null |
||
43 | */ |
||
44 | public $chosen_inline_result = null; |
||
45 | |||
46 | 1 | protected function mapSubObjects(): array |
|
54 | } |
||
55 |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.