1 | <?php |
||
5 | class Standard { |
||
6 | |||
7 | public |
||
8 | $keyboard = [], |
||
9 | $resize_keyboard, |
||
10 | $one_time_keyboard, |
||
11 | $selective; |
||
12 | |||
13 | private |
||
14 | $current_row = 0; |
||
15 | |||
16 | public function __construct($resize_keyboard = false, $one_time_keyboard = false, $selective = false) { |
||
21 | |||
22 | /** |
||
23 | * Create new row. |
||
24 | * |
||
25 | * @return object Standard |
||
26 | */ |
||
27 | public function addRow(){ |
||
32 | |||
33 | /** |
||
34 | * Add new button to current row. |
||
35 | * |
||
36 | * @param string $text Text of the button. If none of the optional fields are used, it will be sent to the bot as a message when the button is pressed |
||
37 | * @param boolean $request_contact Optional. If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only |
||
38 | * @param boolean $request_location Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats only |
||
39 | * @return object |
||
40 | */ |
||
41 | public function addButton(string $text, boolean $request_contact = null, boolean $request_location = null){ |
||
50 | |||
51 | } |
||
52 |
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.