Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
26 | 4 | public function __construct($bytes_length = 8) |
|
27 | { |
||
28 | 4 | if (!is_int($bytes_length)) { |
|
29 | 1 | throw new ArgumentTypeException(sprintf('Length of bytes should be integer, got "%s" instead.', gettype($bytes_length))); |
|
30 | } |
||
31 | |||
32 | 3 | if ($bytes_length <= 0) { |
|
33 | 1 | throw new ZeroArgumentException(sprintf('Length of bytes should be grate then "0", got "%d" instead.', $bytes_length)); |
|
34 | } |
||
35 | |||
36 | 2 | $this->bytes_length = $bytes_length; |
|
37 | 2 | } |
|
38 | |||
51 |