| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function addButton(int $row, KeyboardButton $button, bool $first = false): static |
||
| 20 | { |
||
| 21 | if (empty($this->keyboard[$row])) { |
||
| 22 | throw new InvalidArgumentException('Row not found'); |
||
| 23 | } |
||
| 24 | if ($first) { |
||
| 25 | array_unshift($this->keyboard[$row], $button); |
||
| 26 | return $this; |
||
| 27 | } |
||
| 28 | array_push($this->keyboard[$row], $button); |
||
| 29 | return $this; |
||
| 30 | } |
||
| 71 | } |