We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2.0078 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | 5 | public function __construct($countryCode) |
|
21 | { |
||
22 | 5 | $shortName = ucfirst(mb_strtolower($countryCode)).'IdentityCard'; |
|
23 | 5 | $className = __NAMESPACE__.'\\Locale\\'.$shortName; |
|
24 | 5 | if (!class_exists($className)) { |
|
25 | throw new ComponentException(sprintf('There is no support for identity cards from "%s"', $countryCode)); |
||
26 | } |
||
27 | |||
28 | 5 | $this->countryCode = $countryCode; |
|
29 | 5 | $this->validatable = new $className(); |
|
30 | 5 | } |
|
31 | } |
||
32 |