We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 4 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4.3731 |
Changes | 0 |
1 | <?php |
||
48 | 1 | public function __construct($base = null, $chars = null) |
|
49 | { |
||
50 | 1 | if (!is_null($chars)) { |
|
51 | $this->chars = $chars; |
||
52 | } |
||
53 | |||
54 | 1 | $max = mb_strlen($this->chars); |
|
55 | 1 | if (!is_numeric($base) || $base > $max) { |
|
56 | throw new ComponentException(sprintf('a base between 1 and %s is required', $max)); |
||
57 | } |
||
58 | 1 | $this->base = $base; |
|
59 | 1 | } |
|
71 |