| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4.3244 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 4 | public function __construct(string $text, string $value, string $url = '') |
|
| 31 | { |
||
| 32 | 4 | if (\strlen($text) > 75) { |
|
| 33 | throw new \InvalidArgumentException('$text too long!'); |
||
| 34 | } |
||
| 35 | 4 | if (\strlen($value) > 75) { |
|
| 36 | throw new \InvalidArgumentException('$value too long!'); |
||
| 37 | } |
||
| 38 | 4 | if (\strlen($url) > 3000) { |
|
| 39 | throw new \InvalidArgumentException('$url too long!'); |
||
| 40 | } |
||
| 41 | |||
| 42 | 4 | $this->text = new PlainTextElement($text); |
|
| 43 | 4 | $this->value = $value; |
|
| 44 | 4 | $this->url = $url; |
|
| 45 | 4 | } |
|
| 46 | } |
||
| 47 |