Framework Update
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Respect/Validation.
|
||||
*
|
||||
* (c) Alexandre Gomes Gaigalas <alexandre@gaigalas.net>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE file
|
||||
* that was distributed with this source code.
|
||||
* Copyright (c) Alexandre Gomes Gaigalas <alganet@gmail.com>
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
@@ -25,7 +21,7 @@ use function sprintf;
|
||||
*
|
||||
* This rule supports the three sets of country codes (alpha-2, alpha-3, and numeric).
|
||||
*
|
||||
* @author Alexandre Gomes Gaigalas <alexandre@gaigalas.net>
|
||||
* @author Alexandre Gomes Gaigalas <alganet@gmail.com>
|
||||
* @author Felipe Martins <me@fefas.net>
|
||||
* @author Henrique Moody <henriquemoody@gmail.com>
|
||||
* @author William Espindola <oi@williamespindola.com.br>
|
||||
@@ -60,6 +56,7 @@ final class CountryCode extends AbstractSearcher
|
||||
* @see https://salsa.debian.org/iso-codes-team/iso-codes
|
||||
*/
|
||||
private const COUNTRY_CODES = [
|
||||
// begin of auto-generated code
|
||||
['AD', 'AND', '020'], // Andorra
|
||||
['AE', 'ARE', '784'], // United Arab Emirates
|
||||
['AF', 'AFG', '004'], // Afghanistan
|
||||
@@ -310,7 +307,7 @@ final class CountryCode extends AbstractSearcher
|
||||
['TN', 'TUN', '788'], // Tunisia
|
||||
['TO', 'TON', '776'], // Tonga
|
||||
['TP', 'TMP', '626'], // East Timor
|
||||
['TR', 'TUR', '792'], // Turkey
|
||||
['TR', 'TUR', '792'], // Türkiye
|
||||
['TT', 'TTO', '780'], // Trinidad and Tobago
|
||||
['TV', 'TUV', '798'], // Tuvalu
|
||||
['TW', 'TWN', '158'], // Taiwan, Province of China
|
||||
@@ -340,6 +337,7 @@ final class CountryCode extends AbstractSearcher
|
||||
['ZM', 'ZMB', '894'], // Zambia
|
||||
['ZR', 'ZAR', '180'], // Zaire, Republic of
|
||||
['ZW', 'ZWE', '716'], // Zimbabwe
|
||||
// end of auto-generated code
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -370,7 +368,7 @@ final class CountryCode extends AbstractSearcher
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function getDataSource(): array
|
||||
protected function getDataSource($input = null): array
|
||||
{
|
||||
return array_column(self::COUNTRY_CODES, self::SET_INDEXES[$this->set]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user