| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function __construct(string $label, InputBlockElementInterface $element, bool $optional = false, string $hint = '') |
||
| 36 | { |
||
| 37 | if (\strlen($label) > 2000) { |
||
| 38 | throw new \InvalidArgumentException('$label too long!'); |
||
| 39 | } |
||
| 40 | if (\strlen($hint) > 2000) { |
||
| 41 | throw new \InvalidArgumentException('$hint too long!'); |
||
| 42 | } |
||
| 43 | $this->type = MessageTypeEnum::BLOCK_INPUT; |
||
| 44 | $this->label = new PlainTextElement($label); |
||
| 45 | $this->element = $element; |
||
| 46 | $this->optional = $optional; |
||
| 47 | if ('' !== $hint) { |
||
| 48 | $this->hint = new PlainTextElement($hint); |
||
| 49 | } |
||
| 50 | } |
||
| 51 | } |
||
| 52 |