Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
31 | 25 | public function __construct(int $brokerPort = 1883) |
|
32 | { |
||
33 | 25 | if ($brokerPort > 65535 || $brokerPort < 1) { |
|
34 | 2 | throw new InvalidBrokerPort(sprintf( |
|
35 | 2 | 'The provided broker port is invalid. Valid values are between 1 and 65535 (Provided: %d)', |
|
36 | 2 | $brokerPort |
|
37 | )); |
||
38 | } |
||
39 | |||
40 | 23 | $this->brokerPort = $brokerPort; |
|
41 | 23 | } |
|
53 |