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