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