Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | 44 | public function __construct(int $packetIdentifier) |
|
32 | { |
||
33 | 44 | if ($packetIdentifier > 65535 || $packetIdentifier < 1) { |
|
34 | 4 | throw new \OutOfRangeException(sprintf( |
|
35 | 4 | 'The provided packet identifier is invalid. Valid values are 1-65535 (Provided: %d)', |
|
36 | $packetIdentifier |
||
37 | )); |
||
38 | } |
||
39 | |||
40 | 40 | $this->packetIdentifier = $packetIdentifier; |
|
41 | 40 | } |
|
60 |