| Total Complexity | 3 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class ButtonTemplate extends Template |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $text; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var \Kerox\Messenger\Model\Common\Button\AbstractButton[] |
||
| 18 | */ |
||
| 19 | protected $buttons; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Buttons constructor. |
||
| 23 | * |
||
| 24 | * @param string $text |
||
| 25 | * @param \Kerox\Messenger\Model\Common\Button\AbstractButton[] $buttons |
||
| 26 | * |
||
| 27 | * @throws \InvalidArgumentException |
||
| 28 | */ |
||
| 29 | public function __construct(string $text, array $buttons) |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param string $text |
||
| 42 | * @param array $buttons |
||
| 43 | * |
||
| 44 | * @throws \InvalidArgumentException |
||
| 45 | * |
||
| 46 | * @return \Kerox\Messenger\Model\Message\Attachment\Template\ButtonTemplate |
||
| 47 | */ |
||
| 48 | public static function create(string $text, array $buttons): self |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return array |
||
| 55 | */ |
||
| 56 | public function toArray(): array |
||
| 70 |