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 | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | 2 | public function __construct($countryCode) |
|
| 21 | { |
||
| 22 | 2 | $shortName = ucfirst(strtolower($countryCode)).'Vatin'; |
|
| 23 | 2 | $className = __NAMESPACE__.'\\Locale\\'.$shortName; |
|
| 24 | 2 | if (!class_exists($className)) { |
|
| 25 | 1 | $message = sprintf('There is no support for VAT identification number from "%s"', $countryCode); |
|
| 26 | 1 | throw new ComponentException($message); |
|
| 27 | } |
||
| 28 | |||
| 29 | 1 | $this->countryCode = $countryCode; |
|
| 30 | 1 | $this->validatable = new $className(); |
|
| 31 | 1 | } |
|
| 32 | } |
||
| 33 |