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