| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function __construct(string $actionId, string $placeholder = '', string $initialValue = '', bool $multiline = false, int $minLength = 1, int $maxLength = 3000) |
||
| 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_INPUT_PLAIN_TEXT; |
||
| 47 | $this->actionId = $actionId; |
||
| 48 | $this->placeholder = new PlainTextElement($placeholder); |
||
| 49 | $this->initialValue = $initialValue; |
||
| 50 | $this->multiline = $multiline; |
||
| 51 | $this->minLength = $minLength; |
||
| 52 | $this->maxLength = $maxLength; |
||
| 53 | } |
||
| 54 | } |
||
| 55 |