| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4.432 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 2 | public function __construct(string $label, OptionObject ...$options) |
|
| 29 | { |
||
| 30 | 2 | if (\strlen($label) > 75) { |
|
| 31 | throw new \InvalidArgumentException('$label too long!'); |
||
| 32 | } |
||
| 33 | 2 | if (\count($options) > 100) { |
|
| 34 | throw new \InvalidArgumentException('$options too long!'); |
||
| 35 | } |
||
| 36 | 2 | if (0 === \count($options)) { |
|
| 37 | throw new \InvalidArgumentException('$options too short!'); |
||
| 38 | } |
||
| 39 | |||
| 40 | 2 | $this->label = new PlainTextElement($label); |
|
| 41 | 2 | $this->options = $options; |
|
| 42 | 2 | } |
|
| 43 | } |
||
| 44 |