| Conditions | 4 |
| Paths | 4 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function __construct(string $placeholder, string $actionId, ConfirmationDialogObject $confirmDialog = null, OptionObject ...$options) |
||
| 36 | { |
||
| 37 | if (\strlen($actionId) > 255) { |
||
| 38 | throw new \InvalidArgumentException('$actionId too long!'); |
||
| 39 | } |
||
| 40 | if (\count($options) > 5) { |
||
| 41 | throw new \InvalidArgumentException('$options too long!'); |
||
| 42 | } |
||
| 43 | if (\count($options) < 2) { |
||
| 44 | throw new \InvalidArgumentException('$options too short!'); |
||
| 45 | } |
||
| 46 | |||
| 47 | $this->type = MessageTypeEnum::ELEMENT_OVERFLOW_MENU; |
||
| 48 | $this->placeholder = new PlainTextElement($placeholder); |
||
| 49 | $this->actionId = $actionId; |
||
| 50 | $this->confirmDialog = $confirmDialog; |
||
| 51 | $this->options = $options; |
||
| 52 | } |
||
| 53 | } |
||
| 54 |