Conditions | 4 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4 |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
21 | 6 | public function __construct($message = '', $code = 0, Exception $previous = null) |
|
22 | { |
||
23 | 6 | if (!is_int($code) || $code < 0 || $code > 255) { |
|
24 | 2 | throw new \InvalidArgumentException(sprintf( |
|
25 | 2 | 'Code must be integer in range from 0 to 255, %s given', |
|
26 | 2 | var_export($code, true) |
|
27 | )); |
||
28 | } |
||
29 | |||
30 | 4 | parent::__construct($message, $code, $previous); |
|
31 | 4 | } |
|
33 |