| Total Complexity | 6 |
| Total Lines | 72 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | abstract class Confirmable extends BlockElement |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Action triggered when the element is interacted with. |
||
| 12 | * |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | protected $action_id; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Confirmation object. |
||
| 19 | * |
||
| 20 | * @var \Maknz\Slack\CompositionObject\Confirmation |
||
| 21 | */ |
||
| 22 | protected $confirm; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Get the element's action identifier. |
||
| 26 | * |
||
| 27 | * @return string |
||
| 28 | */ |
||
| 29 | 33 | public function getActionId() |
|
| 30 | { |
||
| 31 | 33 | return $this->action_id; |
|
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Set the element's action identifier. |
||
| 36 | * |
||
| 37 | * @param string $actionId |
||
| 38 | * |
||
| 39 | * @return $this |
||
| 40 | */ |
||
| 41 | 62 | public function setActionId($actionId) |
|
| 42 | { |
||
| 43 | 62 | $this->action_id = $actionId; |
|
| 44 | |||
| 45 | 62 | return $this; |
|
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Get the confirmation object. |
||
| 50 | * |
||
| 51 | * @return \Maknz\Slack\CompositionObject\Confirmation |
||
| 52 | */ |
||
| 53 | 33 | public function getConfirm() |
|
| 54 | { |
||
| 55 | 33 | return $this->confirm; |
|
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Set the confirmation object. |
||
| 60 | * |
||
| 61 | * @param mixed $confirm |
||
| 62 | * |
||
| 63 | * @return $this |
||
| 64 | * |
||
| 65 | * @throws \InvalidArgumentException |
||
| 66 | */ |
||
| 67 | 19 | public function setConfirm($confirm) |
|
| 80 | } |
||
| 81 | } |
||
| 82 |