Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function __construct($value, $visible = true) |
||
20 | { |
||
21 | // Try constructing a LabelName object, so the same validation rules hold. |
||
22 | $this->labelName = new LabelName($value); |
||
23 | |||
24 | if (!is_bool($visible)) { |
||
25 | throw new \InvalidArgumentException(sprintf( |
||
26 | 'Value for argument $visible should be a boolean, got a value of type %s.', |
||
27 | gettype($visible) |
||
28 | )); |
||
29 | } |
||
30 | |||
31 | $this->visible = $visible; |
||
32 | } |
||
33 | |||
59 |