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