| Total Complexity | 6 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 65% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 9 | class LocaleIdentifierFakerData extends AbstractFakerDataProvider |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var string[] |
||
| 14 | */ |
||
| 15 | private static $locales; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * LocaleIdentifierFakerDataProvider constructor. |
||
| 19 | * |
||
| 20 | * @param Generator $generator |
||
| 21 | * @SuppressWarnings(PHPMD.StaticAccess) |
||
| 22 | */ |
||
| 23 | 2 | public function __construct(Generator $generator) |
|
| 24 | { |
||
| 25 | 2 | parent::__construct($generator); |
|
| 26 | 2 | if (null === self::$locales) { |
|
|
|
|||
| 27 | 1 | self::$locales = Intl::getLocaleBundle()->getLocaleNames(); |
|
| 28 | } |
||
| 29 | 2 | } |
|
| 30 | |||
| 31 | 2 | public function __invoke(): string |
|
| 38 | } |
||
| 39 | |||
| 40 | 2 | private function isValid(string $value): bool |
|
| 49 |