| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | 8 | public function __construct(int $firstByte, int $lastByte) |
|
| 22 | { |
||
| 23 | 8 | if ($firstByte < 0 || $lastByte < $firstByte) { |
|
| 24 | 2 | throw new \InvalidArgumentException( |
|
| 25 | 2 | 'Last byte must be greater than first byte, and first byte must be greater than zero' |
|
| 26 | ); |
||
| 27 | } |
||
| 28 | |||
| 29 | 6 | $this->firstByte = $firstByte; |
|
| 30 | 6 | $this->lastByte = $lastByte; |
|
| 31 | 6 | } |
|
| 32 | |||
| 58 | } |