Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | 54 | public function __construct(int $qosLevel = 0) |
|
33 | { |
||
34 | 54 | if ($qosLevel > 2 || $qosLevel < 0) { |
|
35 | 1 | throw new InvalidQoSLevel(sprintf( |
|
36 | 1 | 'The provided QoS level is invalid. Valid values are 0, 1 and 2 (Provided: %d)', |
|
37 | $qosLevel |
||
38 | )); |
||
39 | } |
||
40 | |||
41 | 53 | $this->qosLevel = $qosLevel; |
|
42 | 53 | } |
|
59 |