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 | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2.0932 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | 1 | public function __construct(string $countryCode) |
|
| 42 | { |
||
| 43 | 1 | $normalized = ucfirst(mb_strtolower($countryCode)); |
|
| 44 | 1 | $className = sprintf('%s\\Locale\\%s%s', __NAMESPACE__, $normalized, $this->getSuffix()); |
|
| 45 | 1 | if (!class_exists($className)) { |
|
| 46 | 1 | throw new ComponentException(sprintf('"%s" is not a supported country code', $countryCode)); |
|
| 47 | } |
||
| 48 | |||
| 49 | $this->countryCode = $countryCode; |
||
| 50 | parent::__construct(new $className()); |
||
| 51 | } |
||
| 60 |