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 |
||
| 22 | 5 | public function __construct($countryCode) |
|
| 23 | { |
||
| 24 | 5 | $shortName = ucfirst(mb_strtolower($countryCode)).'IdentityCard'; |
|
| 25 | 5 | $className = __NAMESPACE__.'\\Locale\\'.$shortName; |
|
| 26 | 5 | if (!class_exists($className)) { |
|
| 27 | throw new ComponentException(sprintf('There is no support for identity cards from "%s"', $countryCode)); |
||
| 28 | } |
||
| 29 | |||
| 30 | 5 | $this->countryCode = $countryCode; |
|
| 31 | 5 | $this->validatable = new $className(); |
|
| 32 | 5 | } |
|
| 33 | } |
||
| 34 |