diff --git a/.gitattributes b/.gitattributes index 5ee738da79..5634d98c1b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -11,6 +11,6 @@ /phpstan-baseline.neon export-ignore /phpstan.neon.dist export-ignore /phpunit.xml.dist export-ignore -/psalm-baseline.xml export-ignore +/psalm.baseline.xml export-ignore /psalm.xml export-ignore /roave-bc-check.yaml export-ignore diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c2297d8890..a87db47af4 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -17,4 +17,5 @@ ### Review checklist - [ ] All checks have passed +- [ ] Changes are added to the `CHANGELOG.md` - [ ] Changes are approved by maintainer diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 0000000000..9ef1120955 --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,17 @@ +# Security Policy + +## Supported Versions + +The following versions of `fakerphp/faker` have active support: + +- `^1.23.0` + +## Unsupported Versions + +The following versions of `fakerphp/faker` have reached their end of life: + +- `<1.23.0` + +## Reporting a Vulnerability + +If you believe that you have found a security vulnerability, please send an email to security@fakerphp.org. Ensure to include all details required to understand the severity of the issue. diff --git a/.github/workflows/bc-check.yaml b/.github/workflows/bc-check.yaml index 0e01cdafbf..60946927d4 100644 --- a/.github/workflows/bc-check.yaml +++ b/.github/workflows/bc-check.yaml @@ -14,7 +14,7 @@ jobs: steps: - name: "Checkout code" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Roave BC Check" uses: "addnab/docker-run-action@v3" diff --git a/.github/workflows/branch-alias.yaml b/.github/workflows/branch-alias.yaml index 7370c88117..87d0cc0c2d 100644 --- a/.github/workflows/branch-alias.yaml +++ b/.github/workflows/branch-alias.yaml @@ -17,7 +17,7 @@ jobs: coverage: "none" - name: "Checkout code" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" with: ref: "main" diff --git a/.github/workflows/code-coverage.yaml b/.github/workflows/code-coverage.yaml index d5fdf13ba7..a3ff6beeb7 100644 --- a/.github/workflows/code-coverage.yaml +++ b/.github/workflows/code-coverage.yaml @@ -20,7 +20,7 @@ jobs: steps: - name: "Checkout code" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Install PHP with extensions" uses: "shivammathur/setup-php@v2" diff --git a/.github/workflows/coding-standards.yaml b/.github/workflows/coding-standards.yaml index a45413bf46..45055acb01 100644 --- a/.github/workflows/coding-standards.yaml +++ b/.github/workflows/coding-standards.yaml @@ -20,7 +20,7 @@ jobs: steps: - name: "Checkout code" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Set up PHP" uses: "shivammathur/setup-php@v2" @@ -50,12 +50,11 @@ jobs: - name: "Cache cache file for php-cs-fixer" uses: "actions/cache@v3" with: - path: ".php_cs.cache" - key: "composer-${{ matrix.php-version }}-${{ github.ref_name }}" + path: ".build/php-cs-fixer/" + key: "php-cs-fixer-${{ matrix.php-version }}-${{ github.ref_name }}" restore-keys: | - composer-${{ matrix.php-version }}-main - composer-${{ matrix.php-version }} - composer- + php-cs-fixer-${{ matrix.php-version }}-main + php-cs-fixer-${{ matrix.php-version }}- - name: "Run php-cs-fixer" run: | @@ -68,7 +67,7 @@ jobs: steps: - name: "Checkout code" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Lint YAML files" uses: "ibiqlik/action-yamllint@v3.1.1" diff --git a/.github/workflows/rector.yaml b/.github/workflows/rector.yaml index d17e34db07..647eb4a64c 100644 --- a/.github/workflows/rector.yaml +++ b/.github/workflows/rector.yaml @@ -20,7 +20,7 @@ jobs: steps: - name: "Checkout code" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Set up PHP" uses: "shivammathur/setup-php@v2" diff --git a/.github/workflows/static-analysis.yaml b/.github/workflows/static-analysis.yaml index 54c28707a3..27b676cefd 100644 --- a/.github/workflows/static-analysis.yaml +++ b/.github/workflows/static-analysis.yaml @@ -18,7 +18,7 @@ jobs: steps: - name: "Checkout code" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Set up PHP" uses: "shivammathur/setup-php@v2" @@ -59,7 +59,7 @@ jobs: steps: - name: "Checkout" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Install PHP with extensions" uses: "shivammathur/setup-php@v2" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c6974c386d..0c42c78fa7 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -11,21 +11,24 @@ name: "Tests" jobs: phpunit: - name: "PHPUnit" + name: "PHPUnit (${{ matrix.php-version }})" strategy: matrix: + experimental: + - false php-version: - "7.4" - "8.0" - "8.1" - "8.2" + - "8.3" runs-on: "ubuntu-latest" steps: - name: "Checkout code" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Install PHP with extensions" uses: "shivammathur/setup-php@v2" diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index ff9a013169..f6ebd33afd 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -54,6 +54,10 @@ 'yield', ], ], + 'blank_lines_before_namespace' => [ + 'max_line_breaks' => 2, + 'min_line_breaks' => 2, + ], 'cast_spaces' => true, 'class_attributes_separation' => [ 'elements' => [ @@ -70,7 +74,6 @@ 'curly_braces_position' => true, 'declare_equal_normalize' => true, 'declare_parentheses' => true, - 'function_typehint_space' => true, 'general_phpdoc_annotation_remove' => [ 'annotations' => [ 'author', @@ -184,9 +187,9 @@ 'random_api_migration' => true, 'return_assignment' => true, 'return_type_declaration' => true, + 'self_static_accessor' => true, 'semicolon_after_instruction' => true, 'short_scalar_cast' => true, - 'single_blank_line_before_namespace' => true, 'single_line_comment_style' => true, 'single_quote' => true, 'single_space_around_construct' => [ @@ -219,6 +222,11 @@ ], ], 'trim_array_spaces' => true, + 'type_declaration_spaces' => [ + 'elements' => [ + 'function', + ], + ], 'unary_operator_spaces' => true, 'visibility_required' => [ 'elements' => [ diff --git a/CHANGELOG.md b/CHANGELOG.md index 0900d4798e..d7f8396dc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ # CHANGELOG -## [Unreleased](https://github.com/FakerPHP/Faker/compare/v1.23.0...main) +## [Unreleased](https://github.com/FakerPHP/Faker/compare/v1.23.1...1.23) + +## [2023-09-29, v1.23.1](https://github.com/FakerPHP/Faker/compare/v1.23.0..v1.23.1) + +- Fixed double `а` female lastName in `ru_RU/Person::name()` (#832) +- Fixed polish license plates (#685) +- Stopped using `static` in callables in `Provider\pt_BR\PhoneNumber` (#785) +- Fixed incorrect female name (#794) +- Stopped using the deprecated `MT_RAND_PHP` constant to seed the random generator on PHP 8.3 (#844) ## [2023-06-12, v1.23.0](https://github.com/FakerPHP/Faker/compare/v1.22.0..v1.23.0) diff --git a/composer.json b/composer.json index 9b85ce9d43..88724f2a60 100644 --- a/composer.json +++ b/composer.json @@ -52,10 +52,5 @@ "composer/package-versions-deprecated": true }, "sort-packages": true - }, - "extra": { - "branch-alias": { - "dev-main": "v1.21-dev" - } } } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index a9b8f8536c..f5e829a001 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -15,11 +15,6 @@ parameters: count: 1 path: src/Faker/Calculator/Luhn.php - - - message: "#^Method Faker\\\\Calculator\\\\Luhn\\:\\:computeCheckDigit\\(\\) should return string but returns int\\.$#" - count: 1 - path: src/Faker/Calculator/Luhn.php - - message: "#^Result of && is always false\\.$#" count: 1 diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 37222a4ffe..050bdabe4e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -7,6 +7,7 @@ cacheResultFile=".build/.phpunit.result.cache" colors="true" columns="max" + executionOrder="random" verbose="true" > diff --git a/psalm.baseline.xml b/psalm.baseline.xml index 271a6a6b2e..7ee4975b70 100644 --- a/psalm.baseline.xml +++ b/psalm.baseline.xml @@ -1,13 +1,5 @@ - - - - 0 - - - string - - + uniqueGenerator]]> @@ -142,6 +134,14 @@ [static::class, 'randomDigit'] + static function ($matches) { + // remove backslashes (that are not followed by another backslash) because they are escape characters + $match = preg_replace('/\\\(?!\\\)/', '', $matches[1]); + $randomElement = Base::randomElement(str_split($match)); + + //[.] should not be a random character, but a literal . + return str_replace('.', '\.', $randomElement); + } \UnitEnum diff --git a/roave-bc-check.yaml b/roave-bc-check.yaml index d515cae370..b3ff163801 100644 --- a/roave-bc-check.yaml +++ b/roave-bc-check.yaml @@ -1,18 +1,51 @@ parameters: ignoreErrors: - - '#\[BC\] CHANGED: Property Faker\\Provider\\[a-zA-Z]+::\$[1-9a-zA-Z]+ changed default value#' - - '#\[BC\] CHANGED: Property Faker\\Provider\\[a-z_A-Z]+\\[a-zA-Z]+::\$[1-9a-zA-Z]+ changed default value#' + - '#\[BC\] CHANGED: Class Faker\\Core\\Coordinates became final#' + - '#\[BC\] CHANGED: Method defaultExtensions\(\) of class Faker\\Container\\ContainerBuilder visibility reduced from public to private#' - '#\[BC\] CHANGED: Property Faker\\Factory::\$defaultProviders changed default value#' - - '#\[BC\] CHANGED: Type documentation for property Faker\\Provider\\en_ZA\\Internet::\$tld changed from having no type to array#' - - '#\[BC\] CHANGED: The parameter \$generator of Faker\\ValidGenerator\#\_\_construct\(\) changed from Faker\\Generator to no type#' + - '#\[BC\] CHANGED: Property Faker\\Provider\\[a-z_A-Z]+\\[a-zA-Z]+::\$[1-9a-zA-Z]+ changed default value#' + - '#\[BC\] CHANGED: Property Faker\\Provider\\[a-zA-Z]+::\$[1-9a-zA-Z]+ changed default value#' + - '#\[BC\] CHANGED: The number of required arguments for Faker\\Container\\ContainerBuilder\#add\(\) increased from 1 to 2#' + - '#\[BC\] CHANGED: The parameter \$char of Faker\\Calculator\\Iban::alphaToNumber\(\) changed from no type to a non-contravariant string#' + - '#\[BC\] CHANGED: The parameter \$char of Faker\\Calculator\\Iban::alphaToNumber\(\) changed from no type to string#' + - '#\[BC\] CHANGED: The parameter \$container of Faker\\Generator\#\_\_construct\(\) changed from Psr\\Container\\ContainerInterface\|null to a non-contravariant Faker\\Container\\ContainerInterface\|null#' + - '#\[BC\] CHANGED: The parameter \$container of Faker\\Generator\#\_\_construct\(\) changed from Psr\\Container\\ContainerInterface\|null to Faker\\Container\\ContainerInterface\|null#' + - '#\[BC\] CHANGED: The parameter \$digits of Faker\\Calculator\\Ean::checksum\(\) changed from no type to a non-contravariant string#' + - '#\[BC\] CHANGED: The parameter \$digits of Faker\\Calculator\\Ean::checksum\(\) changed from no type to string#' + - '#\[BC\] CHANGED: The parameter \$ean of Faker\\Calculator\\Ean::isValid\(\) changed from no type to a non-contravariant string#' + - '#\[BC\] CHANGED: The parameter \$ean of Faker\\Calculator\\Ean::isValid\(\) changed from no type to string#' - '#\[BC\] CHANGED: The parameter \$generator of Faker\\UniqueGenerator\#\_\_construct\(\) changed from Faker\\Generator to no type#' - - '#\[BC\] CHANGED: The return type of Faker\\Extension\\PersonExtension\#name\(\) changed from no type to string#' + - '#\[BC\] CHANGED: The parameter \$generator of Faker\\ValidGenerator\#\_\_construct\(\) changed from Faker\\Generator to no type#' + - '#\[BC\] CHANGED: The parameter \$iban of Faker\\Calculator\\Iban::checksum\(\) changed from no type to a non-contravariant string#' + - '#\[BC\] CHANGED: The parameter \$iban of Faker\\Calculator\\Iban::checksum\(\) changed from no type to string#' + - '#\[BC\] CHANGED: The parameter \$iban of Faker\\Calculator\\Iban::isValid\(\) changed from no type to a non-contravariant string#' + - '#\[BC\] CHANGED: The parameter \$iban of Faker\\Calculator\\Iban::isValid\(\) changed from no type to string#' - '#\[BC\] CHANGED: The parameter \$max of Faker\\Extension\\NumberExtension\#randomFloat\(\) changed from float to float\|null#' - - '#\[BC\] REMOVED: Method Faker\\Generator\#uuid\(\) was removed#' - - '#\[BC\] REMOVED: Method Faker\\Generator\#uuid3\(\) was removed#' + - '#\[BC\] CHANGED: The parameter \$name of Faker\\Container\\ContainerBuilder\#add\(\) changed from string\|null to a non-contravariant string#' + - '#\[BC\] CHANGED: The parameter \$number of Faker\\Calculator\\Iban::mod97\(\) changed from no type to a non-contravariant string#' + - '#\[BC\] CHANGED: The parameter \$number of Faker\\Calculator\\Iban::mod97\(\) changed from no type to string#' + - '#\[BC\] CHANGED: The parameter \$number of Faker\\Calculator\\Luhn::isValid\(\) changed from no type to a non-contravariant string#' + - '#\[BC\] CHANGED: The parameter \$number of Faker\\Calculator\\Luhn::isValid\(\) changed from no type to string#' + - '#\[BC\] CHANGED: The parameter \$partialNumber of Faker\\Calculator\\Luhn::computeCheckDigit\(\) changed from no type to a non-contravariant string#' + - '#\[BC\] CHANGED: The parameter \$partialNumber of Faker\\Calculator\\Luhn::computeCheckDigit\(\) changed from no type to string#' + - '#\[BC\] CHANGED: The parameter \$partialValue of Faker\\Calculator\\Luhn::generateLuhnNumber\(\) changed from no type to a non-contravariant string#' + - '#\[BC\] CHANGED: The parameter \$partialValue of Faker\\Calculator\\Luhn::generateLuhnNumber\(\) changed from no type to string#' + - '#\[BC\] CHANGED: The parameter \$value of Faker\\Container\\ContainerBuilder\#add\(\) changed from no type to a non-contravariant string#' + - '#\[BC\] CHANGED: The return type of Faker\\Extension\\PersonExtension\#name\(\) changed from no type to string#' + - '#\[BC\] CHANGED: Type documentation for property Faker\\Provider\\en_ZA\\Internet::\$tld changed from having no type to array#' + - '#\[BC\] REMOVED: Class Faker\\Extension\\Container has been deleted#' + - '#\[BC\] REMOVED: Class Faker\\Extension\\ContainerBuilder has been deleted#' - '#\[BC\] REMOVED: Class Faker\\Extension\\ContainerException has been deleted#' - '#\[BC\] REMOVED: Class Faker\\Extension\\NotInContainerException has been deleted#' - - '#\[BC\] REMOVED: Class Faker\\Extension\\ContainerBuilder has been deleted#' - - '#\[BC\] REMOVED: Class Faker\\Extension\\Container has been deleted#' - - '#\[BC\] CHANGED: The parameter \$container of Faker\\Generator\#\_\_construct\(\) changed from Psr\\Container\\ContainerInterface\|null to a non-contravariant Faker\\Container\\ContainerInterface\|null#' - - '#\[BC\] CHANGED: The parameter \$container of Faker\\Generator\#\_\_construct\(\) changed from Psr\\Container\\ContainerInterface\|null to Faker\\Container\\ContainerInterface\|null#' + - '#\[BC\] REMOVED: Method Faker\\Container\\Container\#getDefinitions\(\) was removed#' + - '#\[BC\] REMOVED: Method Faker\\Container\\ContainerBuilder::getDefault\(\) was removed#' + - '#\[BC\] REMOVED: Method Faker\\Container\\ContainerBuilder\::defaultExtensions\(\) was removed#' + - '#\[BC\] REMOVED: Method Faker\\Container\\ContainerInterface\#getDefinitions\(\) was removed#' + - '#\[BC\] REMOVED: Method Faker\\Core\\DateTime\#getDefaultTimezone\(\) was removed#' + - '#\[BC\] REMOVED: Method Faker\\Core\\DateTime\#getTimestamp\(\) was removed#' + - '#\[BC\] REMOVED: Method Faker\\Core\\DateTime\#getTimestampDateTime\(\) was removed#' + - '#\[BC\] REMOVED: Method Faker\\Core\\DateTime\#resolveTimezone\(\) was removed#' + - '#\[BC\] REMOVED: Method Faker\\Core\\DateTime\#setDefaultTimezone\(\) was removed#' + - '#\[BC\] REMOVED: Method Faker\\Core\\DateTime\#setTimezone\(\) was removed#' + - '#\[BC\] REMOVED: Method Faker\\Generator\#uuid3\(\) was removed#' + - '#\[BC\] REMOVED: Method Faker\\Generator\#uuid\(\) was removed#' diff --git a/src/Faker/Calculator/Ean.php b/src/Faker/Calculator/Ean.php index 9c3daf1757..fbf11fcdad 100644 --- a/src/Faker/Calculator/Ean.php +++ b/src/Faker/Calculator/Ean.php @@ -17,11 +17,9 @@ class Ean * * @see https://en.wikipedia.org/wiki/International_Article_Number * - * @param string $digits - * * @return int */ - public static function checksum($digits) + public static function checksum(string $digits) { $sequence = (strlen($digits) + 1) === 8 ? [3, 1] : [1, 3]; $sums = 0; @@ -41,7 +39,7 @@ public static function checksum($digits) * * @return bool */ - public static function isValid($ean) + public static function isValid(string $ean) { if (!preg_match(self::PATTERN, $ean)) { return false; diff --git a/src/Faker/Calculator/Iban.php b/src/Faker/Calculator/Iban.php index b00b18f010..19068fd775 100644 --- a/src/Faker/Calculator/Iban.php +++ b/src/Faker/Calculator/Iban.php @@ -7,11 +7,9 @@ class Iban /** * Generates IBAN Checksum * - * @param string $iban - * * @return string Checksum (numeric string) */ - public static function checksum($iban) + public static function checksum(string $iban) { // Move first four digits to end and set checksum to '00' $checkString = substr($iban, 4) . substr($iban, 0, 2) . '00'; @@ -34,11 +32,9 @@ static function (array $matches): string { /** * Converts letter to number * - * @param string $char - * * @return int */ - public static function alphaToNumber($char) + public static function alphaToNumber(string $char) { return ord($char) - 55; } @@ -50,7 +46,7 @@ public static function alphaToNumber($char) * * @return int */ - public static function mod97($number) + public static function mod97(string $number) { $checksum = (int) $number[0]; @@ -64,11 +60,9 @@ public static function mod97($number) /** * Checks whether an IBAN has a valid checksum * - * @param string $iban - * * @return bool */ - public static function isValid($iban) + public static function isValid(string $iban) { return self::checksum($iban) === substr($iban, 2, 2); } diff --git a/src/Faker/Calculator/Luhn.php b/src/Faker/Calculator/Luhn.php index 3a048fb082..4c1e6f5054 100644 --- a/src/Faker/Calculator/Luhn.php +++ b/src/Faker/Calculator/Luhn.php @@ -13,11 +13,9 @@ class Luhn { /** - * @param string $number - * * @return int */ - private static function checksum($number) + private static function checksum(string $number) { $number = (string) $number; $length = strlen($number); @@ -35,16 +33,14 @@ private static function checksum($number) } /** - * @param string $partialNumber - * * @return string */ - public static function computeCheckDigit($partialNumber) + public static function computeCheckDigit(string $partialNumber) { $checkDigit = self::checksum($partialNumber . '0'); if ($checkDigit === 0) { - return 0; + return '0'; } return (string) (10 - $checkDigit); @@ -53,11 +49,9 @@ public static function computeCheckDigit($partialNumber) /** * Checks whether a number (partial number + check digit) is Luhn compliant * - * @param string $number - * * @return bool */ - public static function isValid($number) + public static function isValid(string $number) { return self::checksum($number) === 0; } @@ -65,11 +59,9 @@ public static function isValid($number) /** * Generate a Luhn compliant number. * - * @param string $partialValue - * * @return string */ - public static function generateLuhnNumber($partialValue) + public static function generateLuhnNumber(string $partialValue) { if (!preg_match('/^\d+$/', $partialValue)) { throw new \InvalidArgumentException('Argument should be an integer.'); diff --git a/src/Faker/Container/Container.php b/src/Faker/Container/Container.php index 2dd2d974d7..9b361845f2 100644 --- a/src/Faker/Container/Container.php +++ b/src/Faker/Container/Container.php @@ -16,9 +16,9 @@ final class Container implements ContainerInterface /** * @var array */ - private $definitions; + private array $definitions; - private $services = []; + private array $services = []; /** * Create a container object with a set of definitions. The array value MUST @@ -63,7 +63,7 @@ public function get($id): Extension $definition = $this->definitions[$id]; - $service = $this->services[$id] = $this->getService($id, $definition); + $service = $this->getService($id, $definition); if (!$service instanceof Extension) { throw new \RuntimeException(sprintf( @@ -73,6 +73,8 @@ public function get($id): Extension )); } + $this->services[$id] = $service; + return $service; } @@ -81,7 +83,7 @@ public function get($id): Extension * * @param callable|object|string $definition */ - private function getService($id, $definition) + private function getService(string $id, $definition) { if (is_callable($definition)) { try { @@ -134,12 +136,4 @@ public function has($id): bool return array_key_exists($id, $this->definitions); } - - /** - * Get the bindings between Extension interfaces and implementations. - */ - public function getDefinitions(): array - { - return $this->definitions; - } } diff --git a/src/Faker/Container/ContainerBuilder.php b/src/Faker/Container/ContainerBuilder.php index 3fb335fff5..f2545e944b 100644 --- a/src/Faker/Container/ContainerBuilder.php +++ b/src/Faker/Container/ContainerBuilder.php @@ -5,14 +5,7 @@ namespace Faker\Container; use Faker\Core; -use Faker\Extension\BarcodeExtension; -use Faker\Extension\BloodExtension; -use Faker\Extension\ColorExtension; -use Faker\Extension\DateTimeExtension; -use Faker\Extension\FileExtension; -use Faker\Extension\NumberExtension; -use Faker\Extension\UuidExtension; -use Faker\Extension\VersionExtension; +use Faker\Extension; /** * @experimental This class is experimental and does not fall under our BC promise @@ -22,36 +15,23 @@ final class ContainerBuilder /** * @var array */ - private $definitions = []; + private array $definitions = []; /** - * @param callable|object|string $value + * @param callable|object|string $definition * * @throws \InvalidArgumentException */ - public function add($value, string $name = null): self + public function add(string $id, $definition): self { - if (!is_string($value) && !is_callable($value) && !is_object($value)) { + if (!is_string($definition) && !is_callable($definition) && !is_object($definition)) { throw new \InvalidArgumentException(sprintf( 'First argument to "%s::add()" must be a string, callable or object.', self::class, )); } - if ($name === null) { - if (is_string($value)) { - $name = $value; - } elseif (is_object($value)) { - $name = get_class($value); - } else { - throw new \InvalidArgumentException(sprintf( - 'Second argument to "%s::add()" is required not passing a string or object as first argument', - self::class, - )); - } - } - - $this->definitions[$name] = $value; + $this->definitions[$id] = $definition; return $this; } @@ -61,32 +41,28 @@ public function build(): ContainerInterface return new Container($this->definitions); } - /** - * Get an array with extension that represent the default English - * functionality. - */ - public static function defaultExtensions(): array + private static function defaultExtensions(): array { return [ - BarcodeExtension::class => Core\Barcode::class, - BloodExtension::class => Core\Blood::class, - ColorExtension::class => Core\Color::class, - DateTimeExtension::class => Core\DateTime::class, - FileExtension::class => Core\File::class, - NumberExtension::class => Core\Number::class, - VersionExtension::class => Core\Version::class, - UuidExtension::class => Core\Uuid::class, + Extension\BarcodeExtension::class => Core\Barcode::class, + Extension\BloodExtension::class => Core\Blood::class, + Extension\ColorExtension::class => Core\Color::class, + Extension\DateTimeExtension::class => Core\DateTime::class, + Extension\FileExtension::class => Core\File::class, + Extension\NumberExtension::class => Core\Number::class, + Extension\UuidExtension::class => Core\Uuid::class, + Extension\VersionExtension::class => Core\Version::class, ]; } - public static function getDefault(): ContainerInterface + public static function withDefaultExtensions(): self { $instance = new self(); foreach (self::defaultExtensions() as $id => $definition) { - $instance->add($definition, $id); + $instance->add($id, $definition); } - return $instance->build(); + return $instance; } } diff --git a/src/Faker/Container/ContainerInterface.php b/src/Faker/Container/ContainerInterface.php index d34f4a8967..9e5237d341 100644 --- a/src/Faker/Container/ContainerInterface.php +++ b/src/Faker/Container/ContainerInterface.php @@ -6,8 +6,4 @@ interface ContainerInterface extends BaseContainerInterface { - /** - * Get the bindings between Extension interfaces and implementations. - */ - public function getDefinitions(): array; } diff --git a/src/Faker/Core/Barcode.php b/src/Faker/Core/Barcode.php index 89f801a5a0..a85420be90 100644 --- a/src/Faker/Core/Barcode.php +++ b/src/Faker/Core/Barcode.php @@ -12,6 +12,13 @@ */ final class Barcode implements Extension\BarcodeExtension { + private Extension\NumberExtension $numberExtension; + + public function __construct(Extension\NumberExtension $numberExtension = null) + { + $this->numberExtension = $numberExtension ?: new Number(); + } + private function ean(int $length = 13): string { $code = Extension\Helper::numerify(str_repeat('#', $length - 1)); @@ -38,7 +45,7 @@ public function isbn10(): string public function isbn13(): string { - $code = '97' . mt_rand(8, 9) . Extension\Helper::numerify(str_repeat('#', 9)); + $code = '97' . $this->numberExtension->numberBetween(8, 9) . Extension\Helper::numerify(str_repeat('#', 9)); return sprintf('%s%s', $code, Calculator\Ean::checksum($code)); } diff --git a/src/Faker/Core/Blood.php b/src/Faker/Core/Blood.php index 50a5806c6b..03e563fc12 100644 --- a/src/Faker/Core/Blood.php +++ b/src/Faker/Core/Blood.php @@ -14,12 +14,12 @@ final class Blood implements Extension\BloodExtension /** * @var string[] */ - private $bloodTypes = ['A', 'AB', 'B', 'O']; + private array $bloodTypes = ['A', 'AB', 'B', 'O']; /** * @var string[] */ - private $bloodRhFactors = ['+', '-']; + private array $bloodRhFactors = ['+', '-']; public function bloodType(): string { diff --git a/src/Faker/Core/Color.php b/src/Faker/Core/Color.php index 6e4e350e6d..bd94819013 100644 --- a/src/Faker/Core/Color.php +++ b/src/Faker/Core/Color.php @@ -12,19 +12,20 @@ */ final class Color implements Extension\ColorExtension { + private Extension\NumberExtension $numberExtension; + /** * @var string[] */ - private $safeColorNames = [ + private array $safeColorNames = [ 'black', 'maroon', 'green', 'navy', 'olive', 'purple', 'teal', 'lime', 'blue', 'silver', 'gray', 'yellow', 'fuchsia', 'aqua', 'white', ]; - /** * @var string[] */ - private $allColorNames = [ + private array $allColorNames = [ 'AliceBlue', 'AntiqueWhite', 'Aqua', 'Aquamarine', 'Azure', 'Beige', 'Bisque', 'Black', 'BlanchedAlmond', 'Blue', 'BlueViolet', 'Brown', 'BurlyWood', 'CadetBlue', @@ -53,14 +54,17 @@ final class Color implements Extension\ColorExtension 'Turquoise', 'Violet', 'Wheat', 'White', 'WhiteSmoke', 'Yellow', 'YellowGreen', ]; + public function __construct(Extension\NumberExtension $numberExtension = null) + { + $this->numberExtension = $numberExtension ?: new Number(); + } + /** * @example '#fa3cc2' */ public function hexColor(): string { - $number = new Number(); - - return '#' . str_pad(dechex($number->numberBetween(1, 16777215)), 6, '0', STR_PAD_LEFT); + return '#' . str_pad(dechex($this->numberExtension->numberBetween(1, 16777215)), 6, '0', STR_PAD_LEFT); } /** @@ -68,8 +72,7 @@ public function hexColor(): string */ public function safeHexColor(): string { - $number = new Number(); - $color = str_pad(dechex($number->numberBetween(0, 255)), 3, '0', STR_PAD_LEFT); + $color = str_pad(dechex($this->numberExtension->numberBetween(0, 255)), 3, '0', STR_PAD_LEFT); return sprintf( '#%s%s%s%s%s%s', @@ -122,12 +125,10 @@ public function rgbCssColor(): string */ public function rgbaCssColor(): string { - $number = new Number(); - return sprintf( 'rgba(%s,%s)', $this->rgbColor(), - $number->randomFloat(1, 0, 1), + $this->numberExtension->randomFloat(1, 0, 1), ); } @@ -152,13 +153,11 @@ public function colorName(): string */ public function hslColor(): string { - $number = new Number(); - return sprintf( '%s,%s,%s', - $number->numberBetween(0, 360), - $number->numberBetween(0, 100), - $number->numberBetween(0, 100), + $this->numberExtension->numberBetween(0, 360), + $this->numberExtension->numberBetween(0, 100), + $this->numberExtension->numberBetween(0, 100), ); } @@ -169,12 +168,10 @@ public function hslColor(): string */ public function hslColorAsArray(): array { - $number = new Number(); - return [ - $number->numberBetween(0, 360), - $number->numberBetween(0, 100), - $number->numberBetween(0, 100), + $this->numberExtension->numberBetween(0, 360), + $this->numberExtension->numberBetween(0, 100), + $this->numberExtension->numberBetween(0, 100), ]; } } diff --git a/src/Faker/Core/Coordinates.php b/src/Faker/Core/Coordinates.php index 40a26589f7..15b5492e17 100644 --- a/src/Faker/Core/Coordinates.php +++ b/src/Faker/Core/Coordinates.php @@ -4,10 +4,20 @@ namespace Faker\Core; -use Faker\Extension\Extension; +use Faker\Extension; -class Coordinates implements Extension +/** + * @experimental This class is experimental and does not fall under our BC promise + */ +final class Coordinates implements Extension\Extension { + private Extension\NumberExtension $numberExtension; + + public function __construct(Extension\NumberExtension $numberExtension = null) + { + $this->numberExtension = $numberExtension ?: new Number(); + } + /** * @example '77.147489' * @@ -52,8 +62,8 @@ public function longitude(float $min = -180.0, float $max = 180.0): float public function localCoordinates(): array { return [ - 'latitude' => static::latitude(), - 'longitude' => static::longitude(), + 'latitude' => $this->latitude(), + 'longitude' => $this->longitude(), ]; } @@ -63,6 +73,6 @@ private function randomFloat(int $nbMaxDecimals, float $min, float $max): float throw new \LogicException('Invalid coordinates boundaries'); } - return round($min + mt_rand() / mt_getrandmax() * ($max - $min), $nbMaxDecimals); + return $this->numberExtension->randomFloat($nbMaxDecimals, $min, $max); } } diff --git a/src/Faker/Core/DateTime.php b/src/Faker/Core/DateTime.php index f3d7877654..6ef40a9667 100644 --- a/src/Faker/Core/DateTime.php +++ b/src/Faker/Core/DateTime.php @@ -8,7 +8,7 @@ use Faker\Extension\Helper; /** - * @experimental + * @experimental This class is experimental and does not fall under our BC promise * * @since 1.20.0 */ @@ -19,12 +19,9 @@ final class DateTime implements DateTimeExtension, GeneratorAwareExtension /** * @var string[] */ - private $centuries = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII', 'XIII', 'XIV', 'XV', 'XVI', 'XVII', 'XVIII', 'XIX', 'XX', 'XXI']; + private array $centuries = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII', 'XIII', 'XIV', 'XV', 'XVI', 'XVII', 'XVIII', 'XIX', 'XX', 'XXI']; - /** - * @var string - */ - private $defaultTimezone = null; + private ?string $defaultTimezone = null; /** * Get the POSIX-timestamp of a DateTime, int or string. @@ -33,7 +30,7 @@ final class DateTime implements DateTimeExtension, GeneratorAwareExtension * * @return false|int */ - protected function getTimestamp($until = 'now') + private function getTimestamp($until = 'now') { if (is_numeric($until)) { return (int) $until; @@ -51,22 +48,12 @@ protected function getTimestamp($until = 'now') * * @param int $timestamp the UNIX / POSIX-compatible timestamp */ - protected function getTimestampDateTime(int $timestamp): \DateTime + private function getTimestampDateTime(int $timestamp): \DateTime { return new \DateTime('@' . $timestamp); } - protected function setDefaultTimezone(string $timezone = null): void - { - $this->defaultTimezone = $timezone; - } - - protected function getDefaultTimezone(): ?string - { - return $this->defaultTimezone; - } - - protected function resolveTimezone(?string $timezone): string + private function resolveTimezone(?string $timezone): string { if ($timezone !== null) { return $timezone; @@ -78,7 +65,7 @@ protected function resolveTimezone(?string $timezone): string /** * Internal method to set the timezone on a DateTime object. */ - protected function setTimezone(\DateTime $dateTime, ?string $timezone): \DateTime + private function setTimezone(\DateTime $dateTime, ?string $timezone): \DateTime { $timezone = $this->resolveTimezone($timezone); diff --git a/src/Faker/Core/File.php b/src/Faker/Core/File.php index adddb0cb33..5151e900f3 100644 --- a/src/Faker/Core/File.php +++ b/src/Faker/Core/File.php @@ -18,7 +18,7 @@ final class File implements Extension\FileExtension * * @see http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types */ - private $mimeTypes = [ + private array $mimeTypes = [ 'application/atom+xml' => 'atom', 'application/ecmascript' => 'ecma', 'application/emma+xml' => 'emma', diff --git a/src/Faker/Core/Number.php b/src/Faker/Core/Number.php index f67c042675..a16920c936 100644 --- a/src/Faker/Core/Number.php +++ b/src/Faker/Core/Number.php @@ -21,12 +21,12 @@ public function numberBetween(int $min = 0, int $max = 2147483647): int public function randomDigit(): int { - return mt_rand(0, 9); + return $this->numberBetween(0, 9); } public function randomDigitNot(int $except): int { - $result = self::numberBetween(0, 8); + $result = $this->numberBetween(0, 8); if ($result >= $except) { ++$result; @@ -37,7 +37,7 @@ public function randomDigitNot(int $except): int public function randomDigitNotZero(): int { - return mt_rand(1, 9); + return $this->numberBetween(1, 9); } public function randomFloat(?int $nbMaxDecimals = null, float $min = 0, ?float $max = null): float @@ -60,7 +60,7 @@ public function randomFloat(?int $nbMaxDecimals = null, float $min = 0, ?float $ $max = $tmp; } - return round($min + mt_rand() / mt_getrandmax() * ($max - $min), $nbMaxDecimals); + return round($min + $this->numberBetween() / mt_getrandmax() * ($max - $min), $nbMaxDecimals); } public function randomNumber(int $nbDigits = null, bool $strict = false): int @@ -75,9 +75,9 @@ public function randomNumber(int $nbDigits = null, bool $strict = false): int } if ($strict) { - return mt_rand(10 ** ($nbDigits - 1), $max); + return $this->numberBetween(10 ** ($nbDigits - 1), $max); } - return mt_rand(0, $max); + return $this->numberBetween(0, $max); } } diff --git a/src/Faker/Core/Uuid.php b/src/Faker/Core/Uuid.php index 5e3b633a26..d1db1b2292 100644 --- a/src/Faker/Core/Uuid.php +++ b/src/Faker/Core/Uuid.php @@ -2,17 +2,26 @@ namespace Faker\Core; -use Faker\Extension\UuidExtension; +use Faker\Extension; -final class Uuid implements UuidExtension +/** + * @experimental This class is experimental and does not fall under our BC promise + */ +final class Uuid implements Extension\UuidExtension { - public function uuid3(): string + private Extension\NumberExtension $numberExtension; + + public function __construct(Extension\NumberExtension $numberExtension = null) { - $number = new Number(); + $this->numberExtension = $numberExtension ?: new Number(); + } + + public function uuid3(): string + { // fix for compatibility with 32bit architecture; each mt_rand call is restricted to 32bit // two such calls will cause 64bits of randomness regardless of architecture - $seed = $number->numberBetween(0, 2147483647) . '#' . $number->numberBetween(0, 2147483647); + $seed = $this->numberExtension->numberBetween(0, 2147483647) . '#' . $this->numberExtension->numberBetween(0, 2147483647); // Hash the seed and convert to a byte array $val = md5($seed, true); diff --git a/src/Faker/Core/Version.php b/src/Faker/Core/Version.php index ce484e6ad8..8863c480a2 100644 --- a/src/Faker/Core/Version.php +++ b/src/Faker/Core/Version.php @@ -4,16 +4,25 @@ namespace Faker\Core; -use Faker\Extension\Helper; -use Faker\Extension\VersionExtension; +use Faker\Extension; use Faker\Provider\DateTime; -final class Version implements VersionExtension +/** + * @experimental This class is experimental and does not fall under our BC promise + */ +final class Version implements Extension\VersionExtension { + private Extension\NumberExtension $numberExtension; /** * @var string[] */ - private $semverCommonPreReleaseIdentifiers = ['alpha', 'beta', 'rc']; + private array $semverCommonPreReleaseIdentifiers = ['alpha', 'beta', 'rc']; + + public function __construct(Extension\NumberExtension $numberExtension = null) + { + + $this->numberExtension = $numberExtension ?: new Number(); + } /** * Represents v2.0.0 of the semantic versioning: https://semver.org/spec/v2.0.0.html @@ -22,11 +31,11 @@ public function semver(bool $preRelease = false, bool $build = false): string { return sprintf( '%d.%d.%d%s%s', - mt_rand(0, 9), - mt_rand(0, 99), - mt_rand(0, 99), - $preRelease && mt_rand(0, 1) ? '-' . $this->semverPreReleaseIdentifier() : '', - $build && mt_rand(0, 1) ? '+' . $this->semverBuildIdentifier() : '', + $this->numberExtension->numberBetween(0, 9), + $this->numberExtension->numberBetween(0, 99), + $this->numberExtension->numberBetween(0, 99), + $preRelease && $this->numberExtension->numberBetween(0, 1) === 1 ? '-' . $this->semverPreReleaseIdentifier() : '', + $build && $this->numberExtension->numberBetween(0, 1) === 1 ? '+' . $this->semverBuildIdentifier() : '', ); } @@ -35,13 +44,13 @@ public function semver(bool $preRelease = false, bool $build = false): string */ private function semverPreReleaseIdentifier(): string { - $ident = Helper::randomElement($this->semverCommonPreReleaseIdentifiers); + $ident = Extension\Helper::randomElement($this->semverCommonPreReleaseIdentifiers); - if (!mt_rand(0, 1)) { + if ($this->numberExtension->numberBetween(0, 1) !== 1) { return $ident; } - return $ident . '.' . mt_rand(1, 99); + return $ident . '.' . $this->numberExtension->numberBetween(1, 99); } /** @@ -49,9 +58,9 @@ private function semverPreReleaseIdentifier(): string */ private function semverBuildIdentifier(): string { - if (mt_rand(0, 1)) { + if ($this->numberExtension->numberBetween(0, 1) === 1) { // short git revision syntax: https://git-scm.com/book/en/v2/Git-Tools-Revision-Selection - return substr(sha1(Helper::lexify('??????')), 0, 7); + return substr(sha1(Extension\Helper::lexify('??????')), 0, 7); } // date syntax diff --git a/src/Faker/Extension/Helper.php b/src/Faker/Extension/Helper.php index 27a66143fe..47200e90c6 100644 --- a/src/Faker/Extension/Helper.php +++ b/src/Faker/Extension/Helper.php @@ -83,10 +83,10 @@ public static function lexify(string $string): string public static function bothify(string $string): string { $string = self::replaceWildcard($string, '*', static function () { - return mt_rand(0, 1) ? '#' : '?'; + return mt_rand(0, 1) === 1 ? '#' : '?'; }); - return static::lexify(static::numerify($string)); + return self::lexify(self::numerify($string)); } private static function replaceWildcard(string $string, string $wildcard, callable $callback): string diff --git a/src/Faker/Factory.php b/src/Faker/Factory.php index 7d29de75b2..e9d201432d 100644 --- a/src/Faker/Factory.php +++ b/src/Faker/Factory.php @@ -38,10 +38,12 @@ protected static function getProviderClassname($provider, $locale = '') if ($providerClass = self::findProviderClassname($provider, $locale)) { return $providerClass; } + // fallback to default locale if ($providerClass = self::findProviderClassname($provider, static::DEFAULT_LOCALE)) { return $providerClass; } + // fallback to no locale if ($providerClass = self::findProviderClassname($provider)) { return $providerClass; diff --git a/src/Faker/Generator.php b/src/Faker/Generator.php index 2cad02d7a8..0b994e4c97 100644 --- a/src/Faker/Generator.php +++ b/src/Faker/Generator.php @@ -279,7 +279,7 @@ * * @property string $image * - * @method string image($dir = null, $width = 640, $height = 480, $category = null, $fullPath = true, $randomize = true, $word = null, $gray = false) + * @method string image($dir = null, $width = 640, $height = 480, $category = null, $fullPath = true, $randomize = true, $word = null, $gray = false, string $format = 'png') * * @property string $email * @@ -463,7 +463,7 @@ * * @property string $lastName * - * @method string lastName() + * @method string lastName($gender = null) * * @property string $title * @@ -567,7 +567,7 @@ class Generator public function __construct(ContainerInterface $container = null) { - $this->container = $container ?: Container\ContainerBuilder::getDefault(); + $this->container = $container ?: Container\ContainerBuilder::withDefaultExtensions()->build(); } /** @@ -687,10 +687,22 @@ public function seed($seed = null) if ($seed === null) { mt_srand(); } else { - mt_srand((int) $seed, MT_RAND_PHP); + mt_srand((int) $seed, self::mode()); } } + /** + * @see https://www.php.net/manual/en/migration83.deprecated.php#migration83.deprecated.random + */ + private static function mode(): int + { + if (PHP_VERSION_ID < 80300) { + return MT_RAND_PHP; + } + + return MT_RAND_MT19937; + } + public function format($format, $arguments = []) { return call_user_func_array($this->getFormatter($format), $arguments); diff --git a/src/Faker/Provider/Base.php b/src/Faker/Provider/Base.php index d91552c8a3..6b9876bc1d 100644 --- a/src/Faker/Provider/Base.php +++ b/src/Faker/Provider/Base.php @@ -491,7 +491,7 @@ public static function lexify($string = '????') public static function bothify($string = '## ??') { $string = self::replaceWildcard($string, '*', static function () { - return mt_rand(0, 1) ? '#' : '?'; + return mt_rand(0, 1) === 1 ? '#' : '?'; }); return static::lexify(static::numerify($string)); @@ -576,6 +576,7 @@ public static function regexify($regex = '') // remove backslashes (that are not followed by another backslash) because they are escape characters $match = preg_replace('/\\\(?!\\\)/', '', $matches[1]); $randomElement = Base::randomElement(str_split($match)); + //[.] should not be a random character, but a literal . return str_replace('.', '\.', $randomElement); }, $regex); diff --git a/src/Faker/Provider/Image.php b/src/Faker/Provider/Image.php index 53f28dfcfa..e787142178 100644 --- a/src/Faker/Provider/Image.php +++ b/src/Faker/Provider/Image.php @@ -123,6 +123,7 @@ public static function image( ); $dir = null === $dir ? sys_get_temp_dir() : $dir; // GNU/Linux / OS X / Windows compatible + // Validate directory path if (!is_dir($dir) || !is_writable($dir)) { throw new \InvalidArgumentException(sprintf('Cannot write to directory "%s"', $dir)); diff --git a/src/Faker/Provider/cs_CZ/Person.php b/src/Faker/Provider/cs_CZ/Person.php index 64b4e9e0c8..f0bca49e0b 100644 --- a/src/Faker/Provider/cs_CZ/Person.php +++ b/src/Faker/Provider/cs_CZ/Person.php @@ -28,7 +28,7 @@ class Person extends \Faker\Provider\Person protected static $firstNameMale = [ 'Adam', 'Aleš', 'Alois', 'Antonín', 'Bohumil', 'Bohuslav', 'Dagmar', 'Dalibor', 'Daniel', 'David', 'Dominik', 'Dušan', 'Eduard', 'Emil', - 'Filip', 'František', 'Ilona', 'Ivan', 'Ivo', 'Jakub', 'Jan', 'Ján', + 'Filip', 'František', 'Igor', 'Ivan', 'Ivo', 'Jakub', 'Jan', 'Ján', 'Jaromír', 'Jaroslav', 'Jindřich', 'Jiří', 'Josef', 'Jozef', 'Kamil', 'Karel', 'Kryštof', 'Ladislav', 'Libor', 'Lubomír', 'Luboš', 'Luděk', 'Ludvík', 'Lukáš', 'Marcel', 'Marek', 'Martin', 'Matěj', 'Matyáš', @@ -451,6 +451,7 @@ public function birthNumber($gender = null, $minAge = 0, $maxAge = 100, $slashPr if ($gender == static::GENDER_FEMALE) { $month += 50; } + // from year 2004 everyone has +20 to month when birth numbers in one day are exhausted if ($year >= 2004 && $this->generator->boolean(10)) { $month += 20; diff --git a/src/Faker/Provider/en_US/Company.php b/src/Faker/Provider/en_US/Company.php index ee72fca993..8cab28a95e 100644 --- a/src/Faker/Provider/en_US/Company.php +++ b/src/Faker/Provider/en_US/Company.php @@ -15,7 +15,7 @@ class Company extends \Faker\Provider\Company 'Adaptive', 'Advanced', 'Ameliorated', 'Assimilated', 'Automated', 'Balanced', 'Business-focused', 'Centralized', 'Cloned', 'Compatible', 'Configurable', 'Cross-group', 'Cross-platform', 'Customer-focused', 'Customizable', 'Decentralized', 'De-engineered', 'Devolved', 'Digitized', 'Distributed', 'Diverse', 'Down-sized', 'Enhanced', 'Enterprise-wide', 'Ergonomic', 'Exclusive', 'Expanded', 'Extended', 'Facetoface', 'Focused', 'Front-line', 'Fully-configurable', 'Function-based', 'Fundamental', 'Future-proofed', 'Grass-roots', 'Horizontal', 'Implemented', 'Innovative', 'Integrated', 'Intuitive', 'Inverse', 'Managed', 'Mandatory', 'Monitored', 'Multi-channelled', 'Multi-lateral', 'Multi-layered', 'Multi-tiered', 'Networked', 'Object-based', 'Open-architected', 'Open-source', 'Operative', 'Optimized', 'Optional', 'Organic', 'Organized', 'Persevering', 'Persistent', 'Phased', 'Polarised', 'Pre-emptive', 'Proactive', 'Profit-focused', 'Profound', 'Programmable', 'Progressive', 'Public-key', 'Quality-focused', 'Reactive', 'Realigned', 'Re-contextualized', 'Re-engineered', 'Reduced', 'Reverse-engineered', 'Right-sized', 'Robust', 'Seamless', 'Secured', 'Self-enabling', 'Sharable', 'Stand-alone', 'Streamlined', 'Switchable', 'Synchronised', 'Synergistic', 'Synergized', 'Team-oriented', 'Total', 'Triple-buffered', 'Universal', 'Up-sized', 'Upgradable', 'User-centric', 'User-friendly', 'Versatile', 'Virtual', 'Visionary', 'Vision-oriented', ], [ - '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'assymetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', + '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'asymmetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', ], [ 'ability', 'access', 'adapter', 'algorithm', 'alliance', 'analyzer', 'application', 'approach', 'architecture', 'archive', 'artificialintelligence', 'array', 'attitude', 'benchmark', 'blockchain', 'budgetarymanagement', 'capability', 'capacity', 'challenge', 'circuit', 'collaboration', 'complexity', 'concept', 'conglomeration', 'contingency', 'core', 'customerloyalty', 'database', 'data-warehouse', 'definition', 'emulation', 'encoding', 'encryption', 'extranet', 'firmware', 'flexibility', 'focusgroup', 'forecast', 'frame', 'framework', 'function', 'functionalities', 'GraphicInterface', 'groupware', 'GraphicalUserInterface', 'hardware', 'help-desk', 'hierarchy', 'hub', 'implementation', 'info-mediaries', 'infrastructure', 'initiative', 'installation', 'instructionset', 'interface', 'internetsolution', 'intranet', 'knowledgeuser', 'knowledgebase', 'localareanetwork', 'leverage', 'matrices', 'matrix', 'methodology', 'middleware', 'migration', 'model', 'moderator', 'monitoring', 'moratorium', 'neural-net', 'openarchitecture', 'opensystem', 'orchestration', 'paradigm', 'parallelism', 'policy', 'portal', 'pricingstructure', 'processimprovement', 'product', 'productivity', 'project', 'projection', 'protocol', 'securedline', 'service-desk', 'software', 'solution', 'standardization', 'strategy', 'structure', 'success', 'superstructure', 'support', 'synergy', 'systemengine', 'task-force', 'throughput', 'time-frame', 'toolset', 'utilisation', 'website', 'workforce', diff --git a/src/Faker/Provider/en_ZA/Person.php b/src/Faker/Provider/en_ZA/Person.php index df018d1514..2d2b525ede 100644 --- a/src/Faker/Provider/en_ZA/Person.php +++ b/src/Faker/Provider/en_ZA/Person.php @@ -135,9 +135,8 @@ class Person extends \Faker\Provider\Person /** * @see https://en.wikipedia.org/wiki/National_identification_number#South_Africa * - * @param \DateTime $birthdate - * @param bool $citizen - * @param string $gender + * @param bool $citizen + * @param string $gender * * @return string */ diff --git a/src/Faker/Provider/es_AR/Company.php b/src/Faker/Provider/es_AR/Company.php index f14d446716..bc6211cdfa 100644 --- a/src/Faker/Provider/es_AR/Company.php +++ b/src/Faker/Provider/es_AR/Company.php @@ -17,7 +17,7 @@ class Company extends \Faker\Provider\Company 'Adaptive', 'Advanced', 'Ameliorated', 'Assimilated', 'Automated', 'Balanced', 'Business-focused', 'Centralized', 'Cloned', 'Compatible', 'Configurable', 'Cross-group', 'Cross-platform', 'Customer-focused', 'Customizable', 'Decentralized', 'De-engineered', 'Devolved', 'Digitized', 'Distributed', 'Diverse', 'Down-sized', 'Enhanced', 'Enterprise-wide', 'Ergonomic', 'Exclusive', 'Expanded', 'Extended', 'Facetoface', 'Focused', 'Front-line', 'Fully-configurable', 'Function-based', 'Fundamental', 'Future-proofed', 'Grass-roots', 'Horizontal', 'Implemented', 'Innovative', 'Integrated', 'Intuitive', 'Inverse', 'Managed', 'Mandatory', 'Monitored', 'Multi-channelled', 'Multi-lateral', 'Multi-layered', 'Multi-tiered', 'Networked', 'Object-based', 'Open-architected', 'Open-source', 'Operative', 'Optimized', 'Optional', 'Organic', 'Organized', 'Persevering', 'Persistent', 'Phased', 'Polarised', 'Pre-emptive', 'Proactive', 'Profit-focused', 'Profound', 'Programmable', 'Progressive', 'Public-key', 'Quality-focused', 'Reactive', 'Realigned', 'Re-contextualized', 'Re-engineered', 'Reduced', 'Reverse-engineered', 'Right-sized', 'Robust', 'Seamless', 'Secured', 'Self-enabling', 'Sharable', 'Stand-alone', 'Streamlined', 'Switchable', 'Synchronised', 'Synergistic', 'Synergized', 'Team-oriented', 'Total', 'Triple-buffered', 'Universal', 'Up-sized', 'Upgradable', 'User-centric', 'User-friendly', 'Versatile', 'Virtual', 'Visionary', 'Vision-oriented', ], [ - '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'assymetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', + '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'asymmetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', ], [ 'ability', 'access', 'adapter', 'algorithm', 'alliance', 'analyzer', 'application', 'approach', 'architecture', 'archive', 'artificialintelligence', 'array', 'attitude', 'benchmark', 'budgetarymanagement', 'capability', 'capacity', 'challenge', 'circuit', 'collaboration', 'complexity', 'concept', 'conglomeration', 'contingency', 'core', 'customerloyalty', 'database', 'data-warehouse', 'definition', 'emulation', 'encoding', 'encryption', 'extranet', 'firmware', 'flexibility', 'focusgroup', 'forecast', 'frame', 'framework', 'function', 'functionalities', 'GraphicInterface', 'groupware', 'GraphicalUserInterface', 'hardware', 'help-desk', 'hierarchy', 'hub', 'implementation', 'info-mediaries', 'infrastructure', 'initiative', 'installation', 'instructionset', 'interface', 'internetsolution', 'intranet', 'knowledgeuser', 'knowledgebase', 'localareanetwork', 'leverage', 'matrices', 'matrix', 'methodology', 'middleware', 'migration', 'model', 'moderator', 'monitoring', 'moratorium', 'neural-net', 'openarchitecture', 'opensystem', 'orchestration', 'paradigm', 'parallelism', 'policy', 'portal', 'pricingstructure', 'processimprovement', 'product', 'productivity', 'project', 'projection', 'protocol', 'securedline', 'service-desk', 'software', 'solution', 'standardization', 'strategy', 'structure', 'success', 'superstructure', 'support', 'synergy', 'systemengine', 'task-force', 'throughput', 'time-frame', 'toolset', 'utilisation', 'website', 'workforce', diff --git a/src/Faker/Provider/es_ES/Company.php b/src/Faker/Provider/es_ES/Company.php index 73bd3159b2..5d6dafecc2 100644 --- a/src/Faker/Provider/es_ES/Company.php +++ b/src/Faker/Provider/es_ES/Company.php @@ -22,7 +22,7 @@ class Company extends \Faker\Provider\Company 'Adaptive', 'Advanced', 'Ameliorated', 'Assimilated', 'Automated', 'Balanced', 'Business-focused', 'Centralized', 'Cloned', 'Compatible', 'Configurable', 'Cross-group', 'Cross-platform', 'Customer-focused', 'Customizable', 'Decentralized', 'De-engineered', 'Devolved', 'Digitized', 'Distributed', 'Diverse', 'Down-sized', 'Enhanced', 'Enterprise-wide', 'Ergonomic', 'Exclusive', 'Expanded', 'Extended', 'Facetoface', 'Focused', 'Front-line', 'Fully-configurable', 'Function-based', 'Fundamental', 'Future-proofed', 'Grass-roots', 'Horizontal', 'Implemented', 'Innovative', 'Integrated', 'Intuitive', 'Inverse', 'Managed', 'Mandatory', 'Monitored', 'Multi-channelled', 'Multi-lateral', 'Multi-layered', 'Multi-tiered', 'Networked', 'Object-based', 'Open-architected', 'Open-source', 'Operative', 'Optimized', 'Optional', 'Organic', 'Organized', 'Persevering', 'Persistent', 'Phased', 'Polarised', 'Pre-emptive', 'Proactive', 'Profit-focused', 'Profound', 'Programmable', 'Progressive', 'Public-key', 'Quality-focused', 'Reactive', 'Realigned', 'Re-contextualized', 'Re-engineered', 'Reduced', 'Reverse-engineered', 'Right-sized', 'Robust', 'Seamless', 'Secured', 'Self-enabling', 'Sharable', 'Stand-alone', 'Streamlined', 'Switchable', 'Synchronised', 'Synergistic', 'Synergized', 'Team-oriented', 'Total', 'Triple-buffered', 'Universal', 'Up-sized', 'Upgradable', 'User-centric', 'User-friendly', 'Versatile', 'Virtual', 'Visionary', 'Vision-oriented', ], [ - '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'assymetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', + '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'asymmetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', ], [ 'ability', 'access', 'adapter', 'algorithm', 'alliance', 'analyzer', 'application', 'approach', 'architecture', 'archive', 'artificialintelligence', 'array', 'attitude', 'benchmark', 'budgetarymanagement', 'capability', 'capacity', 'challenge', 'circuit', 'collaboration', 'complexity', 'concept', 'conglomeration', 'contingency', 'core', 'customerloyalty', 'database', 'data-warehouse', 'definition', 'emulation', 'encoding', 'encryption', 'extranet', 'firmware', 'flexibility', 'focusgroup', 'forecast', 'frame', 'framework', 'function', 'functionalities', 'GraphicInterface', 'groupware', 'GraphicalUserInterface', 'hardware', 'help-desk', 'hierarchy', 'hub', 'implementation', 'info-mediaries', 'infrastructure', 'initiative', 'installation', 'instructionset', 'interface', 'internetsolution', 'intranet', 'knowledgeuser', 'knowledgebase', 'localareanetwork', 'leverage', 'matrices', 'matrix', 'methodology', 'middleware', 'migration', 'model', 'moderator', 'monitoring', 'moratorium', 'neural-net', 'openarchitecture', 'opensystem', 'orchestration', 'paradigm', 'parallelism', 'policy', 'portal', 'pricingstructure', 'processimprovement', 'product', 'productivity', 'project', 'projection', 'protocol', 'securedline', 'service-desk', 'software', 'solution', 'standardization', 'strategy', 'structure', 'success', 'superstructure', 'support', 'synergy', 'systemengine', 'task-force', 'throughput', 'time-frame', 'toolset', 'utilisation', 'website', 'workforce', diff --git a/src/Faker/Provider/es_PE/Company.php b/src/Faker/Provider/es_PE/Company.php index ff9f50dc11..96a1d13ebd 100644 --- a/src/Faker/Provider/es_PE/Company.php +++ b/src/Faker/Provider/es_PE/Company.php @@ -17,7 +17,7 @@ class Company extends \Faker\Provider\Company 'Adaptive', 'Advanced', 'Ameliorated', 'Assimilated', 'Automated', 'Balanced', 'Business-focused', 'Centralized', 'Cloned', 'Compatible', 'Configurable', 'Cross-group', 'Cross-platform', 'Customer-focused', 'Customizable', 'Decentralized', 'De-engineered', 'Devolved', 'Digitized', 'Distributed', 'Diverse', 'Down-sized', 'Enhanced', 'Enterprise-wide', 'Ergonomic', 'Exclusive', 'Expanded', 'Extended', 'Facetoface', 'Focused', 'Front-line', 'Fully-configurable', 'Function-based', 'Fundamental', 'Future-proofed', 'Grass-roots', 'Horizontal', 'Implemented', 'Innovative', 'Integrated', 'Intuitive', 'Inverse', 'Managed', 'Mandatory', 'Monitored', 'Multi-channelled', 'Multi-lateral', 'Multi-layered', 'Multi-tiered', 'Networked', 'Object-based', 'Open-architected', 'Open-source', 'Operative', 'Optimized', 'Optional', 'Organic', 'Organized', 'Persevering', 'Persistent', 'Phased', 'Polarised', 'Pre-emptive', 'Proactive', 'Profit-focused', 'Profound', 'Programmable', 'Progressive', 'Public-key', 'Quality-focused', 'Reactive', 'Realigned', 'Re-contextualized', 'Re-engineered', 'Reduced', 'Reverse-engineered', 'Right-sized', 'Robust', 'Seamless', 'Secured', 'Self-enabling', 'Sharable', 'Stand-alone', 'Streamlined', 'Switchable', 'Synchronised', 'Synergistic', 'Synergized', 'Team-oriented', 'Total', 'Triple-buffered', 'Universal', 'Up-sized', 'Upgradable', 'User-centric', 'User-friendly', 'Versatile', 'Virtual', 'Visionary', 'Vision-oriented', ], [ - '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'assymetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', + '24hour', '24/7', '3rdgeneration', '4thgeneration', '5thgeneration', '6thgeneration', 'actuating', 'analyzing', 'asymmetric', 'asynchronous', 'attitude-oriented', 'background', 'bandwidth-monitored', 'bi-directional', 'bifurcated', 'bottom-line', 'clear-thinking', 'client-driven', 'client-server', 'coherent', 'cohesive', 'composite', 'context-sensitive', 'contextually-based', 'content-based', 'dedicated', 'demand-driven', 'didactic', 'directional', 'discrete', 'disintermediate', 'dynamic', 'eco-centric', 'empowering', 'encompassing', 'even-keeled', 'executive', 'explicit', 'exuding', 'fault-tolerant', 'foreground', 'fresh-thinking', 'full-range', 'global', 'grid-enabled', 'heuristic', 'high-level', 'holistic', 'homogeneous', 'human-resource', 'hybrid', 'impactful', 'incremental', 'intangible', 'interactive', 'intermediate', 'leadingedge', 'local', 'logistical', 'maximized', 'methodical', 'mission-critical', 'mobile', 'modular', 'motivating', 'multimedia', 'multi-state', 'multi-tasking', 'national', 'needs-based', 'neutral', 'nextgeneration', 'non-volatile', 'object-oriented', 'optimal', 'optimizing', 'radical', 'real-time', 'reciprocal', 'regional', 'responsive', 'scalable', 'secondary', 'solution-oriented', 'stable', 'static', 'systematic', 'systemic', 'system-worthy', 'tangible', 'tertiary', 'transitional', 'uniform', 'upward-trending', 'user-facing', 'value-added', 'web-enabled', 'well-modulated', 'zeroadministration', 'zerodefect', 'zerotolerance', ], [ 'ability', 'access', 'adapter', 'algorithm', 'alliance', 'analyzer', 'application', 'approach', 'architecture', 'archive', 'artificialintelligence', 'array', 'attitude', 'benchmark', 'budgetarymanagement', 'capability', 'capacity', 'challenge', 'circuit', 'collaboration', 'complexity', 'concept', 'conglomeration', 'contingency', 'core', 'customerloyalty', 'database', 'data-warehouse', 'definition', 'emulation', 'encoding', 'encryption', 'extranet', 'firmware', 'flexibility', 'focusgroup', 'forecast', 'frame', 'framework', 'function', 'functionalities', 'GraphicInterface', 'groupware', 'GraphicalUserInterface', 'hardware', 'help-desk', 'hierarchy', 'hub', 'implementation', 'info-mediaries', 'infrastructure', 'initiative', 'installation', 'instructionset', 'interface', 'internetsolution', 'intranet', 'knowledgeuser', 'knowledgebase', 'localareanetwork', 'leverage', 'matrices', 'matrix', 'methodology', 'middleware', 'migration', 'model', 'moderator', 'monitoring', 'moratorium', 'neural-net', 'openarchitecture', 'opensystem', 'orchestration', 'paradigm', 'parallelism', 'policy', 'portal', 'pricingstructure', 'processimprovement', 'product', 'productivity', 'project', 'projection', 'protocol', 'securedline', 'service-desk', 'software', 'solution', 'standardization', 'strategy', 'structure', 'success', 'superstructure', 'support', 'synergy', 'systemengine', 'task-force', 'throughput', 'time-frame', 'toolset', 'utilisation', 'website', 'workforce', diff --git a/src/Faker/Provider/fi_FI/Person.php b/src/Faker/Provider/fi_FI/Person.php index 328a44b2c8..bb1c24c06a 100644 --- a/src/Faker/Provider/fi_FI/Person.php +++ b/src/Faker/Provider/fi_FI/Person.php @@ -91,8 +91,7 @@ class Person extends \Faker\Provider\Person * * @see http://www.finlex.fi/fi/laki/ajantasa/2010/20100128 * - * @param \DateTime $birthdate - * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE + * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE * * @return string on format DDMMYYCZZZQ, where DDMMYY is the date of birth, C the century sign, ZZZ the individual number and Q the control character (checksum) */ diff --git a/src/Faker/Provider/fr_FR/Address.php b/src/Faker/Provider/fr_FR/Address.php index 106f648cca..d6dbb76cca 100644 --- a/src/Faker/Provider/fr_FR/Address.php +++ b/src/Faker/Provider/fr_FR/Address.php @@ -34,7 +34,11 @@ class Address extends \Faker\Provider\Address ]; protected static $buildingNumber = ['%', '%#', '%#', '%#', '%##']; - protected static $postcode = ['#####', '## ###']; + + /** + * @see https://en.wikipedia.org/wiki/Postal_codes_in_France + */ + protected static $postcode = ['#####']; protected static $country = [ 'Afghanistan', 'Afrique du sud', 'Albanie', 'Algérie', 'Allemagne', 'Andorre', 'Angola', 'Anguilla', 'Antarctique', 'Antigua et Barbuda', 'Antilles néerlandaises', 'Arabie saoudite', 'Argentine', 'Arménie', 'Aruba', 'Australie', 'Autriche', 'Azerbaïdjan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Belgique', 'Belize', 'Benin', 'Bermudes (Les)', 'Bhoutan', 'Biélorussie', 'Bolivie', 'Bosnie-Herzégovine', 'Botswana', 'Bouvet (Îles)', 'Brunei', 'Brésil', 'Bulgarie', 'Burkina Faso', 'Burundi', 'Cambodge', 'Cameroun', 'Canada', 'Cap Vert', 'Cayman (Îles)', 'Chili', 'Chine (Rép. pop.)', 'Christmas (Île)', 'Chypre', 'Cocos (Îles)', 'Colombie', 'Comores', 'Cook (Îles)', 'Corée du Nord', 'Corée, Sud', 'Costa Rica', 'Croatie', 'Cuba', 'Côte d\'Ivoire', 'Danemark', 'Djibouti', 'Dominique', 'Égypte', 'El Salvador', 'Émirats arabes unis', 'Équateur', 'Érythrée', 'Espagne', 'Estonie', 'États-Unis', 'Ethiopie', 'Falkland (Île)', 'Fidji (République des)', 'Finlande', 'France', 'Féroé (Îles)', 'Gabon', diff --git a/src/Faker/Provider/it_IT/Address.php b/src/Faker/Provider/it_IT/Address.php index b9930ff820..efa9dd5e19 100644 --- a/src/Faker/Provider/it_IT/Address.php +++ b/src/Faker/Provider/it_IT/Address.php @@ -12,35 +12,35 @@ class Address extends \Faker\Provider\Address ]; protected static $postcode = ['#####']; protected static $state = [ - 'Agrigento', 'Alessandria', 'Ancona', 'Aosta', 'Arezzo', 'Ascoli Piceno', 'Asti', 'Avellino', 'Bari', 'Barletta-Andria-Trani', 'Belluno', 'Benevento', 'Bergamo', 'Biella', 'Bologna', 'Bolzano', 'Brescia', 'Brindisi', 'Cagliari', 'Caltanissetta', 'Campobasso', 'Carbonia-Iglesias', 'Caserta', 'Catania', 'Catanzaro', 'Chieti', 'Como', 'Cosenza', 'Cremona', 'Crotone', 'Cuneo', 'Enna', 'Fermo', 'Ferrara', 'Firenze', 'Foggia', 'Forlì-Cesena', 'Frosinone', 'Genova', 'Gorizia', 'Grosseto', 'Imperia', 'Isernia', 'La Spezia', 'L\'Aquila', 'Latina', 'Lecce', 'Lecco', 'Livorno', 'Lodi', 'Lucca', 'Macerata', 'Mantova', 'Massa-Carrara', 'Matera', 'Messina', 'Milano', 'Modena', 'Monza e della Brianza', 'Napoli', 'Novara', 'Nuoro', 'Olbia-Tempio', 'Oristano', 'Padova', 'Palermo', 'Parma', 'Pavia', 'Perugia', 'Pesaro e Urbino', 'Pescara', 'Piacenza', 'Pisa', 'Pistoia', 'Pordenone', 'Potenza', 'Prato', 'Ragusa', 'Ravenna', 'Reggio Calabria', 'Reggio Emilia', 'Rieti', 'Rimini', 'Roma', 'Rovigo', 'Salerno', 'Medio Campidano', 'Sassari', 'Savona', 'Siena', 'Siracusa', 'Sondrio', 'Taranto', 'Teramo', 'Terni', 'Torino', 'Ogliastra', 'Trapani', 'Trento', 'Treviso', 'Trieste', 'Udine', 'Varese', 'Venezia', 'Verbano-Cusio-Ossola', 'Vercelli', 'Verona', 'Vibo Valentia', 'Vicenza', 'Viterbo', + 'Agrigento', 'Alessandria', 'Ancona', 'Aosta', 'Arezzo', 'Ascoli Piceno', 'Asti', 'Avellino', 'Bari', 'Barletta-Andria-Trani', 'Belluno', 'Benevento', 'Bergamo', 'Biella', 'Bologna', 'Bolzano', 'Brescia', 'Brindisi', 'Cagliari', 'Caltanissetta', 'Campobasso', 'Caserta', 'Catania', 'Catanzaro', 'Chieti', 'Como', 'Cosenza', 'Cremona', 'Crotone', 'Cuneo', 'Enna', 'Fermo', 'Ferrara', 'Firenze', 'Foggia', 'Forlì-Cesena', 'Frosinone', 'Genova', 'Gorizia', 'Grosseto', 'Imperia', 'Isernia', 'La Spezia', 'L\'Aquila', 'Latina', 'Lecce', 'Lecco', 'Livorno', 'Lodi', 'Lucca', 'Macerata', 'Mantova', 'Massa-Carrara', 'Matera', 'Messina', 'Milano', 'Modena', 'Monza e della Brianza', 'Napoli', 'Novara', 'Nuoro', 'Oristano', 'Padova', 'Palermo', 'Parma', 'Pavia', 'Perugia', 'Pesaro e Urbino', 'Pescara', 'Piacenza', 'Pisa', 'Pistoia', 'Pordenone', 'Potenza', 'Prato', 'Ragusa', 'Ravenna', 'Reggio Calabria', 'Reggio Emilia', 'Rieti', 'Rimini', 'Roma', 'Rovigo', 'Salerno', 'Sassari', 'Savona', 'Siena', 'Siracusa', 'Sondrio', 'Sud Sardegna', 'Taranto', 'Teramo', 'Terni', 'Torino', 'Trapani', 'Trento', 'Treviso', 'Trieste', 'Udine', 'Varese', 'Venezia', 'Verbano-Cusio-Ossola', 'Vercelli', 'Verona', 'Vibo Valentia', 'Vicenza', 'Viterbo', ]; protected static $stateAbbr = [ - 'AG', 'AL', 'AN', 'AO', 'AR', 'AP', 'AT', 'AV', 'BA', 'BT', 'BL', 'BN', 'BG', 'BI', 'BO', 'BZ', 'BS', 'BR', 'CA', 'CL', 'CB', 'CI', 'CE', 'CT', 'CZ', 'CH', 'CO', 'CS', 'CR', 'KR', 'CN', 'EN', 'FM', 'FE', 'FI', 'FG', 'FC', 'FR', 'GE', 'GO', 'GR', 'IM', 'IS', 'SP', 'AQ', 'LT', 'LE', 'LC', 'LI', 'LO', 'LU', 'MC', 'MN', 'MS', 'MT', 'ME', 'MI', 'MO', 'MB', 'NA', 'NO', 'NU', 'OT', 'OR', 'PD', 'PA', 'PR', 'PV', 'PG', 'PU', 'PE', 'PC', 'PI', 'PT', 'PN', 'PZ', 'PO', 'RG', 'RA', 'RC', 'RE', 'RI', 'RN', 'RM', 'RO', 'SA', 'VS', 'SS', 'SV', 'SI', 'SR', 'SO', 'TA', 'TE', 'TR', 'TO', 'OG', 'TP', 'TN', 'TV', 'TS', 'UD', 'VA', 'VE', 'VB', 'VC', 'VR', 'VV', 'VI', 'VT', + 'AG', 'AL', 'AN', 'AO', 'AR', 'AP', 'AT', 'AV', 'BA', 'BT', 'BL', 'BN', 'BG', 'BI', 'BO', 'BZ', 'BS', 'BR', 'CA', 'CL', 'CB', 'CE', 'CT', 'CZ', 'CH', 'CO', 'CS', 'CR', 'KR', 'CN', 'EN', 'FM', 'FE', 'FI', 'FG', 'FC', 'FR', 'GE', 'GO', 'GR', 'IM', 'IS', 'SP', 'AQ', 'LT', 'LE', 'LC', 'LI', 'LO', 'LU', 'MC', 'MN', 'MS', 'MT', 'ME', 'MI', 'MO', 'MB', 'NA', 'NO', 'NU', 'OR', 'PD', 'PA', 'PR', 'PV', 'PG', 'PU', 'PE', 'PC', 'PI', 'PT', 'PN', 'PZ', 'PO', 'RG', 'RA', 'RC', 'RE', 'RI', 'RN', 'RM', 'RO', 'SA', 'SS', 'SV', 'SI', 'SR', 'SO', 'SU', 'TA', 'TE', 'TR', 'TO', 'TP', 'TN', 'TV', 'TS', 'UD', 'VA', 'VE', 'VB', 'VC', 'VR', 'VV', 'VI', 'VT', ]; protected static $country = [ - 'Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antartide (territori a sud del 60° parallelo)', 'Antigua e Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', - 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Bielorussia', 'Belgio', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia e Herzegovina', 'Botswana', 'Bouvet Island (Bouvetoya)', 'Brasile', 'Territorio dell\'arcipelago indiano', 'Isole Vergini Britanniche', 'Brunei Darussalam', 'Bulgaria', 'Burkina Faso', 'Burundi', - 'Cambogia', 'Cameroon', 'Canada', 'Capo Verde', 'Isole Cayman', 'Repubblica Centrale Africana', 'Chad', 'Cile', 'Cina', 'Isola di Pasqua', 'Isola di Cocos (Keeling)', 'Colombia', 'Comoros', 'Congo', 'Isole Cook', 'Costa Rica', 'Costa d\'Avorio', 'Croazia', 'Cuba', 'Cipro', 'Repubblica Ceca', - 'Danimarca', 'Gibuti', 'Repubblica Dominicana', - 'Equador', 'Egitto', 'El Salvador', 'Guinea Equatoriale', 'Eritrea', 'Estonia', 'Etiopia', - 'Isole Faroe', 'Isole Falkland (Malvinas)', 'Fiji', 'Finlandia', 'Francia', 'Guyana Francese', 'Polinesia Francese', 'Territori Francesi del sud', - 'Gabon', 'Gambia', 'Georgia', 'Germania', 'Ghana', 'Gibilterra', 'Grecia', 'Groenlandia', 'Grenada', 'Guadalupa', 'Guam', 'Guatemala', 'Guernsey', 'Guinea', 'Guinea-Bissau', 'Guyana', - 'Haiti', 'Heard Island and McDonald Islands', 'Città del Vaticano', 'Honduras', 'Hong Kong', 'Ungheria', - 'Islanda', 'India', 'Indonesia', 'Iran', 'Iraq', 'Irlanda', 'Isola di Man', 'Israele', 'Italia', - 'Giamaica', 'Giappone', 'Jersey', 'Giordania', - 'Kazakhstan', 'Kenya', 'Kiribati', 'Korea', 'Kuwait', 'Republicca Kirgiza', - 'Repubblica del Laos', 'Latvia', 'Libano', 'Lesotho', 'Liberia', 'Libyan Arab Jamahiriya', 'Liechtenstein', 'Lituania', 'Lussemburgo', - 'Macao', 'Macedonia', 'Madagascar', 'Malawi', 'Malesia', 'Maldive', 'Mali', 'Malta', 'Isole Marshall', 'Martinica', 'Mauritania', 'Mauritius', 'Mayotte', 'Messico', 'Micronesia', 'Moldova', 'Principato di Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Marocco', 'Mozambico', 'Myanmar', - 'Namibia', 'Nauru', 'Nepal', 'Antille Olandesi', 'Olanda', 'Nuova Caledonia', 'Nuova Zelanda', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Isole Norfolk', 'Northern Mariana Islands', 'Norvegia', - 'Oman', - 'Pakistan', 'Palau', 'Palestina', 'Panama', 'Papua Nuova Guinea', 'Paraguay', 'Peru', 'Filippine', 'Pitcairn Islands', 'Polonia', 'Portogallo', 'Porto Rico', + 'Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antartide (territori a sud del 60° parallelo)', 'Antigua e Barbuda', 'Antille Olandesi', 'Arabia Saudita', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', + 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Bielorussia', 'Belgio', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia e Herzegovina', 'Botswana', 'Isola Bouvet', 'Brasile', 'Territorio dell\'arcipelago indiano', 'Isole Vergini Britanniche', 'Brunei', 'Bulgaria', 'Burkina Faso', 'Burundi', + 'Cambogia', 'Cameroon', 'Canada', 'Capo Verde', 'Isole Cayman', 'Repubblica Centrale Africana', 'Chad', 'Cile', 'Cina', 'Isola di Pasqua', 'Isole Cocos', 'Colombia', 'Comore', 'Congo', 'Isole Cook', 'Costa Rica', 'Costa d\'Avorio', 'Croazia', 'Cuba', 'Cipro', 'Repubblica Ceca', + 'Danimarca', 'Repubblica Dominicana', + 'Equador', 'Egitto', 'El Salvador', 'Emirati Arabi Uniti', 'Eritrea', 'Estonia', 'Eswatini', 'Etiopia', + 'Isole Faroe', 'Isole Falkland', 'Fiji', 'Filippine', 'Finlandia', 'Francia', 'Guyana Francese', 'Polinesia Francese', 'Territori Francesi del Sud', + 'Gabon', 'Gambia', 'Georgia', 'Georgia del Sud e Isole Sandwich Australi', 'Germania', 'Ghana', 'Giamaica', 'Giappone', 'Gibilterra', 'Gibuti', 'Giordania', 'Grecia', 'Groenlandia', 'Grenada', 'Guadalupa', 'Guam', 'Guatemala', 'Guernsey', 'Guinea', 'Guinea-Bissau', 'Guinea Equatoriale', 'Guyana', + 'Haiti', 'Isole Heard e McDonald', 'Honduras', 'Hong Kong', + 'Islanda', 'India', 'Indonesia', 'Iran', 'Iraq', 'Irlanda', 'Israele', 'Italia', + 'Isola di Jersey', + 'Kazakhstan', 'Kenya', 'Kirghizistan', 'Kiribati', 'Korea', 'Kuwait', + 'Repubblica del Laos', 'Latvia', 'Lesotho', 'Libano', 'Liberia', 'Libia', 'Liechtenstein', 'Lituania', 'Lussemburgo', + 'Macao', 'Macedonia', 'Madagascar', 'Malawi', 'Malesia', 'Maldive', 'Mali', 'Malta', 'Isola di Man', 'Isole Marianne Settentrionali', 'Isole Marshall', 'Martinica', 'Mauritania', 'Mauritius', 'Mayotte', 'Messico', 'Micronesia', 'Isole Minori esterne degli Stati Uniti d\'America', 'Moldova', 'Principato di Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Marocco', 'Mozambico', 'Myanmar', + 'Namibia', 'Nauru', 'Nepal', 'Nuova Caledonia', 'Nuova Zelanda', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Isole Norfolk', 'Norvegia', + 'Olanda', 'Oman', + 'Pakistan', 'Palau', 'Palestina', 'Panama', 'Papua Nuova Guinea', 'Paraguay', 'Peru', 'Isole Pitcairn', 'Polonia', 'Portogallo', 'Porto Rico', 'Qatar', - 'Reunion', 'Romania', 'Russia', 'Rwanda', - 'San Bartolomeo', 'Sant\'Elena', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Martin', 'Saint Pierre and Miquelon', 'Saint Vincent and the Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe', 'Arabia Saudita', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovenia', 'Isole Solomon', 'Somalia', 'Sud Africa', 'Georgia del sud e South Sandwich Islands', 'Spagna', 'Sri Lanka', 'Sudan', 'Suriname', 'Svalbard & Jan Mayen Islands', 'Swaziland', 'Svezia', 'Svizzera', 'Siria', - 'Taiwan', 'Tajikistan', 'Tanzania', 'Tailandia', 'Timor-Leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad e Tobago', 'Tunisia', 'Turchia', 'Turkmenistan', 'Isole di Turks and Caicos', 'Tuvalu', - 'Uganda', 'Ucraina', 'Emirati Arabi Uniti', 'Regno Unito', 'Stati Uniti d\'America', 'United States Minor Outlying Islands', 'Isole Vergini Statunitensi', 'Uruguay', 'Uzbekistan', - 'Vanuatu', 'Venezuela', 'Vietnam', - 'Wallis and Futuna', 'Western Sahara', + 'Regno Unito', 'Isola della Riunione', 'Romania', 'Russia', 'Rwanda', + 'Sahara Occidentale', 'San Bartolomeo', 'Sant\'Elena', 'Saint Kitts e Nevis', 'Saint Lucia', 'Saint Martin', 'Saint-Pierre e Miquelon', 'Saint Vincent e Grenadine', 'Samoa', 'San Marino', 'Sao Tome e Principe', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovenia', 'Isole Solomon', 'Somalia', 'Spagna', 'Sri Lanka', 'Stati Uniti d\'America', 'Sud Africa', 'Sudan', 'Suriname', 'Isole Svalbard e Jan Mayen', 'Svezia', 'Svizzera', 'Siria', + 'Taiwan', 'Tajikistan', 'Tanzania', 'Tailandia', 'Timor Leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad e Tobago', 'Tunisia', 'Turchia', 'Turkmenistan', 'Isole di Turks e Caicos', 'Tuvalu', + 'Uganda', 'Ucraina', 'Uruguay', 'Uzbekistan', 'Ungheria', + 'Vanuatu', 'Vaticano', 'Venezuela', 'Isole Vergini Statunitensi', 'Vietnam', + 'Wallis e Futuna', 'Yemen', 'Zambia', 'Zimbabwe', ]; @@ -64,7 +64,7 @@ class Address extends \Faker\Provider\Address protected static $secondaryAddressFormats = ['Appartamento ##', 'Piano #']; /** - * @example 'East' + * @example 'Borgo' */ public static function cityPrefix() { @@ -72,7 +72,7 @@ public static function cityPrefix() } /** - * @example 'Appt. 350' + * @example 'Appartamento 350' */ public static function secondaryAddress() { @@ -80,7 +80,7 @@ public static function secondaryAddress() } /** - * @example 'California' + * @example 'Cagliari' */ public static function state() { diff --git a/src/Faker/Provider/it_IT/Person.php b/src/Faker/Provider/it_IT/Person.php index 9922fd024e..c74052eaec 100644 --- a/src/Faker/Provider/it_IT/Person.php +++ b/src/Faker/Provider/it_IT/Person.php @@ -23,41 +23,54 @@ class Person extends \Faker\Provider\Person ]; protected static $firstNameMale = [ - 'Aaron', 'Abramo', 'Adriano', 'Akira', 'Alan', 'Alberto', 'Albino', 'Alessandro', 'Alessio', 'Amedeo', 'Amos', 'Anastasio', 'Anselmo', - 'Antimo', 'Antonino', 'Antonio', 'Ariel', 'Armando', 'Aroldo', 'Arturo', 'Augusto', 'Battista', 'Bernardo', 'Boris', 'Caio', - 'Carlo', 'Carmelo', 'Ciro', 'Damiano', 'Danny', 'Dante', 'Davide', 'Davis', 'Demis', 'Dimitri', 'Domingo', 'Dylan', - 'Edilio', 'Egidio', 'Elio', 'Emanuel', 'Emidio', 'Enrico', 'Enzo', 'Ercole', 'Ermes', 'Ethan', 'Ettore', 'Eusebio', - 'Fabiano', 'Fabio', 'Ferdinando', 'Fernando', 'Fiorenzo', 'Flavio', 'Folco', 'Fulvio', 'Furio', 'Gabriele', 'Gaetano', 'Gastone', - 'Gavino', 'Gerlando', 'Germano', 'Giacinto', 'Gianantonio', 'Giancarlo', 'Gianmarco', 'Gianmaria', 'Gioacchino', 'Giordano', 'Giorgio', 'Giuliano', - 'Giulio', 'Graziano', 'Gregorio', 'Guido', 'Harry', 'Hector', 'Iacopo', 'Ian', 'Ilario', 'Italo', 'Ivano', 'Jack', - 'Jacopo', 'Jari', 'Jarno', 'Joey', 'Joseph', 'Joshua', 'Kai', 'Karim', 'Kris', 'Lamberto', 'Lauro', 'Lazzaro', - 'Leonardo', 'Liborio', 'Lino', 'Lorenzo', 'Loris', 'Ludovico', 'Luigi', 'Manfredi', 'Manuele', 'Marco', 'Mariano', 'Marino', - 'Marvin', 'Marzio', 'Matteo', 'Mattia', 'Mauro', 'Max', 'Michael', 'Mirco', 'Mirko', 'Modesto', 'Moreno', 'Nabil', - 'Nadir', 'Nathan', 'Nazzareno', 'Nick', 'Nico', 'Noah', 'Noel', 'Omar', 'Oreste', 'Osvaldo', 'Pablo', 'Patrizio', - 'Pietro', 'Priamo', 'Quirino', 'Raoul', 'Renato', 'Renzo', 'Rocco', 'Rodolfo', 'Romeo', 'Romolo', 'Rudy', 'Sabatino', - 'Sabino', 'Samuel', 'Sandro', 'Santo', 'Sebastian', 'Sesto', 'Silvano', 'Silverio', 'Sirio', 'Siro', 'Timoteo', 'Timothy', - 'Tommaso', 'Ubaldo', 'Umberto', 'Vinicio', 'Walter', 'Xavier', 'Yago', 'Alighieri', 'Alighiero', 'Amerigo', 'Arcibaldo', 'Arduino', - 'Artes', 'Audenico', 'Ausonio', 'Bacchisio', 'Baldassarre', 'Bettino', 'Bortolo', 'Caligola', 'Cecco', 'Cirino', 'Cleros', - 'Costantino', 'Costanzo', 'Danthon', 'Demian', 'Domiziano', 'Edipo', 'Egisto', 'Eliziario', 'Eriberto', 'Erminio', - 'Eustachio', 'Evangelista', 'Fiorentino', 'Giacobbe', 'Gianleonardo', 'Gianriccardo', 'Giobbe', 'Ippolito', - 'Isira', 'Joannes', 'Kociss', 'Laerte', 'Maggiore', 'Muzio', 'Nestore', 'Odino', 'Odone', 'Olo', 'Oretta', 'Orfeo', - 'Osea', 'Pacifico', 'Pericle', 'Piererminio', 'Pierfrancesco', 'Piersilvio', 'Primo', 'Quarto', 'Quasimodo', - 'Radames', 'Radio', 'Raniero', 'Rosalino', 'Rosolino', 'Rufo', 'Secondo', 'Tancredi', 'Tazio', 'Terzo', 'Teseo', - 'Tolomeo', 'Trevis', 'Tristano', 'Ulrico', 'Valdo', 'Zaccaria', 'Dindo', 'Serse', + 'Aaron', 'Abramo', 'Adriano', 'Agostino', 'Akira', 'Alan', 'Alberto', 'Albino', 'Aldo', 'Alessandro', 'Alessio', + 'Alfonso', 'Alfredo', 'Alighieri', 'Alighiero', 'Amedeo', 'Amerigo', 'Amos', 'Anastasio', 'Andrea', 'Angelo', + 'Anselmo', 'Antimo', 'Antonino', 'Antonio', 'Arcibaldo', 'Arduino', 'Ariel', 'Armando', 'Aroldo', 'Artes', 'Arturo', + 'Audenico', 'Augusto', 'Ausonio', 'Bacchisio', 'Baldassarre', 'Battista', 'Bernardo', 'Bettino', 'Boris', 'Bortolo', + 'Bruno', 'Caio', 'Caligola', 'Carlo', 'Carmelo', 'Carmine', 'Cecco', 'Cesare', 'Cirino', 'Ciro', 'Claudio', 'Cleros', + 'Corrado', 'Cosimo', 'Costantino', 'Costanzo', 'Damiano', 'Danilo', 'Danny', 'Dante', 'Danthon', 'Dario', 'David', + 'Davide', 'Davis', 'Demian', 'Demis', 'Dimitri', 'Dindo', 'Dino', 'Domenico', 'Domingo', 'Domiziano', 'Donato', 'Dylan', + 'Edilio', 'Edipo', 'Egidio', 'Egisto', 'Elio', 'Eliziario', 'Emanuel', 'Emanuele', 'Emidio', 'Emilio', 'Enrico', 'Enzo', + 'Ercole', 'Eriberto', 'Ermes', 'Erminio', 'Ernesto', 'Ethan', 'Ettore', 'Eugenio', 'Eusebio', 'Eustachio', 'Evangelista', + 'Fabiano', 'Fabio', 'Fabrizio', 'Fausto', 'Federico', 'Felice', 'Ferdinando', 'Fernando', 'Filippo', 'Fiorentino', + 'Fiorenzo', 'Flavio', 'Folco', 'Francesco', 'Franco', 'Fulvio', 'Furio', 'Gabriele', 'Gaetano', 'Gastone', 'Gavino', + 'Gennaro', 'Gerardo', 'Gerlando', 'Germano', 'Giacinto', 'Giacobbe', 'Giacomo', 'Gian', 'Gianantonio', 'Giancarlo', + 'Gianfranco', 'Gianleonardo', 'Gianluca', 'Gianmarco', 'Gianmaria', 'Gianni', 'Gianriccardo', 'Gino', 'Gioacchino', 'Giobbe', + 'Giordano', 'Giorgio', 'Giovanni', 'Giuliano', 'Giulio', 'Giuseppe', 'Graziano', 'Gregorio', 'Guido', 'Harry', 'Hector', + 'Iacopo', 'Ian', 'Ilario', 'Ippolito', 'Isira', 'Italo', 'Ivano', 'Jack', 'Jacopo', 'Jari', 'Jarno', 'Joannes', 'Joey', + 'Joseph', 'Joshua', 'Kai', 'Karim', 'Kociss', 'Kris', 'Laerte', 'Lamberto', 'Lauro', 'Lazzaro', 'Leonardo', 'Liborio', + 'Lino', 'Lorenzo', 'Loris', 'Luca', 'Luciano', 'Ludovico', 'Luigi', 'Maggiore', 'Manfredi', 'Manuele', 'Marcello', + 'Marco', 'Mariano', 'Marino', 'Mario', 'Marvin', 'Marzio', 'Massimiliano', 'Massimo', 'Matteo', 'Mattia', 'Maurizio', + 'Mauro', 'Max', 'Michael', 'Mirco', 'Mirko', 'Modesto', 'Moreno', 'Muzio', 'Nabil', 'Nadir', 'Nathan', 'Nazzareno', + 'Nestore', 'Nick', 'Nico', 'Nicola', 'Noah', 'Noel', 'Odino', 'Odone', 'Olo', 'Omar', 'Oreste', 'Oretta', 'Orfeo', + 'Osea', 'Osvaldo', 'Pablo', 'Pacifico', 'Paolo', 'Pasquale', 'Patrizio', 'Pericle', 'Piererminio', 'Pierfrancesco', + 'Piero', 'Piersilvio', 'Pietro', 'Priamo', 'Primo', 'Quarto', 'Quasimodo', 'Quirino', 'Radames', 'Radio', 'Raffaele', + 'Raniero', 'Raoul', 'Renato', 'Renzo', 'Riccardo', 'Roberto', 'Rocco', 'Rodolfo', 'Romano', 'Romeo', 'Romolo', + 'Rosalino', 'Rosolino', 'Rudy', 'Rufo', 'Sabatino', 'Sabino', 'Salvatore', 'Samuel', 'Sandro', 'Santo', 'Sebastian', + 'Sebastiano', 'Secondo', 'Sergio', 'Serse', 'Sesto', 'Silvano', 'Silverio', 'Silvio', 'Sirio', 'Siro', 'Stefano', + 'Tancredi', 'Tazio', 'Terzo', 'Teseo', 'Timoteo', 'Timothy', 'Tolomeo', 'Tommaso', 'Trevis', 'Tristano', 'Ubaldo', + 'Ugo', 'Ulrico', 'Umberto', 'Valdo', 'Vincenzo', 'Vinicio', 'Vito', 'Vittorio', 'Walter', 'Xavier', 'Yago', 'Zaccaria', ]; protected static $firstNameFemale = [ - 'Assia', 'Benedetta', 'Bibiana', 'Brigitta', 'Carmela', 'Celeste', 'Cira', 'Claudia', 'Concetta', 'Cristyn', 'Deborah', 'Demi', 'Diana', - 'Donatella', 'Doriana', 'Edvige', 'Elda', 'Elga', 'Elsa', 'Emilia', 'Enrica', 'Erminia', 'Evita', 'Fatima', 'Felicia', - 'Filomena', 'Fortunata', 'Gilda', 'Giovanna', 'Giulietta', 'Grazia', 'Helga', 'Ileana', 'Ingrid', 'Ione', 'Irene', 'Isabel', - 'Ivonne', 'Jelena', 'Kayla', 'Kristel', 'Laura', 'Leone', 'Lia', 'Lidia', 'Lisa', 'Loredana', 'Loretta', 'Luce', - 'Lucia', 'Lucrezia', 'Luna', 'Maika', 'Marcella', 'Maria', 'Marianita', 'Mariapia', 'Marina', 'Maristella', 'Maruska', 'Matilde', - 'Mercedes', 'Michele', 'Miriam', 'Miriana', 'Monia', 'Morgana', 'Naomi', 'Neri', 'Nicoletta', 'Ninfa', 'Noemi', 'Nunzia', - 'Olimpia', 'Ortensia', 'Penelope', 'Prisca', 'Rebecca', 'Rita', 'Rosalba', 'Rosaria', 'Rosita', 'Ruth', 'Samira', 'Sarita', - 'Sasha', 'Shaira', 'Thea', 'Ursula', 'Vania', 'Vera', 'Vienna', 'Artemide', 'Cassiopea', 'Cesidia', 'Clea', 'Cleopatra', - 'Clodovea', 'Cosetta', 'Damiana', 'Danuta', 'Diamante', 'Eufemia', 'Flaviana', 'Gelsomina', 'Genziana', 'Giacinta', 'Guendalina', - 'Jole', 'Mariagiulia', 'Marieva', 'Mietta', 'Nayade', 'Piccarda', 'Selvaggia', 'Sibilla', 'Soriana', 'Sue ellen', 'Tosca', 'Violante', - 'Vitalba', 'Zelida', + 'Adriana', 'Alessandra', 'Andrea', 'Angela', 'Angelina', 'Anna', 'Annalisa', 'Annamaria', 'Annunziata', 'Antonella', + 'Antonia', 'Antonietta', 'Antonina', 'Artemide', 'Asia', 'Assia', 'Assunta', 'Barbara', 'Benedetta', 'Bibiana', 'Brigitta', + 'Bruna', 'Carla', 'Carmela', 'Cassiopea', 'Caterina', 'Celeste', 'Cesidia', 'Chiara', 'Cinzia', 'Cira', 'Clara', 'Claudia', + 'Clea', 'Cleopatra', 'Clodovea', 'Concetta', 'Cosetta', 'Cristina', 'Cristyn', 'Damiana', 'Daniela', 'Danuta', 'Deborah', + 'Demi', 'Diamante', 'Diana', 'Domenica', 'Donatella', 'Doriana', 'Edvige', 'Elda', 'Elena', 'Eleonora', 'Elga', 'Elisa', + 'Elisabetta', 'Elsa', 'Emanuela', 'Emilia', 'Enrica', 'Erminia', 'Eufemia', 'Evita', 'Fatima', 'Federica', 'Felicia', + 'Filomena', 'Flaviana', 'Fortunata', 'Franca', 'Francesca', 'Gabriella', 'Gelsomina', 'Genziana', 'Giacinta', 'Gilda', + 'Giovanna', 'Giuliana', 'Giulietta', 'Giuseppa', 'Giuseppina', 'Grazia', 'Graziella', 'Guendalina', 'Helga', 'Ida', 'Ileana', + 'Ingrid', 'Ione', 'Irene', 'Isabel', 'Isabella', 'Ivana', 'Ivonne', 'Jelena', 'Jole', 'Kayla', 'Kristel', 'Laura', 'Leone', + 'Lia', 'Lidia', 'Liliana', 'Lina', 'Lisa', 'Loredana', 'Loretta', 'Luce', 'Lucia', 'Luciana', 'Lucrezia', 'Luisa', 'Luna', + 'Maddalena', 'Maika', 'Manuela', 'Marcella', 'Margherita', 'Maria', 'Mariagiulia', 'Marianita', 'Marianna', 'Mariapia', + 'Marieva', 'Marina', 'Marisa', 'Maristella', 'Marta', 'Maruska', 'Matilde', 'Mercedes', 'Michela', 'Michele', 'Michelle', + 'Mietta', 'Mirella', 'Miriam', 'Miriana', 'Monia', 'Monica', 'Morgana', 'Nadia', 'Naomi', 'Nayade', 'Neri', 'Nicoletta', + 'Ninfa', 'Noemi', 'Nunzia', 'Olimpia', 'Ortensia', 'Paola', 'Patrizia', 'Penelope', 'Piccarda', 'Pierina', 'Prisca', + 'Raffaella', 'Rebecca', 'Renata', 'Rita', 'Roberta', 'Rosa', 'Rosalba', 'Rosalia', 'Rosanna', 'Rosaria', 'Rosita', + 'Ruth', 'Sabrina', 'Samira', 'Sandra', 'Sara', 'Sarah', 'Sarita', 'Sasha', 'Selvaggia', 'Shaira', 'Sibilla', 'Silvana', + 'Silvia', 'Simona', 'Sonia', 'Soriana', 'Stefania', 'Stella', 'Sue ellen', 'Teresa', 'Thea', 'Tiziana', 'Tosca', + 'Ursula', 'Valentina', 'Vania', 'Vera', 'Veronica', 'Vienna', 'Vincenza', 'Violante', 'Vitalba', 'Vittoria', 'Zelida', ]; protected static $lastName = [ @@ -69,7 +82,7 @@ class Person extends \Faker\Provider\Person 'Rizzi', 'Monti', 'Cattaneo', 'Morelli', 'Amato', 'Silvestri', 'Mazza', 'Testa', 'Grassi', 'Pellegrino', 'Carbone', 'Giuliani', 'Benedetti', 'Barone', 'Rossetti', 'Caputo', 'Montanari', 'Guerra', 'Palmieri', 'Bernardi', 'Martino', 'Fiore', 'De rosa', 'Ferretti', 'Bellini', 'Basile', 'Riva', 'Donati', 'Piras', 'Vitali', 'Battaglia', 'Sartori', 'Neri', 'Costantini', - 'Milani', 'Pagano', 'Ruggiero', 'Sorrentino', 'D\'amico', 'Orlando', 'Damico', 'Negri', + 'Milani', 'Pagano', 'Ruggiero', 'Sorrentino', 'D\'amico', 'Orlando', 'Damico', 'Negri', 'Verdi', ]; protected static $titleMale = ['Sig.', 'Dott.', 'Dr.', 'Ing.']; diff --git a/src/Faker/Provider/ja_JP/Text.php b/src/Faker/Provider/ja_JP/Text.php index 55bcc62972..9cb9a71ba4 100644 --- a/src/Faker/Provider/ja_JP/Text.php +++ b/src/Faker/Provider/ja_JP/Text.php @@ -628,10 +628,12 @@ protected static function appendEnd($text) $chars = static::split($text); $last = end($chars); } + // if the last char is a not-valid-end punctuation, remove it if (in_array($last, static::$notEndPunct, false)) { $text = preg_replace('/.$/u', '', $text); } + // if the last char is not a valid punctuation, append a default one. return in_array($last, static::$endPunct, false) ? $text : $text . '。'; } diff --git a/src/Faker/Provider/kk_KZ/Company.php b/src/Faker/Provider/kk_KZ/Company.php index 4663a748dd..75efebf836 100644 --- a/src/Faker/Provider/kk_KZ/Company.php +++ b/src/Faker/Provider/kk_KZ/Company.php @@ -54,8 +54,6 @@ public static function companyNameSuffix() * * @see http://egov.kz/wps/portal/Content?contentPath=%2Fegovcontent%2Fbus_business%2Ffor_businessmen%2Farticle%2Fbusiness_identification_number&lang=en * - * @param \DateTime $registrationDate - * * @return string 12 digits, like 150140000019 */ public static function businessIdentificationNumber(\DateTime $registrationDate = null) diff --git a/src/Faker/Provider/kk_KZ/Person.php b/src/Faker/Provider/kk_KZ/Person.php index 61852a2143..353dfae4b1 100644 --- a/src/Faker/Provider/kk_KZ/Person.php +++ b/src/Faker/Provider/kk_KZ/Person.php @@ -207,8 +207,7 @@ private static function getCenturyByYear($year) * @see http://egov.kz/wps/portal/Content?contentPath=%2Fegovcontent%2Fcitizen_migration%2Fpassport_id_card%2Farticle%2Fiin_info&lang=en * @see https://ru.wikipedia.org/wiki/%D0%98%D0%BD%D0%B4%D0%B8%D0%B2%D0%B8%D0%B4%D1%83%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9_%D0%B8%D0%B4%D0%B5%D0%BD%D1%82%D0%B8%D1%84%D0%B8%D0%BA%D0%B0%D1%86%D0%B8%D0%BE%D0%BD%D0%BD%D1%8B%D0%B9_%D0%BD%D0%BE%D0%BC%D0%B5%D1%80 * - * @param \DateTime $birthDate - * @param int $gender + * @param int $gender * * @return string 12 digits, like 780322300455 */ diff --git a/src/Faker/Provider/lt_LT/Person.php b/src/Faker/Provider/lt_LT/Person.php index c448ab814f..570eecfbeb 100644 --- a/src/Faker/Provider/lt_LT/Person.php +++ b/src/Faker/Provider/lt_LT/Person.php @@ -325,9 +325,8 @@ public function passportNumber() * @see https://en.wikipedia.org/wiki/National_identification_number#Lithuania * @see https://lt.wikipedia.org/wiki/Asmens_kodas * - * @param string $gender [male|female] - * @param \DateTime $birthdate - * @param string $randomNumber three integers + * @param string $gender [male|female] + * @param string $randomNumber three integers * * @return string on format XXXXXXXXXXX */ diff --git a/src/Faker/Provider/lv_LV/Address.php b/src/Faker/Provider/lv_LV/Address.php index fc8db5c196..0bddcc53b9 100644 --- a/src/Faker/Provider/lv_LV/Address.php +++ b/src/Faker/Provider/lv_LV/Address.php @@ -12,7 +12,7 @@ class Address extends \Faker\Provider\Address ]; protected static $buildingNumber = ['%#']; - protected static $postcode = ['LV ####']; + protected static $postcode = ['LV-####']; /** * @see https://lv.wikipedia.org/wiki/Suver%C4%93no_valstu_uzskait%C4%ABjums diff --git a/src/Faker/Provider/lv_LV/Person.php b/src/Faker/Provider/lv_LV/Person.php index d251f891a6..2139671788 100644 --- a/src/Faker/Provider/lv_LV/Person.php +++ b/src/Faker/Provider/lv_LV/Person.php @@ -2,7 +2,6 @@ namespace Faker\Provider\lv_LV; -use Faker\Calculator\Luhn; use Faker\Provider\DateTime; class Person extends \Faker\Provider\Person @@ -135,8 +134,6 @@ public function passportNumber() * * @see https://en.wikipedia.org/wiki/National_identification_number#Latvia * - * @param \DateTime $birthdate - * * @return string on format XXXXXX-XXXXX */ public function personalIdentityNumber(\DateTime $birthdate = null) @@ -145,11 +142,32 @@ public function personalIdentityNumber(\DateTime $birthdate = null) $birthdate = DateTime::dateTimeThisCentury(); } + $year = $birthdate->format('Y'); + + if ($year >= 2000 && $year <= 2099) { + $century = 2; + } elseif ($year >= 1900 && $year <= 1999) { + $century = 1; + } else { + $century = 0; + } + $datePart = $birthdate->format('dmy'); - $randomDigits = (string) static::numerify('####'); + $serialNumber = static::numerify('###'); + + $partialNumberSplit = str_split($datePart . $century . $serialNumber); + + $idDigitValidator = [1, 6, 3, 7, 9, 10, 5, 8, 4, 2]; + $total = 0; + + foreach ($partialNumberSplit as $key => $digit) { + if (isset($idDigitValidator[$key])) { + $total += $idDigitValidator[$key] * (int) $digit; + } + } - $checksum = Luhn::computeCheckDigit($datePart . $randomDigits); + $checksumDigit = (1101 - $total) % 11 % 10; - return $datePart . '-' . $randomDigits . $checksum; + return $datePart . '-' . $century . $serialNumber . $checksumDigit; } } diff --git a/src/Faker/Provider/ms_MY/Person.php b/src/Faker/Provider/ms_MY/Person.php index 1cd011bf9f..d685715d8f 100644 --- a/src/Faker/Provider/ms_MY/Person.php +++ b/src/Faker/Provider/ms_MY/Person.php @@ -792,6 +792,7 @@ public static function myKadNumber($gender = null, $hyphen = false) // gender digit. Odd = MALE, Even = FEMALE $g = self::numberBetween(0, 9); + //Credit: https://gist.github.com/mauris/3629548 if ($gender === static::GENDER_MALE) { $g = $g | 1; diff --git a/src/Faker/Provider/nb_NO/Person.php b/src/Faker/Provider/nb_NO/Person.php index 86ce721ba3..8ee85cac72 100644 --- a/src/Faker/Provider/nb_NO/Person.php +++ b/src/Faker/Provider/nb_NO/Person.php @@ -288,8 +288,7 @@ class Person extends \Faker\Provider\Person * * @see https://no.wikipedia.org/wiki/Personnummer * - * @param \DateTime $birthdate - * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE + * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE * * @return string on format DDMMYY##### */ diff --git a/src/Faker/Provider/nl_BE/Person.php b/src/Faker/Provider/nl_BE/Person.php index f4a60f96b4..55d6f18eaa 100644 --- a/src/Faker/Provider/nl_BE/Person.php +++ b/src/Faker/Provider/nl_BE/Person.php @@ -73,17 +73,17 @@ class Person extends \Faker\Provider\Person ]; /** - * Belgian Rijksregister numbers are used to identify each citizen, - * it consists of three parts, the person's day of birth, in the - * format 'ymd', followed by a number between 1 and 997, odd for - * males, even for females. The last part is used to check if it's - * a valid number. + * Belgian Rijksregister numbers are used to identify each citizen, + * it consists of three parts, the person's day of birth, in the + * format 'ymd', followed by a number between 1 and 997, odd for + * males, even for females. The last part is used to check if it's + * a valid number. * * @see https://nl.wikipedia.org/wiki/Rijksregisternummer * - * @param string|null $gender 'male', 'female' or null for any + * @param string|null $gender 'male', 'female' or null for any * - * @return string + * @return string */ public static function rrn($gender = null) { diff --git a/src/Faker/Provider/pl_PL/Address.php b/src/Faker/Provider/pl_PL/Address.php index ca42cb8c31..a7b01bbb1b 100644 --- a/src/Faker/Provider/pl_PL/Address.php +++ b/src/Faker/Provider/pl_PL/Address.php @@ -99,101 +99,97 @@ class Address extends \Faker\Provider\Address * @see http://www.poczta-polska.pl/ */ protected static $street = [ - '1 Maja', '3 Maja', '11 Listopada', 'Agrestowa', 'Akacjowa', 'Andersa Władysława', 'Armii Krajowej', - 'Asnyka Adama', 'Astrów', 'Azaliowa', 'Baczyńskiego Krzysztofa Kamila', 'Bałtycka', - 'Barlickiego Norberta', 'Batalionów Chłopskich', 'Batorego Stefana', 'Bema Józefa', - 'Bema Józefa', 'Beskidzka', 'Białostocka', 'Bielska', 'Bieszczadzka', 'Błękitna', - 'Boczna', 'Bogusławskiego Wojciecha', 'Bohaterów Westerplatte', 'Bolesława Chrobrego', - 'Bolesława Krzywoustego', 'Borowa', 'Botaniczna', 'Bracka', 'Bratków', 'Broniewskiego Władysława', - 'Brzechwy Jana', 'Brzoskwiniowa', 'Brzozowa', 'Budowlanych', 'Bukowa', 'Bursztynowa', - 'Bydgoska', 'Bytomska', 'Cedrowa', 'Cegielniana', 'Ceglana', 'Chabrowa', 'Chełmońskiego Józefa', - 'Chłodna', 'Chłopska', 'Chmielna', 'Chopina Fryderyka', 'Chorzowska', 'Chrobrego Bolesława', - 'Ciasna', 'Cicha', 'Cieszyńska', 'Cisowa', 'Cmentarna', 'Curie-Skłodowskiej Marii', - 'Czarnieckiego Stefana', 'Czereśniowa', 'Częstochowska', 'Czwartaków', 'Daleka', 'Daszyńskiego Ignacego', - 'Dąbrowskiego Jana Henryka', 'Dąbrowskiego Jarosława', 'Dąbrowskiego Jarosława', - 'Dąbrowskiej Marii', 'Dąbrowszczaków', 'Dąbrówki', 'Dębowa', 'Diamentowa', 'Długa', - 'Długosza Jana', 'Dmowskiego Romana', 'Dobra', 'Dolna', 'Dożynkowa', 'Drzymały Michała', - 'Dubois Stanisława', 'Dworcowa', 'Dworska', 'Działkowa', 'Energetyków', 'Fabryczna', - 'Fałata Juliana', 'Fiołkowa', 'Folwarczna', 'Franciszkańska', 'Francuska', 'Fredry Aleksandra', - 'Gagarina Jurija', 'Gajowa', 'Gałczyńskiego Konstantego Ildefonsa', 'Gdańska', 'Gdyńska', - 'Gliwicka', 'Głogowa', 'Głogowska', 'Głowackiego Bartosza', 'Główna', 'Gminna', 'Gnieźnieńska', - 'Gojawiczyńskiej Poli', 'Gołębia', 'Gościnna', 'Górna', 'Górnicza', 'Górnośląska', - 'Grabowa', 'Graniczna', 'Granitowa', 'Grochowska', 'Grodzka', 'Grota-Roweckiego Stefana', - 'Grottgera Artura', 'Grójecka', 'Grunwaldzka', 'Grzybowa', 'Hallera Józefa', 'Handlowa', - 'Harcerska', 'Hetmańska', 'Hoża', 'Husarska', 'Hutnicza', 'Inżynierska', 'Iwaszkiewicza Jarosława', - 'Jagiellońska', 'Jagiellońskie Os.', 'Jagiełły Władysława', 'Jagodowa', 'Jałowcowa', - 'Jana Pawła II', 'Jana Pawła II Al.', 'Jaracza Stefana', 'Jarzębinowa', 'Jaskółcza', - 'Jasna', 'Jastrzębia', 'Jaśminowa', 'Jaworowa', 'Jerozolimskie Al.', 'Jesienna', 'Jesionowa', - 'Jeżynowa', 'Jodłowa', 'Kalinowa', 'Kaliska', 'Kamienna', 'Karłowicza Mieczysława', - 'Karpacka', 'Kartuska', 'Kasprowicza Jana', 'Kasprzaka Marcina', 'Kasztanowa', 'Kaszubska', - 'Katowicka', 'Kazimierza Wielkiego', 'Kielecka', 'Kilińskiego Jana', 'Kleeberga Franciszka', - 'Klonowa', 'Kłosowa', 'Kochanowskiego Jana', 'Kolberga Oskara', 'Kolejowa', 'Kolorowa', - 'Kołłątaja Hugo', 'Kołłątaja Hugona', 'Kołobrzeska', 'Konarskiego Stanisława', - 'Konopnickiej Marii', 'Konstytucji 3 Maja', 'Konwaliowa', 'Kopalniana', 'Kopernika Mikołaja', - 'Koralowa', 'Korczaka Janusza', 'Korfantego Wojciecha', 'Kosmonautów', 'Kossaka Juliusza', - 'Kosynierów', 'Koszalińska', 'Koszykowa', 'Kościelna', 'Kościuszki Tadeusza', 'Kościuszki Tadeusza Pl.', - 'Kowalska', 'Krakowska', 'Krańcowa', 'Krasickiego Ignacego', 'Krasińskiego Zygmunta', - 'Kraszewskiego Józefa Ignacego', 'Kresowa', 'Kręta', 'Królewska', 'Królowej Jadwigi', - 'Krótka', 'Krucza', 'Kruczkowskiego Leona', 'Krzywa', 'Księżycowa', 'Kujawska', 'Kusocińskiego Janusza', - 'Kwiatkowskiego Eugeniusza', 'Kwiatowa', 'Lawendowa', 'Lazurowa', 'Lechicka', 'Legionów', - 'Legnicka', 'Lelewela Joachima', 'Leszczynowa', 'Leśmiana Bolesława', 'Leśna', 'Letnia', - 'Ligonia Juliusza', 'Liliowa', 'Limanowskiego Bolesława', 'Lipowa', 'Lisia', 'Litewska', - 'Lompy Józefa', 'Lotnicza', 'Lotników', 'Lubelska', 'Ludowa', 'Lwowska', 'Łabędzia', - 'Łagiewnicka', 'Łanowa', 'Łączna', 'Łąkowa', 'Łokietka Władysława', 'Łomżyńska', - 'Łowicka', 'Łódzka', 'Łukasiewicza Ignacego', 'Łużycka', 'Maczka Stanisława', - 'Magazynowa', 'Majowa', 'Makowa', 'Makuszyńskiego Kornela', 'Malczewskiego Jacka', 'Malinowa', - 'Mała', 'Małachowskiego Stanisława', 'Małopolska', 'Marszałkowska', 'Matejki Jana', - 'Mazowiecka', 'Mazurska', 'Miarki Karola', 'Mickiewicza Adama', 'Miedziana', 'Mieszka I', - 'Miła', 'Miodowa', 'Młynarska', 'Młyńska', 'Modlińska', 'Modra', 'Modrzejewskiej Heleny', - 'Modrzewiowa', 'Mokra', 'Moniuszki Stanisława', 'Morcinka Gustawa', 'Morelowa', 'Morska', - 'Mostowa', 'Myśliwska', 'Nadbrzeżna', 'Nadrzeczna', 'Nałkowskiej Zofii', 'Narutowicza Gabriela', - 'Niecała', 'Niedziałkowskiego Mieczysława', 'Niemcewicza Juliana Ursyna', 'Niepodległości', - 'Niepodległości Al.', 'Niska', 'Norwida Cypriana Kamila', 'Nowa', 'Nowowiejska', 'Nowowiejskiego Feliksa', + '1 Maja', '3 Maja', '11 Listopada', 'Agrestowa', 'Akacjowa', 'Andersa', 'Armii Krajowej', + 'Asnyka', 'Astrów', 'Azaliowa', 'Baczyńskiego', 'Bałtycka', 'Barlickiego', 'Batalionów Chłopskich', + 'Batorego', 'Bema', 'Beskidzka', 'Białostocka', 'Bielska', 'Bieszczadzka', 'Błękitna', + 'Boczna', 'Bogusławskiego', 'Bohaterów Westerplatte', 'Bolesława Chrobrego', + 'Bolesława Krzywoustego', 'Borowa', 'Botaniczna', 'Bracka', 'Bratków', 'Broniewskiego', + 'Brzechwy', 'Brzoskwiniowa', 'Brzozowa', 'Budowlanych', 'Bukowa', 'Bursztynowa', + 'Bydgoska', 'Bytomska', 'Cedrowa', 'Cegielniana', 'Ceglana', 'Chabrowa', 'Chełmońskiego', + 'Chłodna', 'Chłopska', 'Chmielna', 'Chopina Fryderyka', 'Chorzowska', + 'Ciasna', 'Cicha', 'Cieszyńska', 'Cisowa', 'Cmentarna', 'Curie-Skłodowskiej', + 'Czarnieckiego', 'Czereśniowa', 'Częstochowska', 'Czwartaków', 'Daleka', 'Daszyńskiego', + 'Dąbrowskiego', 'Dąbrowskiej', 'Dąbrowszczaków', 'Dąbrówki', 'Dębowa', 'Diamentowa', 'Długa', + 'Długosza', 'Dmowskiego', 'Dobra', 'Dolna', 'Dożynkowa', 'Drzymały', + 'Dworcowa', 'Dworska', 'Działkowa', 'Energetyków', 'Fabryczna', + 'Fałata', 'Fiołkowa', 'Folwarczna', 'Franciszkańska', 'Francuska', 'Fredry', + 'Gagarina', 'Gajowa', 'Gałczyńskiego', 'Gdańska', 'Gdyńska', + 'Gliwicka', 'Głogowa', 'Głogowska', 'Głowackiego', 'Główna', 'Gminna', 'Gnieźnieńska', + 'Gojawiczyńskiej', 'Gołębia', 'Gościnna', 'Górna', 'Górnicza', 'Górnośląska', + 'Grabowa', 'Graniczna', 'Granitowa', 'Grochowska', 'Grodzka', 'Grota-Roweckiego', + 'Grottgera', 'Grójecka', 'Grunwaldzka', 'Grzybowa', 'Hallera', 'Handlowa', + 'Harcerska', 'Hetmańska', 'Hoża', 'Husarska', 'Hutnicza', 'Inżynierska', 'Iwaszkiewicza', + 'Jagiellońska', 'Os. Jagiellońskie', 'Jagiełły', 'Jagodowa', 'Jałowcowa', + 'Jana Pawła II', 'Al. Jana Pawła II', 'Jaracza', 'Jarzębinowa', 'Jaskółcza', + 'Jasna', 'Jastrzębia', 'Jaśminowa', 'Jaworowa', 'Al. Jerozolimskie', 'Jesienna', 'Jesionowa', + 'Jeżynowa', 'Jodłowa', 'Kalinowa', 'Kaliska', 'Kamienna', 'Karłowicza', + 'Karpacka', 'Kartuska', 'Kasprowicza', 'Kasprzaka Marcina', 'Kasztanowa', 'Kaszubska', + 'Katowicka', 'Kazimierza Wielkiego', 'Kielecka', 'Kilińskiego', 'Kleeberga', + 'Klonowa', 'Kłosowa', 'Kochanowskiego', 'Kolberga', 'Kolejowa', 'Kolorowa', + 'Kołłątaja', 'Kołobrzeska', 'Konarskiego', + 'Konopnickiej', 'Konstytucji 3 Maja', 'Konwaliowa', 'Kopalniana', 'Kopernika', + 'Koralowa', 'Korczaka', 'Korfantego', 'Kosmonautów', 'Kossaka', + 'Kosynierów', 'Koszalińska', 'Koszykowa', 'Kościelna', 'Kościuszki', 'Pl. Kościuszki', + 'Kowalska', 'Krakowska', 'Krańcowa', 'Krasickiego', 'Krasińskiego', + 'Kraszewskiego', 'Kresowa', 'Kręta', 'Królewska', 'Królowej Jadwigi', + 'Krótka', 'Krucza', 'Kruczkowskiego', 'Krzywa', 'Księżycowa', 'Kujawska', 'Kusocińskiego', + 'Kwiatkowskiego', 'Kwiatowa', 'Lawendowa', 'Lazurowa', 'Lechicka', 'Legionów', + 'Legnicka', 'Lelewela', 'Leszczynowa', 'Leśmiana', 'Leśna', 'Letnia', + 'Ligonia', 'Liliowa', 'Limanowskiego', 'Lipowa', 'Lisia', 'Litewska', + 'Lompy', 'Lotnicza', 'Lotników', 'Lubelska', 'Ludowa', 'Lwowska', 'Łabędzia', + 'Łagiewnicka', 'Łanowa', 'Łączna', 'Łąkowa', 'Łokietka', 'Łomżyńska', + 'Łowicka', 'Łódzka', 'Łukasiewicza', 'Łużycka', 'Maczka', + 'Magazynowa', 'Majowa', 'Makowa', 'Makuszyńskiego', 'Malczewskiego', 'Malinowa', + 'Mała', 'Małachowskiego', 'Małopolska', 'Marszałkowska', 'Matejki', + 'Mazowiecka', 'Mazurska', 'Miarki', 'Mickiewicza', 'Miedziana', 'Mieszka I', + 'Miła', 'Miodowa', 'Młynarska', 'Młyńska', 'Modlińska', 'Modra', 'Modrzejewskiej', + 'Modrzewiowa', 'Mokra', 'Moniuszki', 'Morcinka', 'Morelowa', 'Morska', + 'Mostowa', 'Myśliwska', 'Nadbrzeżna', 'Nadrzeczna', 'Nałkowskiej', 'Narutowicza', + 'Niecała', 'Niedziałkowskiego', 'Niemcewicza', 'Niepodległości', + 'Al. Niepodległości', 'Niska', 'Norwida', 'Nowa', 'Nowowiejska', 'Nowowiejskiego', 'Nowy Świat', 'Obrońców Westerplatte', 'Odrodzenia', 'Odrzańska', 'Ogrodowa', 'Okopowa', - 'Okólna', 'Okrężna', 'Okrzei Stefana', 'Okulickiego Leopolda', 'Olchowa', 'Olimpijska', - 'Olsztyńska', 'Opolska', 'Orkana Władysława', 'Orla', 'Orzechowa', 'Orzeszkowej Elizy', - 'Osiedlowa', 'Oświęcimska', 'Owocowa', 'Paderewskiego Ignacego', 'Parkowa', 'Partyzantów', - 'Patriotów', 'Pawia', 'Perłowa', 'Piaskowa', 'Piastowska', 'Piastowskie Os.', 'Piekarska', - 'Piękna', 'Piłsudskiego Józefa', 'Piłsudskiego Józefa', 'Piłsudskiego Józefa Al.', - 'Piotrkowska', 'Piwna', 'Plater Emilii', 'Plebiscytowa', 'Płocka', 'Pocztowa', 'Podchorążych', + 'Okólna', 'Okrężna', 'Okrzei', 'Okulickiego', 'Olchowa', 'Olimpijska', + 'Olsztyńska', 'Opolska', 'Orkana', 'Orla', 'Orzechowa', 'Orzeszkowej', + 'Osiedlowa', 'Oświęcimska', 'Owocowa', 'Paderewskiego', 'Parkowa', 'Partyzantów', + 'Patriotów', 'Pawia', 'Perłowa', 'Piaskowa', 'Piastowska', 'Os. Piastowskie', 'Piekarska', + 'Piękna', 'Piłsudskiego', 'Al. Piłsudskiego', + 'Piotrkowska', 'Piwna', 'Emilii Plater', 'Plebiscytowa', 'Płocka', 'Pocztowa', 'Podchorążych', 'Podgórna', 'Podhalańska', 'Podleśna', 'Podmiejska', 'Podwale', 'Pogodna', 'Pokoju', - 'Pola Wincentego', 'Polna', 'Południowa', 'Pomorska', 'Poniatowskiego Józefa', 'Poniatowskiego Józefa', - 'Popiełuszki Jerzego', 'Poprzeczna', 'Portowa', 'Porzeczkowa', 'Powstańców', 'Powstańców Śląskich', + 'Wincentego Pola', 'Polna', 'Południowa', 'Pomorska', 'Poniatowskiego', + 'Popiełuszki', 'Poprzeczna', 'Portowa', 'Porzeczkowa', 'Powstańców', 'Powstańców Śląskich', 'Powstańców Wielkopolskich', 'Poziomkowa', 'Poznańska', 'Północna', 'Promienna', - 'Prosta', 'Prusa Bolesława', 'Przechodnia', 'Przemysłowa', 'Przybyszewskiego Stanisława', - 'Przyjaźni', 'Pszenna', 'Ptasia', 'Pułaskiego Kazimierza', 'Pułaskiego Kazimierza', - 'Puławska', 'Puszkina Aleksandra', 'Racławicka', 'Radomska', 'Radosna', 'Rataja Macieja', - 'Reja Mikołaja', 'Rejtana Tadeusza', 'Reymonta Władysława', 'Reymonta Władysława Stanisława', + 'Prosta', 'Bolesława Prusa', 'Przechodnia', 'Przemysłowa', 'Przybyszewskiego', + 'Przyjaźni', 'Pszenna', 'Ptasia', 'Pułaskiego', 'Puławska', 'Puszkina', 'Racławicka', + 'Radomska', 'Radosna', 'Rataja', 'Reja', 'Rejtana', 'Reymonta', 'Robotnicza', 'Rodzinna', 'Rolna', 'Rolnicza', 'Równa', 'Różana', 'Rubinowa', 'Rumiankowa', - 'Rybacka', 'Rybna', 'Rybnicka', 'Rycerska', 'Rynek', 'Rynek Rynek', 'Rzeczna', 'Rzemieślnicza', - 'Sadowa', 'Sandomierska', 'Saperów', 'Sawickiej Hanki', 'Sądowa', 'Sąsiedzka', 'Senatorska', - 'Siemiradzkiego Henryka', 'Sienkiewicza Henryka', 'Sienna', 'Siewna', 'Sikorskiego Władysława', - 'Sikorskiego Władysława', 'Skargi Piotra', 'Skargi Piotra', 'Składowa', 'Skłodowskiej-Curie Marii', - 'Skośna', 'Skrajna', 'Słoneczna', 'Słonecznikowa', 'Słowackiego Juliusza', 'Słowiańska', - 'Słowicza', 'Sobieskiego Jana', 'Sobieskiego Jana III', 'Sokola', 'Solidarności Al.', - 'Solna', 'Solskiego Ludwika', 'Sosnowa', 'Sowia', 'Sowińskiego Józefa', 'Spacerowa', - 'Spokojna', 'Sportowa', 'Spółdzielcza', 'Srebrna', 'Staffa Leopolda', 'Stalowa', 'Staromiejska', - 'Starowiejska', 'Staszica Stanisława', 'Stawowa', 'Stolarska', 'Strażacka', 'Stroma', - 'Struga Andrzeja', 'Strumykowa', 'Strzelecka', 'Studzienna', 'Stwosza Wita', 'Sucha', - 'Sucharskiego Henryka', 'Szafirowa', 'Szarych Szeregów', 'Szczecińska', 'Szczęśliwa', - 'Szeroka', 'Szewska', 'Szkolna', 'Szmaragdowa', 'Szpitalna', 'Szymanowskiego Karola', - 'Ściegiennego Piotra', 'Śląska', 'Średnia', 'Środkowa', 'Świdnicka', 'Świerkowa', + 'Rybacka', 'Rybna', 'Rybnicka', 'Rycerska', 'Rynek', 'Rzeczna', 'Rzemieślnicza', + 'Sadowa', 'Sandomierska', 'Saperów', 'Sawickiej', 'Sądowa', 'Sąsiedzka', 'Senatorska', + 'Siemiradzkiego', 'Sienkiewicza', 'Sienna', 'Siewna', + 'Sikorskiego', 'Piotra Skargi', 'Składowa', 'Skłodowskiej-Curie', + 'Skośna', 'Skrajna', 'Słoneczna', 'Słonecznikowa', 'Słowackiego', 'Słowiańska', + 'Słowicza', 'Sobieskiego', 'Jana III Sobieskiego', 'Sokola', 'Al. Solidarności', + 'Solna', 'Solskiego', 'Sosnowa', 'Sowia', 'Sowińskiego', 'Spacerowa', + 'Spokojna', 'Sportowa', 'Spółdzielcza', 'Srebrna', 'Staffa ', 'Stalowa', 'Staromiejska', + 'Starowiejska', 'Staszica', 'Stawowa', 'Stolarska', 'Strażacka', 'Stroma', + 'Struga', 'Strumykowa', 'Strzelecka', 'Studzienna', 'Wita Stwosza', 'Sucha', + 'Sucharskiego', 'Szafirowa', 'Szarych Szeregów', 'Szczecińska', 'Szczęśliwa', + 'Szeroka', 'Szewska', 'Szkolna', 'Szmaragdowa', 'Szpitalna', 'Szymanowskiego', + 'Ściegiennego', 'Śląska', 'Średnia', 'Środkowa', 'Świdnicka', 'Świerkowa', 'Świętojańska', 'Świętokrzyska', 'Targowa', 'Tatrzańska', 'Tęczowa', 'Topolowa', - 'Torowa', 'Toruńska', 'Towarowa', 'Traugutta Romualda', 'Truskawkowa', 'Tulipanowa', - 'Tulipanów', 'Turkusowa', 'Turystyczna', 'Tuwima Juliana', 'Tylna', 'Tysiąclecia', 'Ułańska', - 'Urocza', 'Wałowa', 'Wandy', 'Wańkowicza Melchiora', 'Wapienna', 'Warmińska', 'Warszawska', - 'Waryńskiego Ludwika', 'Wąska', 'Wczasowa', 'Wesoła', 'Węglowa', 'Widok', 'Wiejska', - 'Wielkopolska', 'Wieniawskiego Henryka', 'Wierzbowa', 'Wilcza', 'Wileńska', 'Willowa', - 'Wiosenna', 'Wiśniowa', 'Witosa Wincentego', 'Władysława IV', 'Wodna', 'Wojska Polskiego', - 'Wojska Polskiego Al.', 'Wolności', 'Wolności Pl.', 'Wolska', 'Wołodyjowskiego Michała', - 'Wrocławska', 'Wronia', 'Wróblewskiego Walerego', 'Wrzosowa', 'Wschodnia', 'Wspólna', - 'Wybickiego Józefa', 'Wysoka', 'Wyspiańskiego Stanisława', 'Wyszyńskiego Stefana', - 'Wyzwolenia', 'Wyzwolenia Al.', 'Zachodnia', 'Zacisze', 'Zajęcza', 'Zakątek', 'Zakopiańska', - 'Zamenhofa Ludwika', 'Zamkowa', 'Zapolskiej Gabrieli', 'Zbożowa', 'Zdrojowa', 'Zgierska', + 'Torowa', 'Toruńska', 'Towarowa', 'Traugutta', 'Truskawkowa', 'Tulipanowa', + 'Tulipanów', 'Turkusowa', 'Turystyczna', 'Tuwima', 'Tylna', 'Tysiąclecia', 'Ułańska', + 'Urocza', 'Wałowa', 'Wandy', 'Wańkowicza', 'Wapienna', 'Warmińska', 'Warszawska', + 'Waryńskiego', 'Wąska', 'Wczasowa', 'Wesoła', 'Węglowa', 'Widok', 'Wiejska', + 'Wielkopolska', 'Wieniawskiego', 'Wierzbowa', 'Wilcza', 'Wileńska', 'Willowa', + 'Wiosenna', 'Wiśniowa', 'Witosa', 'Władysława IV', 'Wodna', 'Wojska Polskiego', + 'Al. Wojska Polskiego', 'Wolności', 'Pl. Wolności', 'Wolska', 'Wołodyjowskiego', + 'Wrocławska', 'Wronia', 'Wróblewskiego', 'Wrzosowa', 'Wschodnia', 'Wspólna', + 'Wybickiego', 'Wysoka', 'Wyspiańskiego', 'Wyszyńskiego', + 'Wyzwolenia', 'Al. Wyzwolenia', 'Zachodnia', 'Zacisze', 'Zajęcza', 'Zakątek', 'Zakopiańska', + 'Zamenhofa', 'Zamkowa', 'Zapolskiej', 'Zbożowa', 'Zdrojowa', 'Zgierska', 'Zielna', 'Zielona', 'Złota', 'Zwierzyniecka', 'Zwycięstwa', 'Źródlana', 'Żabia', - 'Żeglarska', 'Żelazna', 'Żeromskiego Stefana', 'Żniwna', 'Żołnierska', 'Żółkiewskiego Stanisława', - 'Żurawia', 'Żwirki Franciszka i Wigury Stanisława', 'Żwirki i Wigury', 'Żwirowa', - 'Żytnia', + 'Żeglarska', 'Żelazna', 'Żeromskiego', 'Żniwna', 'Żołnierska', 'Żółkiewskiego', + 'Żurawia', 'Żwirki i Wigury', 'Żwirowa', 'Żytnia', ]; public function city() diff --git a/src/Faker/Provider/pl_PL/Internet.php b/src/Faker/Provider/pl_PL/Internet.php index 661e4b0bc2..f6ed7f6b5b 100644 --- a/src/Faker/Provider/pl_PL/Internet.php +++ b/src/Faker/Provider/pl_PL/Internet.php @@ -5,5 +5,5 @@ class Internet extends \Faker\Provider\Internet { protected static $freeEmailDomain = ['gmail.com', 'yahoo.com', 'wp.pl', 'onet.pl', 'interia.pl', 'gazeta.pl']; - protected static $tld = ['pl', 'pl', 'pl', 'pl', 'pl', 'pl', 'com', 'info', 'net', 'org', 'com.pl', 'com.pl']; + protected static $tld = ['pl', 'pl', 'pl', 'pl', 'pl', 'pl', 'com', 'info', 'net', 'org', 'com.pl', 'com.pl', 'co.pl', 'net.pl', 'org.pl']; } diff --git a/src/Faker/Provider/pl_PL/LicensePlate.php b/src/Faker/Provider/pl_PL/LicensePlate.php index d59c93dec4..59e100eb4c 100644 --- a/src/Faker/Provider/pl_PL/LicensePlate.php +++ b/src/Faker/Provider/pl_PL/LicensePlate.php @@ -6,7 +6,7 @@ /** * Generator of Polish vehicle registration numbers. - * {@link} http://prawo.sejm.gov.pl/isap.nsf/DocDetails.xsp?id=WDU20170002355 + * {@link} https://isap.sejm.gov.pl/isap.nsf/DocDetails.xsp?id=WDU20220001847 * {@link} https://pl.wikipedia.org/wiki/Tablice_rejestracyjne_w_Polsce#Tablice_standardowe */ class LicensePlate extends Base @@ -15,37 +15,37 @@ class LicensePlate extends Base * @var array list of Polish voivodeships and respective vehicle registration number prefixes. */ protected static $voivodeships = [ - 'dolnośląskie' => 'D', - 'kujawsko-pomorskie' => 'C', - 'lubelskie' => 'L', - 'lubuskie' => 'F', - 'łódzkie' => 'E', - 'małopolskie' => 'K', - 'mazowieckie' => 'W', - 'opolskie' => 'O', - 'podkarpackie' => 'R', - 'podlaskie' => 'B', - 'pomorskie' => 'G', - 'śląskie' => 'S', - 'świętokrzyskie' => 'T', - 'warmińsko-mazurskie' => 'N', - 'wielkopolskie' => 'P', - 'zachodniopomorskie' => 'Z', + 'dolnośląskie' => ['D', 'V'], + 'kujawsko-pomorskie' => ['C'], + 'lubelskie' => ['L'], + 'lubuskie' => ['F'], + 'łódzkie' => ['E'], + 'małopolskie' => ['K', 'J'], + 'mazowieckie' => ['W', 'A'], + 'opolskie' => ['O'], + 'podkarpackie' => ['R', 'Y'], + 'podlaskie' => ['B'], + 'pomorskie' => ['G', 'X'], + 'śląskie' => ['S', 'I'], + 'świętokrzyskie' => ['T'], + 'warmińsko-mazurskie' => ['N'], + 'wielkopolskie' => ['P', 'M'], + 'zachodniopomorskie' => ['Z'], ]; /** * @var array list of special vehicle registration number prefixes. */ protected static $specials = [ - 'army' => 'U', - 'services' => 'H', + 'army' => ['U'], + 'services' => ['H'], ]; /** * @var array list of Polish counties and respective vehicle registration number prefixes. */ protected static $counties = [ - 'D' => [ + 'dolnośląskie' => [ 'Jelenia Góra' => ['J'], 'Legnica' => ['L'], 'Wałbrzych' => ['B'], @@ -77,7 +77,7 @@ class LicensePlate extends Base 'zgorzelecki' => ['ZG'], 'złotoryjski' => ['ZL'], ], - 'C' => [ + 'kujawsko-pomorskie' => [ 'Bydgoszcz' => ['B'], 'Grudziądz' => ['G'], 'Toruń' => ['T'], @@ -102,7 +102,7 @@ class LicensePlate extends Base 'włocławski' => ['WL'], 'żniński' => ['ZN'], ], - 'L' => [ + 'lubelskie' => [ 'Biała Podlaska' => ['B'], 'Chełm' => ['C'], 'Lublin' => ['U'], @@ -128,7 +128,7 @@ class LicensePlate extends Base 'włodawski' => ['WL'], 'zamojski' => ['ZA'], ], - 'F' => [ + 'lubuskie' => [ 'Gorzów Wielkopolski' => ['G'], 'Zielona Góra' => ['Z'], 'gorzowski' => ['GW'], @@ -144,8 +144,8 @@ class LicensePlate extends Base 'żagański' => ['ZG'], 'żarski' => ['ZA'], ], - 'E' => [ - 'Łódź' => ['L'], + 'łódzkie' => [ + 'Łódź' => ['L', 'D'], 'Piotrków Trybunalski' => ['P'], 'Skierniewice' => ['S'], 'brzeziński' => ['BR'], @@ -170,8 +170,8 @@ class LicensePlate extends Base 'zduńskowolski' => ['ZD'], 'zgierski' => ['ZG'], ], - 'K' => [ - 'Kraków' => ['R'], + 'małopolskie' => [ + 'Kraków' => ['R', 'K'], 'Nowy Sącz' => ['N'], 'Tarnów' => ['T'], 'bocheński' => ['BA', 'BC'], @@ -179,7 +179,7 @@ class LicensePlate extends Base 'chrzanowski' => ['CH'], 'dąbrowski' => ['DA'], 'gorlicki' => ['GR'], - 'krakowski' => ['RA'], + 'krakowski' => ['RA', 'RK'], 'limanowski' => ['LI'], 'miechowski' => ['MI'], 'myślenicki' => ['MY'], @@ -194,7 +194,7 @@ class LicensePlate extends Base 'wadowicki' => ['WA'], 'wielicki' => ['WI'], ], - 'W' => [ + 'mazowieckie' => [ 'Ostrołęka' => ['O'], 'Płock' => ['P'], 'Radom' => ['R'], @@ -216,7 +216,7 @@ class LicensePlate extends Base 'ostrołęcki' => ['OS'], 'ostrowski' => ['OR'], 'otwocki' => ['OT'], - 'piaseczyński' => ['PA', 'PI'], + 'piaseczyński' => ['PA', 'PI', 'PW', 'PX'], 'płocki' => ['PL'], 'płoński' => ['PN'], 'pruszkowski' => ['PP', 'PR', 'PS'], @@ -238,7 +238,7 @@ class LicensePlate extends Base 'żuromiński' => ['ZU'], 'żyrardowski' => ['ZY'], ], - 'O' => [ + 'opolskie' => [ 'Opole' => ['P'], 'brzeski' => ['B'], 'głubczycki' => ['GL'], @@ -252,7 +252,7 @@ class LicensePlate extends Base 'prudnicki' => ['PR'], 'strzelecki' => ['ST'], ], - 'R' => [ + 'podkarpackie' => [ 'Krosno' => ['K'], 'Przemyśl' => ['P'], 'Rzeszów' => ['Z'], @@ -273,18 +273,18 @@ class LicensePlate extends Base 'przemyski' => ['PR'], 'przeworski' => ['PZ'], 'ropczycko-sędziszowski' => ['RS'], - 'rzeszowski' => ['ZE'], + 'rzeszowski' => ['ZE', 'ZR', 'ZZ'], 'sanocki' => ['SA'], 'stalowowolski' => ['ST'], 'strzyżowski' => ['SR'], 'tarnobrzeski' => ['TA'], ], - 'B' => [ + 'podlaskie' => [ 'Białystok' => ['I'], 'Łomża' => ['L'], 'Suwałki' => ['S'], 'augustowski' => ['AU'], - 'białostocki' => ['IA'], + 'białostocki' => ['IA', 'IB'], 'bielski' => ['BI'], 'grajewski' => ['GR'], 'hajnowski' => ['HA'], @@ -298,7 +298,7 @@ class LicensePlate extends Base 'wysokomazowiecki' => ['WM'], 'zambrowski' => ['ZA'], ], - 'G' => [ + 'pomorskie' => [ 'Gdańsk' => ['D'], 'Gdynia' => ['A'], 'Słupsk' => ['S'], @@ -307,7 +307,7 @@ class LicensePlate extends Base 'chojnicki' => ['CH'], 'człuchowski' => ['CZ'], 'gdański' => ['DA'], - 'kartuski' => ['KY', 'KA'], + 'kartuski' => ['KA', 'KY', 'KZ'], 'kościerski' => ['KS'], 'kwidzyński' => ['KW'], 'lęborski' => ['LE'], @@ -320,7 +320,7 @@ class LicensePlate extends Base 'tczewski' => ['TC'], 'wejherowski' => ['WE', 'WO'], ], - 'S' => [ + 'śląskie' => [ 'Bielsko-Biała' => ['B'], 'Bytom' => ['Y'], 'Chorzów' => ['H'], @@ -340,9 +340,9 @@ class LicensePlate extends Base 'Tychy' => ['T'], 'Zabrze' => ['Z'], 'Żory' => ['ZO'], - 'będziński' => ['BE'], + 'będziński' => ['BE', 'BN', 'E'], 'bielski' => ['BI'], - 'cieszyński' => ['CN', 'CI'], + 'cieszyński' => ['CI', 'CN'], 'częstochowski' => ['CZ'], 'gliwicki' => ['GL'], 'kłobucki' => ['KL'], @@ -358,7 +358,7 @@ class LicensePlate extends Base 'zawierciański' => ['ZA'], 'żywiecki' => ['ZY'], ], - 'T' => [ + 'świętokrzyskie' => [ 'Kielce' => ['K'], 'buski' => ['BU'], 'jędrzejowski' => ['JE'], @@ -374,7 +374,7 @@ class LicensePlate extends Base 'staszowski' => ['SZ'], 'włoszczowski' => ['LW'], ], - 'N' => [ + 'warmińsko-mazurskie' => [ 'Elbląg' => ['E'], 'Olsztyn' => ['O'], 'bartoszycki' => ['BA'], @@ -397,7 +397,7 @@ class LicensePlate extends Base 'szczycieński' => ['SZ'], 'węgorzewski' => ['WE'], ], - 'P' => [ + 'wielkopolskie' => [ 'Kalisz' => ['A', 'K'], 'Konin' => ['KO', 'N'], 'Leszno' => ['L'], @@ -434,7 +434,7 @@ class LicensePlate extends Base 'wrzesiński' => ['WR'], 'złotowski' => ['ZL'], ], - 'Z' => [ + 'zachodniopomorskie' => [ 'Koszalin' => ['K'], 'Szczecin' => ['S', 'Z'], 'Świnoujście' => ['SW'], @@ -457,10 +457,10 @@ class LicensePlate extends Base 'świdwiński' => ['SD'], 'wałecki' => ['WA'], ], - 'U' => [ + 'army' => [ 'Siły Zbrojne Rzeczypospolitej Polskiej' => ['A', 'B', 'C', 'D', 'E', 'G', 'I', 'J', 'K', 'L'], ], - 'H' => [ + 'services' => [ 'Centralne Biuro Antykorupcyjne' => ['A'], 'Służba Ochrony Państwa' => ['BA', 'BB', 'BE', 'BF', 'BG'], 'Służba Celno-Skarbowa' => ['CA', 'CB', 'CC', 'CD', 'CE', 'CF', 'CG', 'CH', 'CJ', 'CK', 'CL', 'CM', 'CN', 'CO', 'CP', 'CR'], @@ -514,12 +514,13 @@ public static function licensePlate( ?array $counties = null ): string { $voivodeshipsAvailable = static::$voivodeships + ($special ? static::$specials : []); - $voivodeshipCode = static::selectRandomArea($voivodeshipsAvailable, $voivodeships); + $voivodeshipSelected = static::selectRandomArea($voivodeshipsAvailable, $voivodeships); + $voivodeshipCode = static::randomElement($voivodeshipsAvailable[$voivodeshipSelected]); - $countiesAvailable = static::$counties[$voivodeshipCode]; + $countiesAvailable = static::$counties[$voivodeshipSelected]; $countySelected = self::selectRandomArea($countiesAvailable, $counties); - $countyCode = static::randomElement($countySelected); + $countyCode = static::randomElement(static::$counties[$voivodeshipSelected][$countySelected]); $suffix = static::regexify(static::randomElement(strlen($countyCode) === 1 ? static::$plateSuffixesGroup1 : static::$plateSuffixesGroup2)); @@ -528,6 +529,8 @@ public static function licensePlate( /** * Selects random area from the list of available and requested. + * + * @return string */ protected static function selectRandomArea(array $available, ?array $requested) { @@ -537,6 +540,6 @@ protected static function selectRandomArea(array $available, ?array $requested) $requested = array_keys($available); } - return $available[static::randomElement($requested)]; + return static::randomElement($requested); } } diff --git a/src/Faker/Provider/pt_BR/PhoneNumber.php b/src/Faker/Provider/pt_BR/PhoneNumber.php index 6717def5a5..6601658306 100644 --- a/src/Faker/Provider/pt_BR/PhoneNumber.php +++ b/src/Faker/Provider/pt_BR/PhoneNumber.php @@ -83,7 +83,7 @@ public static function phone($formatted = true) ['landline', null], ]); - return call_user_func("static::{$options[0]}", $formatted, $options[1]); + return call_user_func([static::class, $options[0]], $formatted, $options[1]); } /** @@ -135,7 +135,7 @@ public function phoneNumber() { $method = static::randomElement(['cellphoneNumber', 'landlineNumber']); - return call_user_func("static::$method", true); + return call_user_func([static::class, $method], true); } /** @@ -145,6 +145,6 @@ public static function phoneNumberCleared() { $method = static::randomElement(['cellphoneNumber', 'landlineNumber']); - return call_user_func("static::$method", false); + return call_user_func([static::class, $method], false); } } diff --git a/src/Faker/Provider/pt_BR/Text.php b/src/Faker/Provider/pt_BR/Text.php index d177c8725c..ce60728557 100644 --- a/src/Faker/Provider/pt_BR/Text.php +++ b/src/Faker/Provider/pt_BR/Text.php @@ -5,52 +5,52 @@ class Text extends \Faker\Provider\Text { /** - * The Project Gutenberg EBook of Dom Casmurro, by Machado de Assis + * The Project Gutenberg EBook of Dom Casmurro, by Machado de Assis * - * This eBook is for the use of anyone anywhere in the United States and most - * other parts of the world at no cost and with almost no restrictions - * whatsoever. You may copy it, give it away or re-use it under the terms of - * the Project Gutenberg License included with this eBook or online at - * www.gutenberg.org. If you are not located in the United States, you'll have - * to check the laws of the country where you are located before using this ebook. + * This eBook is for the use of anyone anywhere in the United States and most + * other parts of the world at no cost and with almost no restrictions + * whatsoever. You may copy it, give it away or re-use it under the terms of + * the Project Gutenberg License included with this eBook or online at + * www.gutenberg.org. If you are not located in the United States, you'll have + * to check the laws of the country where you are located before using this ebook. * - * Title: Dom Casmurro + * Title: Dom Casmurro * - * Author: Machado de Assis + * Author: Machado de Assis * - * Release Date: October 15, 2017 [EBook #55752] + * Release Date: October 15, 2017 [EBook #55752] * - * Language: Portuguese + * Language: Portuguese * - * *** START OF THIS PROJECT GUTENBERG EBOOK DOM CASMURRO *** + * *** START OF THIS PROJECT GUTENBERG EBOOK DOM CASMURRO *** * - * Produced by Laura Natal Rodriguez & Marc D'Hooghe at Free - * Literature (online soon in an extended version,also linking - * to free sources for education worldwide ... MOOC's, - * educational materials,...) (Images generously made available - * by the Bibliotheca Nacional Digital Brasil.) + * Produced by Laura Natal Rodriguez & Marc D'Hooghe at Free + * Literature (online soon in an extended version,also linking + * to free sources for education worldwide ... MOOC's, + * educational materials,...) (Images generously made available + * by the Bibliotheca Nacional Digital Brasil.) * - * DOM CASMURRO + * DOM CASMURRO * - * POR + * POR * - * MACHADO DE ASSIS + * MACHADO DE ASSIS * - * DA ACADEMIA BRAZILEIRA + * DA ACADEMIA BRAZILEIRA * - * H. GARNIER, LIVREIRO-EDITOR + * H. GARNIER, LIVREIRO-EDITOR * - * RUA MOREIRA CEZAR, 71 + * RUA MOREIRA CEZAR, 71 * - * RIO DE JANEIRO + * RIO DE JANEIRO * - * 6, RUE DES SAINTS-PÈRES, 6 + * 6, RUE DES SAINTS-PÈRES, 6 * - * PARIZ + * PARIZ * - * @see https://www.gutenberg.org/cache/epub/55752/pg55752.txt + * @see https://www.gutenberg.org/cache/epub/55752/pg55752.txt * - * @var string + * @var string */ protected static $baseText = <<<'EOT' I diff --git a/src/Faker/Provider/ro_RO/Person.php b/src/Faker/Provider/ro_RO/Person.php index d8ef51d005..9077004135 100644 --- a/src/Faker/Provider/ro_RO/Person.php +++ b/src/Faker/Provider/ro_RO/Person.php @@ -182,6 +182,7 @@ protected function getDateOfBirth($dateOfBirth) $dateOfBirthFinal = implode('-', $dateOfBirthParts); $date = \DateTime::createFromFormat('Y-m-d', $dateOfBirthFinal); + //a full (invalid) date might have been supplied, check if it converts if ($date->format('Y-m-d') !== $dateOfBirthFinal) { throw new \InvalidArgumentException("Invalid date of birth - '{$date->format('Y-m-d')}' generated based on '{$dateOfBirth}' received"); diff --git a/src/Faker/Provider/ru_RU/Person.php b/src/Faker/Provider/ru_RU/Person.php index 95ec8069a8..b0e17d4e19 100644 --- a/src/Faker/Provider/ru_RU/Person.php +++ b/src/Faker/Provider/ru_RU/Person.php @@ -5,8 +5,8 @@ class Person extends \Faker\Provider\Person { protected static $maleNameFormats = [ - '{{firstNameMale}} {{middleNameMale}} {{lastName}}', - '{{lastName}} {{firstNameMale}} {{middleNameMale}}', + '{{firstNameMale}} {{middleNameMale}} {{lastNameMale}}', + '{{lastNameMale}} {{firstNameMale}} {{middleNameMale}}', ]; /** @@ -14,8 +14,8 @@ class Person extends \Faker\Provider\Person * That list of MALE last names could be safely extended to FEMALE list just by adding 'a' letter at the end */ protected static $femaleNameFormats = [ - '{{firstNameFemale}} {{middleNameFemale}} {{lastName}}а', - '{{lastName}}а {{firstNameFemale}} {{middleNameFemale}}', + '{{firstNameFemale}} {{middleNameFemale}} {{lastNameFemale}}', + '{{lastNameFemale}} {{firstNameFemale}} {{middleNameFemale}}', ]; /** @@ -165,16 +165,24 @@ public function middleName($gender = null) */ public function lastName($gender = null) { - $lastName = static::randomElement(static::$lastName); - if (static::GENDER_FEMALE === $gender) { - return $lastName . 'а'; + return $this->lastNameFemale(); } if (static::GENDER_MALE === $gender) { - return $lastName; + return $this->lastNameMale(); } - return $lastName . static::randomElement(static::$lastNameSuffix); + return static::randomElement(static::$lastName) . static::randomElement(static::$lastNameSuffix); + } + + public function lastNameMale(): string + { + return static::randomElement(static::$lastName); + } + + public function lastNameFemale(): string + { + return static::randomElement(static::$lastName) . 'а'; } } diff --git a/src/Faker/Provider/sv_SE/Person.php b/src/Faker/Provider/sv_SE/Person.php index a98f0871bf..1142a1f63f 100644 --- a/src/Faker/Provider/sv_SE/Person.php +++ b/src/Faker/Provider/sv_SE/Person.php @@ -121,8 +121,7 @@ class Person extends \Faker\Provider\Person * * @see http://en.wikipedia.org/wiki/Personal_identity_number_(Sweden) * - * @param \DateTime $birthdate - * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE + * @param string $gender Person::GENDER_MALE || Person::GENDER_FEMALE * * @return string on format XXXXXX-XXXX */ diff --git a/src/Faker/Provider/zh_CN/Address.php b/src/Faker/Provider/zh_CN/Address.php index d67e14977e..00b9eb771e 100644 --- a/src/Faker/Provider/zh_CN/Address.php +++ b/src/Faker/Provider/zh_CN/Address.php @@ -101,7 +101,7 @@ class Address extends \Faker\Provider\Address '斯威士兰', '瑞典', '瑞士', '叙利亚', '塔吉克斯坦', '坦桑尼亚', '泰国', '阿拉伯联合酋长国', '多哥', '托克劳群岛', '汤加', '特立尼达和多巴哥', '突尼斯', '土耳其', '土库曼斯坦', - '特克斯和凯科斯群岛(', '图瓦卢', '美国', '乌干达', '乌克兰', + '特克斯和凯科斯群岛', '图瓦卢', '美国', '乌干达', '乌克兰', '英国', '乌拉圭', '乌兹别克斯坦', '瓦努阿图', '梵蒂冈', '委内瑞拉', '越南', '维尔京群岛', '维尔京群岛和圣罗克伊', '威克岛', '瓦里斯和富士那群岛', '西撒哈拉', '也门', '南斯拉夫', diff --git a/test/Faker/Core/DateTimeTest.php b/test/Faker/Core/DateTimeTest.php index f51cbc378d..af4902c267 100644 --- a/test/Faker/Core/DateTimeTest.php +++ b/test/Faker/Core/DateTimeTest.php @@ -24,6 +24,9 @@ protected function setUp(): void $this->extension = $this->faker->ext(DateTimeExtension::class); } + /** + * @requires PHP < 8.3 + */ public function testDateTime(): void { $dateTime = $this->extension->dateTime('2005-10-19T14:12:00'); @@ -32,6 +35,9 @@ public function testDateTime(): void self::assertEquals(new \DateTime('1990-09-29T12:12:53'), $dateTime); } + /** + * @requires PHP < 8.3 + */ public function testDateTimeWithTimezone(): void { $dateTime = $this->extension->dateTime('2021-09-05T15:10:00', 'America/Los_Angeles'); @@ -41,6 +47,9 @@ public function testDateTimeWithTimezone(): void self::assertEquals(new \DateTimeZone('America/Los_Angeles'), $dateTime->getTimezone()); } + /** + * @requires PHP < 8.3 + */ public function testDateTimeAD(): void { $dateTime = $this->extension->dateTimeAD('2012-04-12T19:22:23'); @@ -49,6 +58,9 @@ public function testDateTimeAD(): void self::assertEquals(new \DateTime('1166-06-01T17:43:42'), $dateTime); } + /** + * @requires PHP < 8.3 + */ public function testDateTimeBetween(): void { $dateTime = $this->extension->dateTimeBetween('1998-12-18T11:23:40', '2004-09-15T22:10:45'); @@ -63,6 +75,9 @@ public function testDateTimeBetweenShouldThrowIfFromIsNotAnteriorToUntil(): void $this->extension->dateTimeBetween('2004-09-15T22:10:45', '1998-12-18T11:23:40'); } + /** + * @requires PHP < 8.3 + */ public function testDateTimeInInterval(): void { $dateTime = $this->extension->dateTimeInInterval('1999-07-16T17:30:12', '+2 years'); @@ -120,6 +135,9 @@ public function testDateTimeThisCentury(): void self::assertLessThanOrEqual(new \DateTime('now'), $dateTime); } + /** + * @requires PHP < 8.3 + */ public function testDate(): void { $date = $this->extension->date('Y-m-d', '2102-11-12T14:45:29'); @@ -128,6 +146,9 @@ public function testDate(): void self::assertEquals('2046-12-26', $date); } + /** + * @requires PHP < 8.3 + */ public function testTime(): void { $time = $this->extension->time('H:i:s', '1978-06-27T09:43:21'); @@ -136,6 +157,9 @@ public function testTime(): void self::assertEquals('21:59:44', $time); } + /** + * @requires PHP < 8.3 + */ public function testUnixTime(): void { $unixTime = $this->extension->unixTime('1993-08-29T15:10:00'); @@ -144,6 +168,9 @@ public function testUnixTime(): void self::assertEquals(432630664, $unixTime); } + /** + * @requires PHP < 8.3 + */ public function testUnitTimeWithNumericUntil(): void { $unixTime = $this->extension->unixTime(1643830258); @@ -152,6 +179,9 @@ public function testUnitTimeWithNumericUntil(): void self::assertEquals(952499510, $unixTime); } + /** + * @requires PHP < 8.3 + */ public function testIso8601(): void { $iso8601 = $this->extension->iso8601('1993-07-11T15:10:00'); @@ -170,6 +200,9 @@ public function testAmPm(): void self::assertContains($amPm, ['am', 'pm']); } + /** + * @requires PHP < 8.3 + */ public function testDayOfMonth(): void { $dayOfMonth = $this->extension->dayOfMonth('2001-04-29T15:10:12'); @@ -178,6 +211,9 @@ public function testDayOfMonth(): void self::assertEquals('25', $dayOfMonth); } + /** + * @requires PHP < 8.3 + */ public function testDayOfWeek(): void { $dayOfWeek = $this->extension->dayOfWeek('2021-12-12T15:10:00'); @@ -186,6 +222,9 @@ public function testDayOfWeek(): void self::assertEquals('Monday', $dayOfWeek); } + /** + * @requires PHP < 8.3 + */ public function testMonth(): void { $month = $this->extension->month('2021-05-23T15:10:00'); @@ -194,6 +233,9 @@ public function testMonth(): void self::assertEquals('10', $month); } + /** + * @requires PHP < 8.3 + */ public function testMonthName(): void { $monthName = $this->extension->monthName('2021-06-06T15:10:00'); @@ -202,6 +244,9 @@ public function testMonthName(): void self::assertEquals('October', $monthName); } + /** + * @requires PHP < 8.3 + */ public function testYear(): void { $year = $this->extension->year('2021-09-12T15:10:00'); @@ -210,6 +255,9 @@ public function testYear(): void self::assertEquals('1999', $year); } + /** + * @requires PHP < 8.3 + */ public function testCentury(): void { $century = $this->extension->century(); diff --git a/test/Faker/Core/UuidTest.php b/test/Faker/Core/UuidTest.php index a0bedce026..045fdad67a 100644 --- a/test/Faker/Core/UuidTest.php +++ b/test/Faker/Core/UuidTest.php @@ -14,6 +14,9 @@ public function testUuidReturnsUuid(): void self::assertTrue($this->isUuid($uuid)); } + /** + * @requires PHP < 8.3 + */ public function testUuidExpectedSeed(): void { $instance = new Uuid(); diff --git a/test/Faker/Extension/ContainerBuilderTest.php b/test/Faker/Extension/ContainerBuilderTest.php index 6f4bfc0c3a..b6b9a22600 100644 --- a/test/Faker/Extension/ContainerBuilderTest.php +++ b/test/Faker/Extension/ContainerBuilderTest.php @@ -5,9 +5,9 @@ namespace Faker\Test\Extension; use Faker\Container\ContainerBuilder; -use Faker\Container\ContainerInterface; use Faker\Core\File; -use Faker\Extension\Extension; +use Faker\Core\Number; +use Faker\Extension; use PHPUnit\Framework\TestCase; /** @@ -30,7 +30,7 @@ public function testAddRejectsInvalidValue($value): void ContainerBuilder::class, )); - $containerBuilder->add($value); + $containerBuilder->add('foo', $value); } /** @@ -59,106 +59,91 @@ public function provideInvalidValue(): \Generator } } - public function testAddRejectsNameWhenValueIsCallableAndNameIsNull(): void - { - $value = [ - new class() { - public static function create(): Extension - { - return new class() implements Extension { - }; - } - }, - 'create', - ]; - - $containerBuilder = new ContainerBuilder(); - - $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage(sprintf( - 'Second argument to "%s::add()" is required not passing a string or object as first argument', - ContainerBuilder::class, - )); - - $containerBuilder->add($value); - } - - public function testAddAcceptsValueWhenItIsAnObjectAndNameIsNull(): void - { - $value = new class() implements Extension {}; - - $name = get_class($value); - - $containerBuilder = new ContainerBuilder(); - - $containerBuilder->add($value); - - $container = $containerBuilder->build(); - - self::assertTrue($container->has($name)); - self::assertSame($value, $container->get($name)); - } - - public function testBuildEmpty(): void + public function testBuildReturnsContainerWhenContainerBuilderDoesNotHaveDefinitions(): void { $builder = new ContainerBuilder(); $container = $builder->build(); - self::assertInstanceOf(ContainerInterface::class, $container); + self::assertFalse($container->has('foo')); } - public function testBuild(): void + public function testBuildReturnsContainerWhenContainerBuilderHasDefinitions(): void { + $id = 'foo'; + $definition = File::class; + $builder = new ContainerBuilder(); - $builder->add(File::class); + $builder->add($id, $definition); $container = $builder->build(); - self::assertInstanceOf(ContainerInterface::class, $container); + self::assertTrue($container->has($id)); + self::assertInstanceOf($definition, $container->get($id)); } - public function testBuildWithDuplicates(): void + public function testBuildReturnsContainerWhenContainerBuilderHasOverriddenDefinitions(): void { + $id = 'foo'; + $definition = Number::class; + $builder = new ContainerBuilder(); - $builder->add(File::class); - $builder->add(File::class); + $builder->add($id, File::class); + $builder->add($id, $definition); $container = $builder->build(); - self::assertInstanceOf(ContainerInterface::class, $container); + self::assertTrue($container->has($id)); + self::assertInstanceOf($definition, $container->get($id)); } - public function testBuildWithObject(): void + public function testBuildReturnsContainerWhenContainerBuilderHasObjectAsDefinition(): void { + $id = 'foo'; + $definition = new File(); + $builder = new ContainerBuilder(); - $builder->add(new File(), 'foo'); + $builder->add($id, $definition); $container = $builder->build(); - self::assertInstanceOf(ContainerInterface::class, $container); + self::assertTrue($container->has($id)); + self::assertSame($definition, $container->get($id)); } - public function testBuildWithCallable(): void + public function testBuildReturnsContainerWhenContainerBuilderHasCallableAsDefinition(): void { + $id = 'foo'; + $definition = static function (): File { + return new File(); + }; + $builder = new ContainerBuilder(); - $builder->add(static function () { - return new File(); - }, 'foo'); + $builder->add($id, $definition); $container = $builder->build(); - self::assertInstanceOf(ContainerInterface::class, $container); + self::assertTrue($container->has($id)); + self::assertEquals($definition(), $container->get($id)); } - public function testBuildDefault(): void + public function testWithDefaultExtensionsReturnsContainerBuilderWithDefaultExtensions(): void { - $container = ContainerBuilder::getDefault(); + $builder = ContainerBuilder::withDefaultExtensions(); + + $container = $builder->build(); - self::assertInstanceOf(ContainerInterface::class, $container); + self::assertTrue($container->has(Extension\BarcodeExtension::class)); + self::assertTrue($container->has(Extension\BloodExtension::class)); + self::assertTrue($container->has(Extension\ColorExtension::class)); + self::assertTrue($container->has(Extension\DateTimeExtension::class)); + self::assertTrue($container->has(Extension\FileExtension::class)); + self::assertTrue($container->has(Extension\NumberExtension::class)); + self::assertTrue($container->has(Extension\UuidExtension::class)); + self::assertTrue($container->has(Extension\VersionExtension::class)); } } diff --git a/test/Faker/Extension/ContainerTest.php b/test/Faker/Extension/ContainerTest.php index f1158d4aef..3a6932905b 100644 --- a/test/Faker/Extension/ContainerTest.php +++ b/test/Faker/Extension/ContainerTest.php @@ -5,8 +5,10 @@ namespace Faker\Test\Extension; use Faker\Container\Container; +use Faker\Container\ContainerException; use Faker\Core\File; use Faker\Extension\Extension; +use Faker\Test; use PHPUnit\Framework\TestCase; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; @@ -16,6 +18,15 @@ */ final class ContainerTest extends TestCase { + public function testHasThrowsInvalidArgumentExceptionWhenIdentifierIsNotAString(): void + { + $container = new Container([]); + + $this->expectException(\InvalidArgumentException::class); + + $container->has(false); + } + public function testHasReturnsFalseWhenContainerDoesNotHaveDefinitionForService(): void { $container = new Container([]); @@ -23,6 +34,15 @@ public function testHasReturnsFalseWhenContainerDoesNotHaveDefinitionForService( self::assertFalse($container->has('foo')); } + public function testGetThrowsInvalidArgumentExceptionWhenIdentifierIsNotAString(): void + { + $container = new Container([]); + + $this->expectException(\InvalidArgumentException::class); + + $container->get(false); + } + public function testGetThrowsNotFoundExceptionWhenContainerDoesNotHaveDefinitionForService(): void { $container = new Container([]); @@ -43,6 +63,42 @@ public function testGetFromString(): void self::assertInstanceOf(File::class, $object); } + public function testGetThrowsRuntimeExceptionWhenServiceCouldNotBeResolvedFromCallable(): void + { + $id = 'foo'; + + $container = new Container([ + $id => static function (): void { + throw new \RuntimeException(); + }, + ]); + + $this->expectException(ContainerException::class); + $this->expectExceptionMessage(sprintf( + 'Error while invoking callable for "%s"', + $id, + )); + + $container->get($id); + } + + public function testGetThrowsRuntimeExceptionWhenServiceCouldNotBeResolvedFromClass(): void + { + $id = 'foo'; + + $container = new Container([ + $id => Test\Fixture\Container\UnconstructableClass::class, + ]); + + $this->expectException(ContainerException::class); + $this->expectExceptionMessage(sprintf( + 'Could not instantiate class "%s"', + $id, + )); + + $container->get($id); + } + /** * @dataProvider provideDefinitionThatDoesNotResolveToExtension */ @@ -64,6 +120,33 @@ public function testGetThrowsRuntimeExceptionWhenServiceResolvedForIdentifierIsN $container->get($id); } + /** + * @dataProvider provideDefinitionThatDoesNotResolveToExtension + */ + public function testGetThrowsRuntimeExceptionWhenServiceResolvedForIdentifierIsNotAnExtensionOnSecondTry($definition): void + { + $id = 'file'; + + $container = new Container([ + $id => $definition, + ]); + + try { + $container->get($id); + } catch (\RuntimeException $e) { + // do nothing + } + + $this->expectException(\RuntimeException::class); + $this->expectExceptionMessage(sprintf( + 'Service resolved for identifier "%s" does not implement the %s" interface.', + $id, + Extension::class, + )); + + $container->get($id); + } + /** * @return \Generator */ diff --git a/test/Faker/GeneratorTest.php b/test/Faker/GeneratorTest.php index 644a734819..6b79db0aa8 100644 --- a/test/Faker/GeneratorTest.php +++ b/test/Faker/GeneratorTest.php @@ -135,7 +135,7 @@ public function testFormatTransfersArgumentsToFormatter(): void public function testFormatterCallsGenerator(): void { $builder = new ContainerBuilder(); - $builder->add(Blood::class, BloodExtension::class); + $builder->add(BloodExtension::class, Blood::class); $faker = new Generator($builder->build()); $output = $faker->format('bloodType'); @@ -145,7 +145,7 @@ public function testFormatterCallsGenerator(): void public function testFormatterCallsExtension(): void { $builder = new ContainerBuilder(); - $builder->add(Blood::class); + $builder->add(Blood::class, Blood::class); $faker = new Generator($builder->build()); $output = $faker->format('Faker\Core\Blood->bloodType'); @@ -245,6 +245,9 @@ public function testUniqueReturnsDifferentUniqueGeneratorWhenResetIsTrue(): void self::assertNotSame($uniqueGenerator, $generator->unique(true)); } + /** + * @requires PHP < 8.3 + */ public function testUniqueReturnsUniqueGeneratorThatGeneratesUniqueValues(): void { $words = [ diff --git a/test/Faker/Provider/BaseTest.php b/test/Faker/Provider/BaseTest.php index 78d3b24042..3879ea60fc 100644 --- a/test/Faker/Provider/BaseTest.php +++ b/test/Faker/Provider/BaseTest.php @@ -410,6 +410,8 @@ public function testOptionalAllowsChainingProviderCallRandomlyReturnNull(): void /** * @see https://github.com/fzaninotto/Faker/issues/265 + * + * @requires PHP < 8.3 */ public function testOptionalPercentageAndWeight(): void { diff --git a/test/Faker/Provider/BiasedTest.php b/test/Faker/Provider/BiasedTest.php index 80eb9cb6ab..4eb525795e 100644 --- a/test/Faker/Provider/BiasedTest.php +++ b/test/Faker/Provider/BiasedTest.php @@ -42,6 +42,9 @@ public function testUnbiased(): void } } + /** + * @requires PHP < 8.3 + */ public function testLinearHigh(): void { $this->performFake(['\Faker\Provider\Biased', 'linearHigh']); diff --git a/test/Faker/Provider/ImageTest.php b/test/Faker/Provider/ImageTest.php index ff5e7f1c8a..1aa495e17c 100644 --- a/test/Faker/Provider/ImageTest.php +++ b/test/Faker/Provider/ImageTest.php @@ -185,7 +185,7 @@ private static function checkUrlConnection(string $url): void $httpCode = curl_getinfo($curlPing, CURLINFO_HTTP_CODE); curl_close($curlPing); - if ($httpCode < 200 | $httpCode > 300) { + if ($httpCode < 200 || $httpCode > 300) { self::markTestSkipped(sprintf('"%s" is offline, skipping test', $url)); } } diff --git a/test/Faker/Provider/ProviderOverrideTest.php b/test/Faker/Provider/ProviderOverrideTest.php index de07e803b6..32415c8014 100644 --- a/test/Faker/Provider/ProviderOverrideTest.php +++ b/test/Faker/Provider/ProviderOverrideTest.php @@ -35,10 +35,10 @@ public function testAddress($locale = null): void { $faker = Faker\Factory::create($locale); - self::assertMatchesRegularExpression(static::TEST_STRING_REGEX, $faker->city); - self::assertMatchesRegularExpression(static::TEST_STRING_REGEX, $faker->postcode); - self::assertMatchesRegularExpression(static::TEST_STRING_REGEX, $faker->address); - self::assertMatchesRegularExpression(static::TEST_STRING_REGEX, $faker->country); + self::assertMatchesRegularExpression(self::TEST_STRING_REGEX, $faker->city); + self::assertMatchesRegularExpression(self::TEST_STRING_REGEX, $faker->postcode); + self::assertMatchesRegularExpression(self::TEST_STRING_REGEX, $faker->address); + self::assertMatchesRegularExpression(self::TEST_STRING_REGEX, $faker->country); } /** @@ -50,7 +50,7 @@ public function testCompany($locale = null): void { $faker = Faker\Factory::create($locale); - self::assertMatchesRegularExpression(static::TEST_STRING_REGEX, $faker->company); + self::assertMatchesRegularExpression(self::TEST_STRING_REGEX, $faker->company); } /** @@ -62,8 +62,8 @@ public function testDateTime($locale = null): void { $faker = Faker\Factory::create($locale); - self::assertMatchesRegularExpression(static::TEST_STRING_REGEX, $faker->century); - self::assertMatchesRegularExpression(static::TEST_STRING_REGEX, $faker->timezone); + self::assertMatchesRegularExpression(self::TEST_STRING_REGEX, $faker->century); + self::assertMatchesRegularExpression(self::TEST_STRING_REGEX, $faker->timezone); } /** @@ -75,12 +75,12 @@ public function testInternet($locale = null): void { $faker = Faker\Factory::create($locale); - self::assertMatchesRegularExpression(static::TEST_STRING_REGEX, $faker->userName); + self::assertMatchesRegularExpression(self::TEST_STRING_REGEX, $faker->userName); - self::assertMatchesRegularExpression(static::TEST_EMAIL_REGEX, $faker->email); - self::assertMatchesRegularExpression(static::TEST_EMAIL_REGEX, $faker->safeEmail); - self::assertMatchesRegularExpression(static::TEST_EMAIL_REGEX, $faker->freeEmail); - self::assertMatchesRegularExpression(static::TEST_EMAIL_REGEX, $faker->companyEmail); + self::assertMatchesRegularExpression(self::TEST_EMAIL_REGEX, $faker->email); + self::assertMatchesRegularExpression(self::TEST_EMAIL_REGEX, $faker->safeEmail); + self::assertMatchesRegularExpression(self::TEST_EMAIL_REGEX, $faker->freeEmail); + self::assertMatchesRegularExpression(self::TEST_EMAIL_REGEX, $faker->companyEmail); } /** @@ -92,10 +92,10 @@ public function testPerson($locale = null): void { $faker = Faker\Factory::create($locale); - self::assertMatchesRegularExpression(static::TEST_STRING_REGEX, $faker->name); - self::assertMatchesRegularExpression(static::TEST_STRING_REGEX, $faker->title); - self::assertMatchesRegularExpression(static::TEST_STRING_REGEX, $faker->firstName); - self::assertMatchesRegularExpression(static::TEST_STRING_REGEX, $faker->lastName); + self::assertMatchesRegularExpression(self::TEST_STRING_REGEX, $faker->name); + self::assertMatchesRegularExpression(self::TEST_STRING_REGEX, $faker->title); + self::assertMatchesRegularExpression(self::TEST_STRING_REGEX, $faker->firstName); + self::assertMatchesRegularExpression(self::TEST_STRING_REGEX, $faker->lastName); } /** @@ -107,7 +107,7 @@ public function testPhoneNumber($locale = null): void { $faker = Faker\Factory::create($locale); - self::assertMatchesRegularExpression(static::TEST_STRING_REGEX, $faker->phoneNumber); + self::assertMatchesRegularExpression(self::TEST_STRING_REGEX, $faker->phoneNumber); } /** @@ -119,7 +119,7 @@ public function testUserAgent($locale = null): void { $faker = Faker\Factory::create($locale); - self::assertMatchesRegularExpression(static::TEST_STRING_REGEX, $faker->userAgent); + self::assertMatchesRegularExpression(self::TEST_STRING_REGEX, $faker->userAgent); } /** @@ -132,6 +132,6 @@ public function testUuid($locale = null): void { $faker = Faker\Factory::create($locale); - self::assertMatchesRegularExpression(static::TEST_STRING_REGEX, $faker->uuid); + self::assertMatchesRegularExpression(self::TEST_STRING_REGEX, $faker->uuid); } } diff --git a/test/Faker/Provider/UuidTest.php b/test/Faker/Provider/UuidTest.php index ea410ffe6c..c8b324f62c 100644 --- a/test/Faker/Provider/UuidTest.php +++ b/test/Faker/Provider/UuidTest.php @@ -16,6 +16,9 @@ public function testUuidReturnsUuid(): void self::assertTrue($this->isUuid($uuid)); } + /** + * @requires PHP < 8.3 + */ public function testUuidExpectedSeed(): void { if (pack('L', 0x6162797A) == pack('N', 0x6162797A)) { diff --git a/test/Faker/Provider/en_GB/CompanyTest.php b/test/Faker/Provider/en_GB/CompanyTest.php index 125ba2e56e..7780b1f5c7 100644 --- a/test/Faker/Provider/en_GB/CompanyTest.php +++ b/test/Faker/Provider/en_GB/CompanyTest.php @@ -26,6 +26,9 @@ public function testModulus97AlgorithmWithInvalidArgument(): void $this->faker->calculateModulus97(123); } + /** + * @requires PHP < 8.3 + */ public function testVat(): void { $this->assertDefaultVatFormat($this->faker->vat()); @@ -37,6 +40,9 @@ private function assertDefaultVatFormat($number): void self::assertEquals(1, preg_match('/^GB[\d]{3} [\d]{4} [\d]{2}$/', $number)); } + /** + * @requires PHP < 8.3 + */ public function testVatBranchType(): void { $number = $this->faker->vat(Company::VAT_TYPE_BRANCH); diff --git a/test/Faker/Provider/fi_FI/PersonTest.php b/test/Faker/Provider/fi_FI/PersonTest.php index 51fe056ab5..4a420429f2 100644 --- a/test/Faker/Provider/fi_FI/PersonTest.php +++ b/test/Faker/Provider/fi_FI/PersonTest.php @@ -23,6 +23,8 @@ public function provideSeedAndExpectedReturn() } /** + * @requires PHP < 8.3 + * * @dataProvider provideSeedAndExpectedReturn */ public function testPersonalIdentityNumberUsesBirthDateIfProvided($seed, $birthdate, $expected): void diff --git a/test/Faker/Provider/fr_FR/AddressTest.php b/test/Faker/Provider/fr_FR/AddressTest.php index 1f48f54d5f..81a1c1909f 100644 --- a/test/Faker/Provider/fr_FR/AddressTest.php +++ b/test/Faker/Provider/fr_FR/AddressTest.php @@ -10,12 +10,26 @@ */ final class AddressTest extends TestCase { + public function testPostcode(): void + { + $postcode = $this->faker->postcode(); + self::assertNotEmpty($postcode); + self::assertIsString($postcode); + self::assertMatchesRegularExpression('@^\d{5}$@', $postcode); + } + + /** + * @requires PHP < 8.3 + */ public function testSecondaryAddress(): void { self::assertEquals('Étage 007', $this->faker->secondaryAddress()); self::assertEquals('Bât. 932', $this->faker->secondaryAddress()); } + /** + * @requires PHP < 8.3 + */ public function testRegion(): void { self::assertEquals('Occitanie', $this->faker->region()); diff --git a/test/Faker/Provider/fr_FR/ColorTest.php b/test/Faker/Provider/fr_FR/ColorTest.php index e9b1d34c93..8a003db672 100644 --- a/test/Faker/Provider/fr_FR/ColorTest.php +++ b/test/Faker/Provider/fr_FR/ColorTest.php @@ -10,12 +10,18 @@ */ final class ColorTest extends TestCase { + /** + * @requires PHP < 8.3 + */ public function testColorName(): void { self::assertEquals('Mandarine', $this->faker->colorName()); self::assertEquals('Acajou', $this->faker->colorName()); } + /** + * @requires PHP < 8.3 + */ public function testSafeColorName(): void { self::assertEquals('bleu', $this->faker->safeColorName()); diff --git a/test/Faker/Provider/hu_HU/PersonTest.php b/test/Faker/Provider/hu_HU/PersonTest.php index 8618cafdff..dcb46a5a89 100644 --- a/test/Faker/Provider/hu_HU/PersonTest.php +++ b/test/Faker/Provider/hu_HU/PersonTest.php @@ -10,6 +10,9 @@ */ final class PersonTest extends TestCase { + /** + * @requires PHP < 8.3 + */ public function testValidMariedFemaleLastnames(): void { self::assertEquals('Báró Vassné Zsóka', $this->faker->name('female')); diff --git a/test/Faker/Provider/id_ID/PersonTest.php b/test/Faker/Provider/id_ID/PersonTest.php index 164c1ad29a..8a9e488c1c 100644 --- a/test/Faker/Provider/id_ID/PersonTest.php +++ b/test/Faker/Provider/id_ID/PersonTest.php @@ -77,7 +77,7 @@ public function testNikContainsBirthPlace(): void { $nik = $this->faker->nik(); - self::assertContains(substr($nik, 0, 4), static::$birthPlaceCode); + self::assertContains(substr($nik, 0, 4), self::$birthPlaceCode); } protected function getProviders(): iterable diff --git a/test/Faker/Provider/ja_JP/InternetTest.php b/test/Faker/Provider/ja_JP/InternetTest.php index 8837fe910a..8d68036412 100644 --- a/test/Faker/Provider/ja_JP/InternetTest.php +++ b/test/Faker/Provider/ja_JP/InternetTest.php @@ -10,11 +10,17 @@ */ final class InternetTest extends TestCase { + /** + * @requires PHP < 8.3 + */ public function testUserName(): void { self::assertEquals('akira72', $this->faker->userName); } + /** + * @requires PHP < 8.3 + */ public function testDomainName(): void { self::assertEquals('nakajima.com', $this->faker->domainName); diff --git a/test/Faker/Provider/ja_JP/PersonTest.php b/test/Faker/Provider/ja_JP/PersonTest.php index d16e9f4b3d..0e88976cdd 100644 --- a/test/Faker/Provider/ja_JP/PersonTest.php +++ b/test/Faker/Provider/ja_JP/PersonTest.php @@ -10,26 +10,41 @@ */ final class PersonTest extends TestCase { + /** + * @requires PHP < 8.3 + */ public function testKanaNameMaleReturns(): void { self::assertEquals('アオタ ミノル', $this->faker->kanaName('male')); } + /** + * @requires PHP < 8.3 + */ public function testKanaNameFemaleReturns(): void { self::assertEquals('アオタ ミキ', $this->faker->kanaName('female')); } + /** + * @requires PHP < 8.3 + */ public function testFirstKanaNameMaleReturns(): void { self::assertEquals('ヒデキ', $this->faker->firstKanaName('male')); } + /** + * @requires PHP < 8.3 + */ public function testFirstKanaNameFemaleReturns(): void { self::assertEquals('マアヤ', $this->faker->firstKanaName('female')); } + /** + * @requires PHP < 8.3 + */ public function testLastKanaNameReturnsNakajima(): void { self::assertEquals('ナカジマ', $this->faker->lastKanaName); diff --git a/test/Faker/Provider/lv_LV/AddressTest.php b/test/Faker/Provider/lv_LV/AddressTest.php new file mode 100644 index 0000000000..275340516e --- /dev/null +++ b/test/Faker/Provider/lv_LV/AddressTest.php @@ -0,0 +1,25 @@ +faker->postcode(); + self::assertNotEmpty($postcode); + self::assertIsString($postcode); + self::assertMatchesRegularExpression('/LV-\d{4}/', $postcode); + } + + protected function getProviders(): iterable + { + yield new Address($this->faker); + } +} diff --git a/test/Faker/Provider/lv_LV/PersonTest.php b/test/Faker/Provider/lv_LV/PersonTest.php new file mode 100644 index 0000000000..94a3a05365 --- /dev/null +++ b/test/Faker/Provider/lv_LV/PersonTest.php @@ -0,0 +1,37 @@ +faker->personalIdentityNumber(); + + self::assertMatchesRegularExpression('/^[0-9]{6}-[0-9]{5}$/', $idNumber); + } + + public function testChecksumDigitCalculation(): void + { + $idNumber = $this->faker->personalIdentityNumber(\DateTime::createFromFormat('Y-m-d', '1981-05-24')); + + $serialNumber = substr($idNumber, 8, 3); + $serialNumberSplit = str_split($serialNumber); + + // calculate checksum, using static digits from date (2 4 0 5 8 1 1) and inserting random serial number digits + $checksumDigit = (1101 - (1 * 2 + 6 * 4 + 3 * 0 + 7 * 5 + 9 * 8 + 10 * 1 + 5 * 1 + 8 * (int) $serialNumberSplit[0] + 4 * (int) $serialNumberSplit[1] + 2 * (int) $serialNumberSplit[2])) % 11 % 10; + + self::assertSame('240581-1' . $serialNumber . $checksumDigit, $idNumber); + } + + protected function getProviders(): iterable + { + yield new Person($this->faker); + } +} diff --git a/test/Faker/Provider/pl_PL/ColorTest.php b/test/Faker/Provider/pl_PL/ColorTest.php index 885e809688..e5c436548b 100644 --- a/test/Faker/Provider/pl_PL/ColorTest.php +++ b/test/Faker/Provider/pl_PL/ColorTest.php @@ -10,12 +10,18 @@ */ final class ColorTest extends TestCase { + /** + * @requires PHP < 8.3 + */ public function testColorName(): void { self::assertEquals('mysi', $this->faker->colorName()); self::assertEquals('alabastrowy', $this->faker->colorName()); } + /** + * @requires PHP < 8.3 + */ public function testSafeColorName(): void { self::assertEquals('żółty', $this->faker->safeColorName()); diff --git a/test/Faker/Provider/pl_PL/LicensePlateTest.php b/test/Faker/Provider/pl_PL/LicensePlateTest.php index 8abe4d4c7a..cecbfc16fa 100644 --- a/test/Faker/Provider/pl_PL/LicensePlateTest.php +++ b/test/Faker/Provider/pl_PL/LicensePlateTest.php @@ -64,7 +64,7 @@ public function testPodkarpackieLicensePlate(): void ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); - self::assertMatchesRegularExpression('/^(?:R[A-PR-Z] [A-PR-Z\d]{5}|R[A-PR-Z]{2} [A-PR-Z\d]{4,5})$/', $licensePlate); + self::assertMatchesRegularExpression('/^(?:[RY][A-PR-Z] [A-PR-Z\d]{5}|[RY][A-PR-Z]{2} [A-PR-Z\d]{4,5})$/', $licensePlate); } } @@ -162,7 +162,7 @@ public function testVoivodeshipCountyLicensePlate(): void ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); - self::assertMatchesRegularExpression('/^(?:WZ [A-PR-Z\d]{5}|(?:WRA|HWA|HWK) [A-PR-Z\d]{4,5})$/', $licensePlate); + self::assertMatchesRegularExpression('/^(?:[AW]Z [A-PR-Z\d]{5}|(?:[AW]RA|HWA|HWK) [A-PR-Z\d]{4,5})$/', $licensePlate); } } @@ -179,7 +179,7 @@ public function testVoivodeshipFakeCountyLicensePlate(): void ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); - self::assertMatchesRegularExpression('/^(?:[WH][A-PR-Z] [A-PR-Z\d]{5}|[WH][A-PR-Z]{2} [A-PR-Z\d]{4,5})$/', $licensePlate); + self::assertMatchesRegularExpression('/^(?:[AWH][A-PR-Z] [A-PR-Z\d]{5}|[AWH][A-PR-Z]{2} [A-PR-Z\d]{4,5})$/', $licensePlate); } } @@ -247,7 +247,7 @@ public function testVoivodeship1stArgumentFalse(): void ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); - self::assertMatchesRegularExpression('/^(?:W[A-PR-Z] [A-PR-Z\d]{5}|W[A-PR-Z]{2} [A-PR-Z\d]{4,5})$/', $licensePlate); + self::assertMatchesRegularExpression('/^(?:[AW][A-PR-Z] [A-PR-Z\d]{5}|[AW][A-PR-Z]{2} [A-PR-Z\d]{4,5})$/', $licensePlate); } } diff --git a/test/Faker/Provider/pt_BR/PhoneNumberTest.php b/test/Faker/Provider/pt_BR/PhoneNumberTest.php new file mode 100644 index 0000000000..e9118049a2 --- /dev/null +++ b/test/Faker/Provider/pt_BR/PhoneNumberTest.php @@ -0,0 +1,51 @@ +faker->phone(false); + + self::assertIsString($phoneNumber); + self::assertNotEmpty($phoneNumber); + } + + public function testPhoneReturnsPhoneNumberWhenArgumentIsTrue(): void + { + $phoneNumber = $this->faker->phone(true); + + self::assertIsString($phoneNumber); + self::assertNotEmpty($phoneNumber); + } + + public function testPhoneNumberReturnsPhoneNumber(): void + { + $phoneNumber = $this->faker->phoneNumber(); + + self::assertIsString($phoneNumber); + self::assertNotEmpty($phoneNumber); + } + + public function testPhoneNumberClearedReturnsPhoneNumber(): void + { + $phoneNumber = $this->faker->phoneNumberCleared(); + + self::assertIsString($phoneNumber); + self::assertNotEmpty($phoneNumber); + } + + protected function getProviders(): iterable + { + yield new Provider\pt_BR\PhoneNumber($this->faker); + } +} diff --git a/test/Faker/Provider/ro_RO/PersonTest.php b/test/Faker/Provider/ro_RO/PersonTest.php index 681b93a2d1..81368fc1f8 100644 --- a/test/Faker/Provider/ro_RO/PersonTest.php +++ b/test/Faker/Provider/ro_RO/PersonTest.php @@ -206,7 +206,7 @@ protected function isValidMaleCnp($value) protected function isValidCnp($cnp) { - if (preg_match(static::TEST_CNP_REGEX, $cnp) !== false) { + if (preg_match(self::TEST_CNP_REGEX, $cnp) !== false) { $checkNumber = 279146358279; $checksum = 0; diff --git a/test/Faker/Provider/ru_RU/PersonTest.php b/test/Faker/Provider/ru_RU/PersonTest.php index aa34376d4d..5786be79a1 100644 --- a/test/Faker/Provider/ru_RU/PersonTest.php +++ b/test/Faker/Provider/ru_RU/PersonTest.php @@ -2,6 +2,7 @@ namespace Faker\Test\Provider\ru_RU; +use Faker\Generator; use Faker\Provider\ru_RU\Person; use Faker\Test\TestCase; @@ -10,12 +11,12 @@ */ final class PersonTest extends TestCase { - public function testLastNameFemale(): void + public function testLastNameForFemale(): void { self::assertEquals('а', substr($this->faker->lastName('female'), -2, 2)); } - public function testLastNameMale(): void + public function testLastNameForMale(): void { self::assertNotEquals('а', substr($this->faker->lastName('male'), -2, 2)); } @@ -29,4 +30,143 @@ protected function getProviders(): iterable { yield new Person($this->faker); } + + /** + * @requires PHP < 8.3 + * + * @dataProvider dataLastNameMale + */ + public function testLastNameMale(int $seed, string $expected): void + { + $generator = new Generator(); + $generator->seed($seed); + + $provider = new Person($generator); + + self::assertSame($expected, $provider->lastNameMale()); + } + + public function dataLastNameMale(): iterable + { + yield 'seed: 4' => [ + 4, + 'Морозов', + ]; + + yield 'seed: 8' => [ + 8, + 'Гусев', + ]; + + yield 'seed: 15' => [ + 15, + 'Алексеев', + ]; + + yield 'seed: 16' => [ + 16, + 'Фадеев', + ]; + + yield 'seed: 23' => [ + 23, + 'Воронов', + ]; + + yield 'seed: 42' => [ + 42, + 'Горбачёв', + ]; + } + + /** + * @requires PHP < 8.3 + * + * @dataProvider dataLastNameFemale + */ + public function testLastNameFemale(int $seed, string $expected): void + { + $generator = new Generator(); + $generator->seed($seed); + + $provider = new Person($generator); + + self::assertSame($expected, $provider->lastNameFemale()); + } + + public function dataLastNameFemale(): iterable + { + yield 'seed: 4' => [ + 4, + 'Морозова', + ]; + + yield 'seed: 8' => [ + 8, + 'Гусева', + ]; + + yield 'seed: 15' => [ + 15, + 'Алексеева', + ]; + + yield 'seed: 16' => [ + 16, + 'Фадеева', + ]; + + yield 'seed: 23' => [ + 23, + 'Воронова', + ]; + + yield 'seed: 42' => [ + 42, + 'Горбачёва', + ]; + } + + /** + * Issue 832 + * + * @requires PHP < 8.3 + * + * @dataProvider dataFemaleSurnameWithoutDoubleALetter + */ + public function testFemaleSurnameWithoutDoubleALetter(int $seed, string $expected): void + { + $generator = new Generator(); + $generator->seed($seed); + + foreach ($this->getProviders() as $provider) { + $generator->addProvider($provider); + } + + self::assertSame($expected, $generator->name('female')); + } + + public static function dataFemaleSurnameWithoutDoubleALetter(): iterable + { + //bad cases + yield 'seed: 55' => [ + 55, + 'Ларионова Алиса Александровна', + ]; + + yield 'seed: 512' => [ + 512, + 'Тихонова Галина Андреевна', + ]; + + yield 'seed: 625' => [ + 625, + 'Ларионова Изабелла Романовна', + ]; + + yield 'seed: 1917' => [ + 1917, + 'Павлова Владлена Романовна', + ]; + } } diff --git a/test/Faker/Provider/sv_SE/PersonTest.php b/test/Faker/Provider/sv_SE/PersonTest.php index b2182dc541..1cbbfbe30f 100644 --- a/test/Faker/Provider/sv_SE/PersonTest.php +++ b/test/Faker/Provider/sv_SE/PersonTest.php @@ -23,6 +23,8 @@ public function provideSeedAndExpectedReturn() } /** + * @requires PHP < 8.3 + * * @dataProvider provideSeedAndExpectedReturn */ public function testPersonalIdentityNumberUsesBirthDateIfProvided($seed, $birthdate, $expected): void diff --git a/test/Faker/Provider/uk_UA/PersonTest.php b/test/Faker/Provider/uk_UA/PersonTest.php index 3773c984b0..2d7e95ebfb 100644 --- a/test/Faker/Provider/uk_UA/PersonTest.php +++ b/test/Faker/Provider/uk_UA/PersonTest.php @@ -10,26 +10,41 @@ */ final class PersonTest extends TestCase { + /** + * @requires PHP < 8.3 + */ public function testFirstNameMaleReturns(): void { self::assertEquals('Максим', $this->faker->firstNameMale()); } + /** + * @requires PHP < 8.3 + */ public function testFirstNameFemaleReturns(): void { self::assertEquals('Людмила', $this->faker->firstNameFemale()); } + /** + * @requires PHP < 8.3 + */ public function testMiddleNameMaleReturns(): void { self::assertEquals('Миколайович', $this->faker->middleNameMale()); } + /** + * @requires PHP < 8.3 + */ public function testMiddleNameFemaleReturns(): void { self::assertEquals('Миколаївна', $this->faker->middleNameFemale()); } + /** + * @requires PHP < 8.3 + */ public function testLastNameReturns(): void { self::assertEquals('Броваренко', $this->faker->lastName()); diff --git a/test/Faker/UniqueGeneratorTest.php b/test/Faker/UniqueGeneratorTest.php index bf7b147c8d..f1ad670dd8 100644 --- a/test/Faker/UniqueGeneratorTest.php +++ b/test/Faker/UniqueGeneratorTest.php @@ -23,5 +23,7 @@ public function testUniqueGeneratorRetries(): void for ($i = 0; $i < 10; ++$i) { $this->faker->unique()->ext(NumberExtension::class)->numberBetween(0, 9); } + + $this->addToAssertionCount(1); } } diff --git a/test/Fixture/Container/UnconstructableClass.php b/test/Fixture/Container/UnconstructableClass.php new file mode 100644 index 0000000000..6fcb403b11 --- /dev/null +++ b/test/Fixture/Container/UnconstructableClass.php @@ -0,0 +1,15 @@ +=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/master" - }, - "time": "2016-08-06T20:24:11+00:00" + "time": "2023-09-04T01:22:52+00:00" }, { "name": "psr/container", @@ -782,16 +535,16 @@ }, { "name": "symfony/console", - "version": "v5.4.24", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8" + "reference": "f4f71842f24c2023b91237c72a365306f3c58827" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", - "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", + "url": "https://api.github.com/repos/symfony/console/zipball/f4f71842f24c2023b91237c72a365306f3c58827", + "reference": "f4f71842f24c2023b91237c72a365306f3c58827", "shasum": "" }, "require": { @@ -861,7 +614,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.24" + "source": "https://github.com/symfony/console/tree/v5.4.28" }, "funding": [ { @@ -877,7 +630,7 @@ "type": "tidelift" } ], - "time": "2023-05-26T05:13:16+00:00" + "time": "2023-08-07T06:12:30+00:00" }, { "name": "symfony/deprecation-contracts", @@ -948,16 +701,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f" + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1df20e45d56da29a4b1d8259dd6e950acbf1b13f", - "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5dcc00e03413f05c1e7900090927bb7247cb0aac", + "reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac", "shasum": "" }, "require": { @@ -1013,7 +766,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.22" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.26" }, "funding": [ { @@ -1029,7 +782,7 @@ "type": "tidelift" } ], - "time": "2023-03-17T11:31:58+00:00" + "time": "2023-07-06T06:34:20+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -1112,16 +865,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.23", + "version": "v5.4.25", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5" + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", - "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", "shasum": "" }, "require": { @@ -1156,7 +909,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.23" + "source": "https://github.com/symfony/filesystem/tree/v5.4.25" }, "funding": [ { @@ -1172,20 +925,20 @@ "type": "tidelift" } ], - "time": "2023-03-02T11:38:35+00:00" + "time": "2023-05-31T13:04:02+00:00" }, { "name": "symfony/finder", - "version": "v5.4.21", + "version": "v5.4.27", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19" + "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19", + "url": "https://api.github.com/repos/symfony/finder/zipball/ff4bce3c33451e7ec778070e45bd23f74214cd5d", + "reference": "ff4bce3c33451e7ec778070e45bd23f74214cd5d", "shasum": "" }, "require": { @@ -1219,7 +972,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.21" + "source": "https://github.com/symfony/finder/tree/v5.4.27" }, "funding": [ { @@ -1235,7 +988,7 @@ "type": "tidelift" } ], - "time": "2023-02-16T09:33:00+00:00" + "time": "2023-07-31T08:02:31+00:00" }, { "name": "symfony/options-resolver", @@ -1308,16 +1061,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { @@ -1332,7 +1085,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1370,7 +1123,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -1386,20 +1139,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + "reference": "875e90aeea2777b6f135677f618529449334a612" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", "shasum": "" }, "require": { @@ -1411,7 +1164,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1451,7 +1204,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" }, "funding": [ { @@ -1467,20 +1220,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", "shasum": "" }, "require": { @@ -1492,7 +1245,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1535,7 +1288,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -1551,20 +1304,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { @@ -1579,7 +1332,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1618,7 +1371,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -1634,20 +1387,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", "shasum": "" }, "require": { @@ -1656,7 +1409,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1697,7 +1450,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" }, "funding": [ { @@ -1713,20 +1466,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", "shasum": "" }, "require": { @@ -1735,7 +1488,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1780,7 +1533,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, "funding": [ { @@ -1796,20 +1549,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", "shasum": "" }, "require": { @@ -1818,7 +1571,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1859,7 +1612,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" }, "funding": [ { @@ -1875,20 +1628,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/process", - "version": "v5.4.24", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64" + "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/e3c46cc5689c8782944274bb30702106ecbe3b64", - "reference": "e3c46cc5689c8782944274bb30702106ecbe3b64", + "url": "https://api.github.com/repos/symfony/process/zipball/45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", + "reference": "45261e1fccad1b5447a8d7a8e67aa7b4a9798b7b", "shasum": "" }, "require": { @@ -1921,7 +1674,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.24" + "source": "https://github.com/symfony/process/tree/v5.4.28" }, "funding": [ { @@ -1937,7 +1690,7 @@ "type": "tidelift" } ], - "time": "2023-05-17T11:26:05+00:00" + "time": "2023-08-07T10:36:04+00:00" }, { "name": "symfony/service-contracts", @@ -2086,16 +1839,16 @@ }, { "name": "symfony/string", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62" + "reference": "1181fe9270e373537475e826873b5867b863883c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", + "url": "https://api.github.com/repos/symfony/string/zipball/1181fe9270e373537475e826873b5867b863883c", + "reference": "1181fe9270e373537475e826873b5867b863883c", "shasum": "" }, "require": { @@ -2152,7 +1905,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.22" + "source": "https://github.com/symfony/string/tree/v5.4.26" }, "funding": [ { @@ -2168,7 +1921,7 @@ "type": "tidelift" } ], - "time": "2023-03-14T06:11:53+00:00" + "time": "2023-06-28T12:46:07+00:00" } ], "packages-dev": [], diff --git a/vendor-bin/phpstan/composer.json b/vendor-bin/phpstan/composer.json index 71db14b9d9..c986b84bbf 100644 --- a/vendor-bin/phpstan/composer.json +++ b/vendor-bin/phpstan/composer.json @@ -2,8 +2,8 @@ "require": { "php": "^7.4 || ^8.0", "phpstan/extension-installer": "^1.3.1", - "phpstan/phpstan": "^1.10.15", - "phpstan/phpstan-deprecation-rules": "^1.1.3" + "phpstan/phpstan": "^1.10.33", + "phpstan/phpstan-deprecation-rules": "^1.1.4" }, "config": { "platform": { diff --git a/vendor-bin/phpstan/composer.lock b/vendor-bin/phpstan/composer.lock index 0d551fc48a..e29b1839e4 100644 --- a/vendor-bin/phpstan/composer.lock +++ b/vendor-bin/phpstan/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "138df2ef452a08862d974f139e444db0", + "content-hash": "91943fd0e93bcc879374e34731204c38", "packages": [ { "name": "phpstan/extension-installer", @@ -52,16 +52,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.15", + "version": "1.10.33", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "762c4dac4da6f8756eebb80e528c3a47855da9bd" + "reference": "03b1cf9f814ba0863c4e9affea49a4d1ed9a2ed1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/762c4dac4da6f8756eebb80e528c3a47855da9bd", - "reference": "762c4dac4da6f8756eebb80e528c3a47855da9bd", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/03b1cf9f814ba0863c4e9affea49a4d1ed9a2ed1", + "reference": "03b1cf9f814ba0863c4e9affea49a4d1ed9a2ed1", "shasum": "" }, "require": { @@ -110,25 +110,25 @@ "type": "tidelift" } ], - "time": "2023-05-09T15:28:01+00:00" + "time": "2023-09-04T12:20:53+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", - "version": "1.1.3", + "version": "1.1.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "a22b36b955a2e9a3d39fe533b6c1bb5359f9c319" + "reference": "089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/a22b36b955a2e9a3d39fe533b6c1bb5359f9c319", - "reference": "a22b36b955a2e9a3d39fe533b6c1bb5359f9c319", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa", + "reference": "089d8a8258ed0aeefdc7b68b6c3d25572ebfdbaa", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.10" + "phpstan/phpstan": "^1.10.3" }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2", @@ -156,9 +156,9 @@ "description": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.", "support": { "issues": "https://github.com/phpstan/phpstan-deprecation-rules/issues", - "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.1.3" + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.1.4" }, - "time": "2023-03-17T07:50:08+00:00" + "time": "2023-08-05T09:02:04+00:00" } ], "packages-dev": [], diff --git a/vendor-bin/psalm/composer.json b/vendor-bin/psalm/composer.json index 58847a5b4b..5ef8200c93 100644 --- a/vendor-bin/psalm/composer.json +++ b/vendor-bin/psalm/composer.json @@ -1,7 +1,7 @@ { "require": { "php": "^7.4 || ^8.0", - "vimeo/psalm": "^5.12.0" + "vimeo/psalm": "^5.15.0" }, "config": { "platform": { diff --git a/vendor-bin/psalm/composer.lock b/vendor-bin/psalm/composer.lock index dad3d53fce..b99f2ec160 100644 --- a/vendor-bin/psalm/composer.lock +++ b/vendor-bin/psalm/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "86309fa843bd1716e5cbefe131d15afc", + "content-hash": "c92d54202d70caf9276f2ad5d3097955", "packages": [ { "name": "amphp/amp", @@ -245,16 +245,16 @@ }, { "name": "composer/semver", - "version": "3.3.2", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", "shasum": "" }, "require": { @@ -304,9 +304,9 @@ "versioning" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" + "source": "https://github.com/composer/semver/tree/3.4.0" }, "funding": [ { @@ -322,7 +322,7 @@ "type": "tidelift" } ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2023-08-31T09:50:34+00:00" }, { "name": "composer/xdebug-handler", @@ -429,25 +429,29 @@ }, { "name": "doctrine/deprecations", - "version": "v1.1.0", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "8cffffb2218e01f3b370bf763e00e81697725259" + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/8cffffb2218e01f3b370bf763e00e81697725259", - "reference": "8cffffb2218e01f3b370bf763e00e81697725259", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", "shasum": "" }, "require": { - "php": "^7.1|^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^9", - "phpunit/phpunit": "^7.5|^8.5|^9.5", - "psr/log": "^1|^2|^3" + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" }, "suggest": { "psr/log": "Allows logging deprecations via PSR-3 logger implementation" @@ -466,9 +470,9 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v1.1.0" + "source": "https://github.com/doctrine/deprecations/tree/v1.1.1" }, - "time": "2023-05-29T18:55:17+00:00" + "time": "2023-06-03T09:27:29+00:00" }, { "name": "felixfbecker/advanced-json-rpc", @@ -685,16 +689,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.5", + "version": "v4.17.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", "shasum": "" }, "require": { @@ -735,9 +739,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" }, - "time": "2023-05-19T20:20:00+00:00" + "time": "2023-08-13T19:53:39+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -851,16 +855,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.7.2", + "version": "1.7.3", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d" + "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b2fe4d22a5426f38e014855322200b97b5362c0d", - "reference": "b2fe4d22a5426f38e014855322200b97b5362c0d", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", + "reference": "3219c6ee25c9ea71e3d9bbaf39c67c9ebd499419", "shasum": "" }, "require": { @@ -903,22 +907,22 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.2" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.3" }, - "time": "2023-05-30T18:13:47+00:00" + "time": "2023-08-12T11:01:26+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "1.22.0", + "version": "1.23.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "ec58baf7b3c7f1c81b3b00617c953249fb8cf30c" + "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/ec58baf7b3c7f1c81b3b00617c953249fb8cf30c", - "reference": "ec58baf7b3c7f1c81b3b00617c953249fb8cf30c", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/846ae76eef31c6d7790fac9bc399ecee45160b26", + "reference": "846ae76eef31c6d7790fac9bc399ecee45160b26", "shasum": "" }, "require": { @@ -950,9 +954,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.23.1" }, - "time": "2023-06-01T12:35:21+00:00" + "time": "2023-08-03T16:32:59+00:00" }, { "name": "psr/container", @@ -1184,16 +1188,16 @@ }, { "name": "symfony/console", - "version": "v5.4.24", + "version": "v5.4.28", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8" + "reference": "f4f71842f24c2023b91237c72a365306f3c58827" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", - "reference": "560fc3ed7a43e6d30ea94a07d77f9a60b8ed0fb8", + "url": "https://api.github.com/repos/symfony/console/zipball/f4f71842f24c2023b91237c72a365306f3c58827", + "reference": "f4f71842f24c2023b91237c72a365306f3c58827", "shasum": "" }, "require": { @@ -1263,7 +1267,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.24" + "source": "https://github.com/symfony/console/tree/v5.4.28" }, "funding": [ { @@ -1279,7 +1283,7 @@ "type": "tidelift" } ], - "time": "2023-05-26T05:13:16+00:00" + "time": "2023-08-07T06:12:30+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1350,16 +1354,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.4.23", + "version": "v5.4.25", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5" + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", - "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", + "reference": "0ce3a62c9579a53358d3a7eb6b3dfb79789a6364", "shasum": "" }, "require": { @@ -1394,7 +1398,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.23" + "source": "https://github.com/symfony/filesystem/tree/v5.4.25" }, "funding": [ { @@ -1410,20 +1414,20 @@ "type": "tidelift" } ], - "time": "2023-03-02T11:38:35+00:00" + "time": "2023-05-31T13:04:02+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { @@ -1438,7 +1442,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1476,7 +1480,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -1492,20 +1496,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + "reference": "875e90aeea2777b6f135677f618529449334a612" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", "shasum": "" }, "require": { @@ -1517,7 +1521,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1557,7 +1561,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" }, "funding": [ { @@ -1573,20 +1577,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", "shasum": "" }, "require": { @@ -1598,7 +1602,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1641,7 +1645,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -1657,20 +1661,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { @@ -1685,7 +1689,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1724,7 +1728,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -1740,20 +1744,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", "shasum": "" }, "require": { @@ -1762,7 +1766,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1803,7 +1807,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" }, "funding": [ { @@ -1819,20 +1823,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", "shasum": "" }, "require": { @@ -1841,7 +1845,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1886,7 +1890,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, "funding": [ { @@ -1902,7 +1906,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/service-contracts", @@ -1989,16 +1993,16 @@ }, { "name": "symfony/string", - "version": "v5.4.22", + "version": "v5.4.26", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62" + "reference": "1181fe9270e373537475e826873b5867b863883c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", + "url": "https://api.github.com/repos/symfony/string/zipball/1181fe9270e373537475e826873b5867b863883c", + "reference": "1181fe9270e373537475e826873b5867b863883c", "shasum": "" }, "require": { @@ -2055,7 +2059,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.22" + "source": "https://github.com/symfony/string/tree/v5.4.26" }, "funding": [ { @@ -2071,20 +2075,20 @@ "type": "tidelift" } ], - "time": "2023-03-14T06:11:53+00:00" + "time": "2023-06-28T12:46:07+00:00" }, { "name": "vimeo/psalm", - "version": "5.12.0", + "version": "5.15.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "f90118cdeacd0088e7215e64c0c99ceca819e176" + "reference": "5c774aca4746caf3d239d9c8cadb9f882ca29352" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/f90118cdeacd0088e7215e64c0c99ceca819e176", - "reference": "f90118cdeacd0088e7215e64c0c99ceca819e176", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/5c774aca4746caf3d239d9c8cadb9f882ca29352", + "reference": "5c774aca4746caf3d239d9c8cadb9f882ca29352", "shasum": "" }, "require": { @@ -2105,13 +2109,16 @@ "felixfbecker/language-server-protocol": "^1.5.2", "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.14", - "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", + "nikic/php-parser": "^4.16", + "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", "sebastian/diff": "^4.0 || ^5.0", "spatie/array-to-xml": "^2.17.0 || ^3.0", "symfony/console": "^4.1.6 || ^5.0 || ^6.0", "symfony/filesystem": "^5.4 || ^6.0" }, + "conflict": { + "nikic/php-parser": "4.17.0" + }, "provide": { "psalm/psalm": "self.version" }, @@ -2175,9 +2182,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/5.12.0" + "source": "https://github.com/vimeo/psalm/tree/5.15.0" }, - "time": "2023-05-22T21:19:03+00:00" + "time": "2023-08-20T23:07:30+00:00" }, { "name": "webmozart/assert", diff --git a/vendor-bin/rector/composer.json b/vendor-bin/rector/composer.json index 2f7ecbbd57..18424d46ab 100644 --- a/vendor-bin/rector/composer.json +++ b/vendor-bin/rector/composer.json @@ -1,7 +1,7 @@ { "require": { "php": "^8.1", - "rector/rector": "^0.17.0" + "rector/rector": "^0.18.1" }, "config": { "platform": { diff --git a/vendor-bin/rector/composer.lock b/vendor-bin/rector/composer.lock index a9e8a017ac..acc90bec5c 100644 --- a/vendor-bin/rector/composer.lock +++ b/vendor-bin/rector/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "96df4562e61b7e6a3e8f8a2651ffb449", + "content-hash": "dd4072cf57d54447f34914509c1999ed", "packages": [ { "name": "phpstan/phpstan", - "version": "1.10.15", + "version": "1.10.32", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "762c4dac4da6f8756eebb80e528c3a47855da9bd" + "reference": "c47e47d3ab03137c0e121e77c4d2cb58672f6d44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/762c4dac4da6f8756eebb80e528c3a47855da9bd", - "reference": "762c4dac4da6f8756eebb80e528c3a47855da9bd", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c47e47d3ab03137c0e121e77c4d2cb58672f6d44", + "reference": "c47e47d3ab03137c0e121e77c4d2cb58672f6d44", "shasum": "" }, "require": { @@ -66,25 +66,25 @@ "type": "tidelift" } ], - "time": "2023-05-09T15:28:01+00:00" + "time": "2023-08-24T21:54:50+00:00" }, { "name": "rector/rector", - "version": "0.17.0", + "version": "0.18.1", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "d8da002b107c9b64d464bb48101290d4d078df4b" + "reference": "ee72ef542680a7f47ed8c6784f78b032c0d2f381" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/d8da002b107c9b64d464bb48101290d4d078df4b", - "reference": "d8da002b107c9b64d464bb48101290d4d078df4b", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/ee72ef542680a7f47ed8c6784f78b032c0d2f381", + "reference": "ee72ef542680a7f47ed8c6784f78b032c0d2f381", "shasum": "" }, "require": { "php": "^7.2|^8.0", - "phpstan/phpstan": "^1.10.15" + "phpstan/phpstan": "^1.10.31" }, "conflict": { "rector/rector-doctrine": "*", @@ -96,11 +96,6 @@ "bin/rector" ], "type": "library", - "extra": { - "branch-alias": { - "dev-main": "0.15-dev" - } - }, "autoload": { "files": [ "bootstrap.php" @@ -119,7 +114,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/0.17.0" + "source": "https://github.com/rectorphp/rector/tree/0.18.1" }, "funding": [ { @@ -127,7 +122,7 @@ "type": "github" } ], - "time": "2023-06-01T09:42:59+00:00" + "time": "2023-08-28T18:01:58+00:00" } ], "packages-dev": [],