Conditions | 3 |
Paths | 4 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
41 | public function addButton(string $text, boolean $request_contact = null, boolean $request_location = null){ |
||
42 | $this->keyboard[$this->current_row][] = [ |
||
43 | 'text' => $text, |
||
44 | 'request_contact' => ($request_contact != null) ? $request_contact : false, |
||
45 | 'request_location' => ($request_location != null) ? $request_location : false |
||
46 | ]; |
||
47 | |||
48 | return $this; |
||
49 | } |
||
50 | |||
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.