From 4af320ca2f7cfa1d9b215ab56c7a0528b9c78199 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Nov 2022 23:23:56 +0100 Subject: [PATCH 01/22] composer(deps): bump phpstan/phpstan in /vendor-bin/phpstan (#532) --- vendor-bin/phpstan/composer.json | 2 +- vendor-bin/phpstan/composer.lock | 20 ++++++++------------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/vendor-bin/phpstan/composer.json b/vendor-bin/phpstan/composer.json index 526e373814..6f5ca2b0e7 100644 --- a/vendor-bin/phpstan/composer.json +++ b/vendor-bin/phpstan/composer.json @@ -2,7 +2,7 @@ "require": { "php": "^7.1 || ^8.0", "phpstan/extension-installer": "^1.1.0", - "phpstan/phpstan": "^0.12.99", + "phpstan/phpstan": "^0.12.100", "phpstan/phpstan-deprecation-rules": "^0.12.6" }, "config": { diff --git a/vendor-bin/phpstan/composer.lock b/vendor-bin/phpstan/composer.lock index b830f0e874..4683a2cb87 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": "6feb458185a9dd68bf51d3977c3070c4", + "content-hash": "98c8b515ce5fdac0bcbb29369b89f117", "packages": [ { "name": "phpstan/extension-installer", @@ -53,16 +53,16 @@ }, { "name": "phpstan/phpstan", - "version": "0.12.99", + "version": "0.12.100", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7" + "reference": "48236ddf823547081b2b153d1cd2994b784328c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b4d40f1d759942f523be267a1bab6884f46ca3f7", - "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/48236ddf823547081b2b153d1cd2994b784328c3", + "reference": "48236ddf823547081b2b153d1cd2994b784328c3", "shasum": "" }, "require": { @@ -93,7 +93,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.99" + "source": "https://github.com/phpstan/phpstan/tree/0.12.100" }, "funding": [ { @@ -104,16 +104,12 @@ "url": "https://github.com/phpstan", "type": "github" }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, { "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", "type": "tidelift" } ], - "time": "2021-09-12T20:09:55+00:00" + "time": "2022-11-01T09:52:08+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -180,5 +176,5 @@ "platform-overrides": { "php": "7.1.33" }, - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.3.0" } From dc3c3fad52250c572515419d8aa078acf57cac59 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Nov 2022 23:24:20 +0100 Subject: [PATCH 02/22] composer(deps): bump vimeo/psalm in /vendor-bin/psalm (#533) --- vendor-bin/psalm/composer.json | 2 +- vendor-bin/psalm/composer.lock | 39 +++++++++++++++++----------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/vendor-bin/psalm/composer.json b/vendor-bin/psalm/composer.json index 2fcdfc977b..a450150985 100644 --- a/vendor-bin/psalm/composer.json +++ b/vendor-bin/psalm/composer.json @@ -1,7 +1,7 @@ { "require": { "php": "^7.1 || ^8.0", - "vimeo/psalm": "^4.27.0" + "vimeo/psalm": "^4.29.0" }, "config": { "platform": { diff --git a/vendor-bin/psalm/composer.lock b/vendor-bin/psalm/composer.lock index 2493a49db5..2816b030fa 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": "e5ab88085c2741e554b071b1b224fd46", + "content-hash": "ba847d83e6a4f8528b44ec411e6b7a2c", "packages": [ { "name": "amphp/amp", @@ -654,16 +654,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.14.0", + "version": "v4.15.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", "shasum": "" }, "require": { @@ -704,9 +704,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" }, - "time": "2022-05-31T20:59:12+00:00" + "time": "2022-09-04T07:30:47+00:00" }, { "name": "openlss/lib-array2xml", @@ -1092,16 +1092,16 @@ }, { "name": "symfony/console", - "version": "v4.4.45", + "version": "v4.4.48", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "28b77970939500fb04180166a1f716e75a871ef8" + "reference": "8e70c1cab07ac641b885ce80385b9824a293c623" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/28b77970939500fb04180166a1f716e75a871ef8", - "reference": "28b77970939500fb04180166a1f716e75a871ef8", + "url": "https://api.github.com/repos/symfony/console/zipball/8e70c1cab07ac641b885ce80385b9824a293c623", + "reference": "8e70c1cab07ac641b885ce80385b9824a293c623", "shasum": "" }, "require": { @@ -1162,7 +1162,7 @@ "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/console/tree/v4.4.45" + "source": "https://github.com/symfony/console/tree/v4.4.48" }, "funding": [ { @@ -1178,7 +1178,7 @@ "type": "tidelift" } ], - "time": "2022-08-17T14:50:19+00:00" + "time": "2022-10-26T16:02:45+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1588,16 +1588,16 @@ }, { "name": "vimeo/psalm", - "version": "4.27.0", + "version": "4.29.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "faf106e717c37b8c81721845dba9de3d8deed8ff" + "reference": "7ec5ffbd5f68ae03782d7fd33fff0c45a69f95b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/faf106e717c37b8c81721845dba9de3d8deed8ff", - "reference": "faf106e717c37b8c81721845dba9de3d8deed8ff", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/7ec5ffbd5f68ae03782d7fd33fff0c45a69f95b3", + "reference": "7ec5ffbd5f68ae03782d7fd33fff0c45a69f95b3", "shasum": "" }, "require": { @@ -1636,6 +1636,7 @@ "phpdocumentor/reflection-docblock": "^5", "phpmyadmin/sql-parser": "5.1.0||dev-master", "phpspec/prophecy": ">=1.9.0", + "phpstan/phpdoc-parser": "1.2.* || 1.6.4", "phpunit/phpunit": "^9.0", "psalm/plugin-phpunit": "^0.16", "slevomat/coding-standard": "^7.0", @@ -1689,9 +1690,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.27.0" + "source": "https://github.com/vimeo/psalm/tree/4.29.0" }, - "time": "2022-08-31T13:47:09+00:00" + "time": "2022-10-11T17:09:17+00:00" }, { "name": "webmozart/assert", From 504778e7b251241f15c03638a517cc9aa3b7b1f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szabadi=20Istv=C3=A1n?= Date: Fri, 11 Nov 2022 22:58:05 +0100 Subject: [PATCH 03/22] Update Person.php (#535) --- src/Faker/Provider/hu_HU/Person.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Faker/Provider/hu_HU/Person.php b/src/Faker/Provider/hu_HU/Person.php index a4d1274fe4..76d84be07a 100644 --- a/src/Faker/Provider/hu_HU/Person.php +++ b/src/Faker/Provider/hu_HU/Person.php @@ -21,7 +21,7 @@ class Person extends \Faker\Provider\Person '{{title}} {{lastName}} {{firstNameFemale}}', '{{lastName}} {{firstNameFemale}} {{suffix}}', '{{title}} {{lastName}} {{firstNameFemale}} {{suffix}}', - '{{lastNameFemaleMarried}} {{$lastName}} {{firstNameFemale}}', + '{{lastNameFemaleMarried}} {{lastName}} {{firstNameFemale}}', '{{title}} {{lastNameFemaleMarried}} {{firstNameFemale}}', '{{lastName}} {{firstNameMaleNe}}', '{{title}} {{lastName}} {{firstNameMaleNe}}', From 318450f4373d7967bb41b52e11b28c7b345592e0 Mon Sep 17 00:00:00 2001 From: Romain Monteil Date: Sat, 3 Dec 2022 15:38:04 +0100 Subject: [PATCH 04/22] Update French regions list, remove TOM (#540) --- src/Faker/Provider/fr_FR/Address.php | 12 ++++++------ test/Faker/Provider/fr_FR/AddressTest.php | 11 ++++++++--- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/Faker/Provider/fr_FR/Address.php b/src/Faker/Provider/fr_FR/Address.php index 5ca40ad9d9..106f648cca 100644 --- a/src/Faker/Provider/fr_FR/Address.php +++ b/src/Faker/Provider/fr_FR/Address.php @@ -43,13 +43,13 @@ class Address extends \Faker\Provider\Address 'Territoire britannique de l\'océan Indien', 'Territoires français du sud', 'Thailande', 'Timor', 'Togo', 'Tokelau', 'Tonga', 'Trinité et Tobago', 'Tunisie', 'Turkménistan', 'Turks et Caïques (Îles)', 'Turquie', 'Tuvalu', 'Ukraine', 'Uruguay', 'Vanuatu', 'Vatican (Etat du)', 'Venezuela', 'Vierges (Îles)', 'Vierges britanniques (Îles)', 'Vietnam', 'Wallis et Futuna (Îles)', 'Yemen', 'Yougoslavie', 'Zambie', 'Zaïre', 'Zimbabwe', ]; + /** + * @see https://en.wikipedia.org/wiki/Regions_of_France + */ private static $regions = [ - 'Alsace', 'Aquitaine', 'Auvergne', 'Bourgogne', 'Bretagne', 'Centre', 'Champagne-Ardenne', - 'Corse', 'Franche-Comté', 'Île-de-France', 'Languedoc-Roussillon', 'Limousin', - 'Lorraine', 'Midi-Pyrénées', 'Nord-Pas-de-Calais', 'Basse-Normandie', 'Haute-Normandie', - 'Pays-de-Loire', 'Picardie', 'Poitou-Charentes', "Provence-Alpes-Côte d'Azur", 'Rhone-Alpes', - 'Guadeloupe', 'Martinique', 'Guyane', 'Réunion', 'Saint-Pierre-et-Miquelon', 'Mayotte', - 'Saint-Barthélémy', 'Saint-Martin', 'Wallis-et-Futuna', 'Polynésie française', 'Nouvelle-Calédonie', + 'Auvergne-Rhône-Alpes', 'Bourgogne-Franche-Comté', 'Bretagne', 'Centre-Val de Loire', 'Corse', 'Grand Est', 'Hauts-de-France', + 'Île-de-France', 'Normandie', 'Nouvelle-Aquitaine', 'Occitanie', 'Pays de la Loire', "Provence-Alpes-Côte d'Azur", + 'Guadeloupe', 'Martinique', 'Guyane', 'La Réunion', 'Mayotte', ]; private static $departments = [ diff --git a/test/Faker/Provider/fr_FR/AddressTest.php b/test/Faker/Provider/fr_FR/AddressTest.php index 76c71692ff..04c05fec62 100644 --- a/test/Faker/Provider/fr_FR/AddressTest.php +++ b/test/Faker/Provider/fr_FR/AddressTest.php @@ -12,9 +12,14 @@ final class AddressTest extends TestCase { public function testSecondaryAddress() { - $secondaryAdress = $this->faker->secondaryAddress(); - self::assertNotEmpty($secondaryAdress); - self::assertIsString($secondaryAdress); + self::assertEquals('Étage 007', $this->faker->secondaryAddress()); + self::assertEquals('Bât. 932', $this->faker->secondaryAddress()); + } + + public function testRegion() + { + self::assertEquals('Occitanie', $this->faker->region()); + self::assertEquals('Auvergne-Rhône-Alpes', $this->faker->region()); } protected function getProviders(): iterable From e0e875cd41c2d76e694dda5773f11f5b910306fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Dec 2022 14:32:09 +0100 Subject: [PATCH 05/22] composer(deps): bump vimeo/psalm in /vendor-bin/psalm (#541) Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 4.29.0 to 4.30.0. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/4.29.0...4.30.0) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- vendor-bin/psalm/composer.json | 2 +- vendor-bin/psalm/composer.lock | 94 +++++++++++++++++----------------- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/vendor-bin/psalm/composer.json b/vendor-bin/psalm/composer.json index a450150985..b1919e01c7 100644 --- a/vendor-bin/psalm/composer.json +++ b/vendor-bin/psalm/composer.json @@ -1,7 +1,7 @@ { "require": { "php": "^7.1 || ^8.0", - "vimeo/psalm": "^4.29.0" + "vimeo/psalm": "^4.30.0" }, "config": { "platform": { diff --git a/vendor-bin/psalm/composer.lock b/vendor-bin/psalm/composer.lock index 2816b030fa..c6d4b5b6e8 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": "ba847d83e6a4f8528b44ec411e6b7a2c", + "content-hash": "c06b8d5f9750932bd65c549e1674c120", "packages": [ { "name": "amphp/amp", @@ -654,16 +654,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.1", + "version": "v4.15.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" + "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", - "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", + "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", "shasum": "" }, "require": { @@ -704,9 +704,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2" }, - "time": "2022-09-04T07:30:47+00:00" + "time": "2022-11-12T15:38:23+00:00" }, { "name": "openlss/lib-array2xml", @@ -1092,16 +1092,16 @@ }, { "name": "symfony/console", - "version": "v4.4.48", + "version": "v4.4.49", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "8e70c1cab07ac641b885ce80385b9824a293c623" + "reference": "33fa45ffc81fdcc1ca368d4946da859c8cdb58d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8e70c1cab07ac641b885ce80385b9824a293c623", - "reference": "8e70c1cab07ac641b885ce80385b9824a293c623", + "url": "https://api.github.com/repos/symfony/console/zipball/33fa45ffc81fdcc1ca368d4946da859c8cdb58d9", + "reference": "33fa45ffc81fdcc1ca368d4946da859c8cdb58d9", "shasum": "" }, "require": { @@ -1162,7 +1162,7 @@ "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/console/tree/v4.4.48" + "source": "https://github.com/symfony/console/tree/v4.4.49" }, "funding": [ { @@ -1178,20 +1178,20 @@ "type": "tidelift" } ], - "time": "2022-10-26T16:02:45+00:00" + "time": "2022-11-05T17:10:16+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { @@ -1206,7 +1206,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1244,7 +1244,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -1260,20 +1260,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -1288,7 +1288,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1327,7 +1327,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -1343,20 +1343,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", "shasum": "" }, "require": { @@ -1365,7 +1365,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1406,7 +1406,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" }, "funding": [ { @@ -1422,20 +1422,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, "require": { @@ -1444,7 +1444,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1489,7 +1489,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" }, "funding": [ { @@ -1505,7 +1505,7 @@ "type": "tidelift" } ], - "time": "2022-05-10T07:21:04+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/service-contracts", @@ -1588,16 +1588,16 @@ }, { "name": "vimeo/psalm", - "version": "4.29.0", + "version": "4.30.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "7ec5ffbd5f68ae03782d7fd33fff0c45a69f95b3" + "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/7ec5ffbd5f68ae03782d7fd33fff0c45a69f95b3", - "reference": "7ec5ffbd5f68ae03782d7fd33fff0c45a69f95b3", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/d0bc6e25d89f649e4f36a534f330f8bb4643dd69", + "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69", "shasum": "" }, "require": { @@ -1690,9 +1690,9 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.29.0" + "source": "https://github.com/vimeo/psalm/tree/4.30.0" }, - "time": "2022-10-11T17:09:17+00:00" + "time": "2022-11-06T20:37:08+00:00" }, { "name": "webmozart/assert", From 2f81438b4bafb1bb3ba5235001f2a911ccf145c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Tue, 6 Dec 2022 11:44:30 +0100 Subject: [PATCH 06/22] Fix: Do not use deprecated set-output command (#544) --- .github/workflows/branch-alias.yml | 2 +- .github/workflows/code-coverage.yml | 2 +- .github/workflows/coding-standards.yml | 2 +- .github/workflows/static-analysis.yml | 4 ++-- .github/workflows/tests.yml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/branch-alias.yml b/.github/workflows/branch-alias.yml index 3a475ad945..baa66cdc95 100644 --- a/.github/workflows/branch-alias.yml +++ b/.github/workflows/branch-alias.yml @@ -28,7 +28,7 @@ jobs: echo "Last tag was $TAG" ARR=(${TAG//./ }) ARR[1]=$((${ARR[1]}+1)) - echo ::set-output name=alias::${ARR[0]}.${ARR[1]} + echo "name=alias::${ARR[0]}.${ARR[1]}" >> $GITHUB_OUTPUT - name: Update branch alias run: | diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index f51c2e1a83..a08c360ad6 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -31,7 +31,7 @@ jobs: - name: Get composer cache directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies uses: actions/cache@v3 diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 62d69906e8..bd8910280d 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -31,7 +31,7 @@ jobs: - name: Determine composer cache directory id: composer-cache - run: echo "::set-output name=directory::$(composer config cache-dir)" + run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies installed with composer uses: actions/cache@v3 diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 4c2b7c26d9..4921e502c0 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -30,7 +30,7 @@ jobs: - name: Determine composer cache directory id: composer-cache - run: echo "::set-output name=directory::$(composer config cache-dir)" + run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies installed with composer uses: actions/cache@v3 @@ -72,7 +72,7 @@ jobs: - name: Determine composer cache directory id: composer-cache - run: echo "::set-output name=directory::$(composer config cache-dir)" + run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies installed with composer uses: actions/cache@v3 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e63cb93784..c2e04b26a4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,7 +43,7 @@ jobs: - name: Get composer cache directory id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies uses: actions/cache@v3 From ca8f1cc85d68f6613f5eb4a1dc6c22efe6739c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Tue, 6 Dec 2022 11:44:41 +0100 Subject: [PATCH 07/22] Fix: Do not bother running tests on Windows (#547) --- .github/workflows/tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c2e04b26a4..1ab7ef17f2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,9 +24,6 @@ jobs: - '7.4' - '8.0' - '8.1' - include: - - operating-system: 'windows-latest' - php-version: '7.1' runs-on: ${{ matrix.operating-system }} From 65f2e71fe99a6ae7b5b638290882f74e93247220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Tue, 6 Dec 2022 15:52:50 +0100 Subject: [PATCH 08/22] Fix: Streamline caching dependencies installed with composer (#545) --- .github/workflows/code-coverage.yml | 8 ++++---- .github/workflows/tests.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index a08c360ad6..e0b61d8ed8 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -29,14 +29,14 @@ jobs: extensions: intl php-version: ${{ matrix.php-version }} - - name: Get composer cache directory + - name: Determine composer cache directory id: composer-cache - run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT - - name: Cache dependencies + - name: Cache dependencies installed with composer uses: actions/cache@v3 with: - path: ${{ steps.composer-cache.outputs.dir }} + path: ${{ steps.composer-cache.outputs.directory }} key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }} restore-keys: | composer-${{ runner.os }}-${{ matrix.php-version }}- diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1ab7ef17f2..679db06763 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -38,14 +38,14 @@ jobs: extensions: intl php-version: ${{ matrix.php-version }} - - name: Get composer cache directory + - name: Determine composer cache directory id: composer-cache - run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT - - name: Cache dependencies + - name: Cache dependencies installed with composer uses: actions/cache@v3 with: - path: ${{ steps.composer-cache.outputs.dir }} + path: ${{ steps.composer-cache.outputs.directory }} key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }} restore-keys: | composer-${{ runner.os }}-${{ matrix.php-version }}- From c9dec13f35cf84621e4dbd45a5d5228da1ece8c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 7 Dec 2022 14:35:49 +0100 Subject: [PATCH 09/22] Enhancement: Lint YAML files (#548) * Enhancement: Lint YAML files * Fix: Consistently quote strings in YAML files * Fix: Remove extra empty lines * Fix: Ignore truthy rule for 'on' * Fix: Use explicit null --- .gitattributes | 1 + .github/stale.yml | 6 +- .github/workflows/bc-check.yml | 19 +++--- .github/workflows/branch-alias.yml | 48 +++++++-------- .github/workflows/code-coverage.yml | 46 +++++++-------- .github/workflows/coding-standards.yml | 66 +++++++++++++-------- .github/workflows/static-analysis.yml | 81 +++++++++++++------------- .github/workflows/tests.yml | 68 ++++++++++----------- .yamllint.yaml | 67 +++++++++++++++++++++ 9 files changed, 242 insertions(+), 160 deletions(-) create mode 100644 .yamllint.yaml diff --git a/.gitattributes b/.gitattributes index 85331d3511..5ee738da79 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,6 +5,7 @@ /.gitattributes export-ignore /.gitignore export-ignore /.php-cs-fixer.dist.php export-ignore +/.yamllint.yaml export-ignore /codecov.yml export-ignore /Makefile export-ignore /phpstan-baseline.neon export-ignore diff --git a/.github/stale.yml b/.github/stale.yml index 682c292e9a..38bea83155 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -1,10 +1,10 @@ daysUntilStale: 14 daysUntilClose: 7 exemptLabels: - - pinned - - security + - "pinned" + - "security" # Label to use when marking an issue as stale -staleLabel: lifecycle/stale +staleLabel: "lifecycle/stale" # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > This issue has been automatically marked as stale because it has not had diff --git a/.github/workflows/bc-check.yml b/.github/workflows/bc-check.yml index 437086ef28..aa88363fa7 100644 --- a/.github/workflows/bc-check.yml +++ b/.github/workflows/bc-check.yml @@ -1,21 +1,20 @@ - -on: - pull_request: +on: # yamllint disable-line rule:truthy + pull_request: ~ push: branches: - "main" - "[0-9].*" -name: BC Check +name: "BC Check" jobs: roave-bc-check: - name: Roave BC Check - runs-on: ubuntu-latest + name: "Roave BC Check" + runs-on: "ubuntu-latest" steps: - - name: Checkout code - uses: actions/checkout@v3 + - name: "Checkout code" + uses: "actions/checkout@v3" - - name: Roave BC Check - uses: docker://nyholm/roave-bc-check-ga + - name: "Roave BC Check" + uses: "docker://nyholm/roave-bc-check-ga" diff --git a/.github/workflows/branch-alias.yml b/.github/workflows/branch-alias.yml index baa66cdc95..dcd71f1107 100644 --- a/.github/workflows/branch-alias.yml +++ b/.github/workflows/branch-alias.yml @@ -1,28 +1,28 @@ -name: Update branch alias +name: "Update branch alias" -on: +on: # yamllint disable-line rule:truthy push: - tags: ['*'] + tags: ["*"] jobs: branch-alias: - name: Update branch alias - runs-on: ubuntu-latest + name: "Update branch alias" + runs-on: "ubuntu-latest" steps: - - name: Set up PHP - uses: shivammathur/setup-php@v2 + - name: "Set up PHP" + uses: "shivammathur/setup-php@v2" with: - php-version: 7.4 - coverage: none + php-version: "7.4" + coverage: "none" - - name: Checkout code - uses: actions/checkout@v3 + - name: "Checkout code" + uses: "actions/checkout@v3" with: - ref: main + ref: "main" - - name: Find branch alias - id: find_alias + - name: "Find branch alias" + id: "find_alias" run: | TAG=$(echo $GITHUB_REF | cut -d'/' -f 3) echo "Last tag was $TAG" @@ -30,7 +30,7 @@ jobs: ARR[1]=$((${ARR[1]}+1)) echo "name=alias::${ARR[0]}.${ARR[1]}" >> $GITHUB_OUTPUT - - name: Update branch alias + - name: "Update branch alias" run: | CURRENT_ALIAS=$(composer config extra.branch-alias.dev-main | cut -d'-' -f 1) @@ -53,15 +53,15 @@ jobs: composer config extra.branch-alias.dev-main ${{ steps.find_alias.outputs.alias }}-dev - - name: Create Pull Request - uses: peter-evans/create-pull-request@v4 + - name: "Create Pull Request" + uses: "peter-evans/create-pull-request@v4" with: - base: main - branch: branch-alias-update - author: GitHub - committer: GitHub - commit-message: Updating branch alias to ${{ steps.find_alias.outputs.alias }} - title: Update branch alias - labels: pinned, do not merge + base: "main" + branch: "branch-alias-update" + author: "GitHub " + committer: "GitHub " + commit-message: "Updating branch alias to ${{ steps.find_alias.outputs.alias }}" + title: "Update branch alias" + labels: "pinned, do not merge" body: | Since we just tagged a new version, we need to update composer.json branch alias. This should not be merged until there are new features, as it would prevent patch releases. diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index e0b61d8ed8..ede5bbdadf 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -1,57 +1,57 @@ -on: - pull_request: +on: # yamllint disable-line rule:truthy + pull_request: ~ push: branches: - "main" - "[0-9].*" -name: Code Coverage +name: "Code Coverage" jobs: code-coverage: - name: Code Coverage + name: "Code Coverage" strategy: matrix: php-version: - - '8.0' + - "8.0" - runs-on: ubuntu-latest + runs-on: "ubuntu-latest" steps: - - name: Checkout code - uses: actions/checkout@v3 + - name: "Checkout code" + uses: "actions/checkout@v3" - - name: Install PHP with extensions - uses: shivammathur/setup-php@v2 + - name: "Install PHP with extensions" + uses: "shivammathur/setup-php@v2" with: - coverage: pcov - extensions: intl - php-version: ${{ matrix.php-version }} + coverage: "pcov" + extensions: "intl" + php-version: "${{ matrix.php-version }}" - - name: Determine composer cache directory - id: composer-cache - run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT + - name: "Determine composer cache directory" + id: "composer-cache" + run: "echo \"directory=$(composer config cache-dir)\" >> $GITHUB_OUTPUT" - - name: Cache dependencies installed with composer - uses: actions/cache@v3 + - name: "Cache dependencies installed with composer" + uses: "actions/cache@v3" with: - path: ${{ steps.composer-cache.outputs.directory }} - key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }} + path: "${{ steps.composer-cache.outputs.directory }}" + key: "composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}" restore-keys: | composer-${{ runner.os }}-${{ matrix.php-version }}- composer-${{ runner.os }}- composer- - - name: Download dependencies + - name: "Download dependencies" run: | composer update --no-interaction --no-progress --optimize-autoloader vendor/bin/simple-phpunit install - - name: Collect code coverage with PHPUnit + - name: "Collect code coverage with PHPUnit" run: | vendor/bin/simple-phpunit --coverage-clover=.build/logs/clover.xml - - name: Send code coverage report to codecov.io + - name: "Send code coverage report to codecov.io" run: | bash <(curl -s https://codecov.io/bash) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index bd8910280d..fbff43227d 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -1,63 +1,79 @@ -on: +on: # yamllint disable-line rule:truthy pull_request: ~ push: branches: - "main" - "[0-9].*" -name: Coding Standards +name: "Coding Standards" jobs: php-cs-fixer: - name: php-cs-fixer + name: "php-cs-fixer" - runs-on: ubuntu-latest + runs-on: "ubuntu-latest" strategy: matrix: php-version: - - 7.1 + - "7.1" steps: - - name: Checkout code - uses: actions/checkout@v3 + - name: "Checkout code" + uses: "actions/checkout@v3" - - name: Set up PHP - uses: shivammathur/setup-php@v2 + - name: "Set up PHP" + uses: "shivammathur/setup-php@v2" with: - coverage: none - extensions: intl - php-version: ${{ matrix.php-version }} + coverage: "none" + extensions: "intl" + php-version: "${{ matrix.php-version }}" - - name: Determine composer cache directory - id: composer-cache - run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT + - name: "Determine composer cache directory" + id: "composer-cache" + run: "echo \"directory=$(composer config cache-dir)\" >> $GITHUB_OUTPUT" - - name: Cache dependencies installed with composer - uses: actions/cache@v3 + - name: "Cache dependencies installed with composer" + uses: "actions/cache@v3" with: - path: ${{ steps.composer-cache.outputs.directory }} - key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }} + path: "${{ steps.composer-cache.outputs.directory }}" + key: "composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}" restore-keys: | composer-${{ runner.os }}-${{ matrix.php-version }}- composer-${{ runner.os }}- composer- - - name: Download dependencies + - name: "Download dependencies" run: | composer update --no-interaction --no-progress --optimize-autoloader composer bin php-cs-fixer install --no-interaction --no-progress --optimize-autoloader - - name: Cache cache file for php-cs-fixer - uses: actions/cache@v3 + - name: "Cache cache file for php-cs-fixer" + uses: "actions/cache@v3" with: - path: .php_cs.cache - key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }} + path: ".php_cs.cache" + key: "composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}" restore-keys: | composer-${{ runner.os }}-${{ matrix.php-version }}- composer-${{ runner.os }}- composer- - - name: Run php-cs-fixer + - name: "Run php-cs-fixer" run: | vendor/bin/php-cs-fixer fix --diff --dry-run --verbose + + yamllint: + name: "yamllint" + + runs-on: "ubuntu-latest" + + steps: + - name: "Checkout code" + uses: "actions/checkout@v3" + + - name: "Lint YAML files" + uses: "ibiqlik/action-yamllint@v3.1.1" + with: + config_file: ".yamllint.yaml" + file_or_dir: "." + strict: true diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 4921e502c0..ddc9730067 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -1,94 +1,93 @@ - -on: +on: # yamllint disable-line rule:truthy pull_request: ~ push: branches: - "main" - "[0-9].*" -name: Static analysis +name: "Static analysis" jobs: phpstan: - name: PHPStan - runs-on: ubuntu-latest + name: "PHPStan" + runs-on: "ubuntu-latest" strategy: matrix: - php-version: [7.4] + php-version: ["7.4"] steps: - - name: Checkout code - uses: actions/checkout@v3 + - name: "Checkout code" + uses: "actions/checkout@v3" - - name: Set up PHP - uses: shivammathur/setup-php@v2 + - name: "Set up PHP" + uses: "shivammathur/setup-php@v2" with: - coverage: none - extensions: intl - php-version: ${{ matrix.php-version }} + coverage: "none" + extensions: "intl" + php-version: "${{ matrix.php-version }}" - - name: Determine composer cache directory - id: composer-cache - run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT + - name: "Determine composer cache directory" + id: "composer-cache" + run: "echo \"directory=$(composer config cache-dir)\" >> $GITHUB_OUTPUT" - - name: Cache dependencies installed with composer - uses: actions/cache@v3 + - name: "Cache dependencies installed with composer" + uses: "actions/cache@v3" with: - path: ${{ steps.composer-cache.outputs.directory }} - key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }} + path: "${{ steps.composer-cache.outputs.directory }}" + key: "composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}" restore-keys: | composer-${{ runner.os }}-${{ matrix.php-version }}- composer-${{ runner.os }}- composer- - - name: Download dependencies + - name: "Download dependencies" run: | composer update --no-interaction --no-progress --optimize-autoloader composer bin phpstan install --no-interaction --no-progress --optimize-autoloader - - name: Run PHPStan + - name: "Run PHPStan" run: | vendor/bin/phpstan --no-progress psalm: - name: Psalm - runs-on: ubuntu-latest + name: "Psalm" + runs-on: "ubuntu-latest" strategy: matrix: - php-version: [7.4] + php-version: ["7.4"] steps: - - name: Checkout - uses: actions/checkout@v3 + - name: "Checkout" + uses: "actions/checkout@v3" - - name: Install PHP with extensions - uses: shivammathur/setup-php@v2 + - name: "Install PHP with extensions" + uses: "shivammathur/setup-php@v2" with: - coverage: none - extensions: intl - php-version: ${{ matrix.php-version }} + coverage: "none" + extensions: "intl" + php-version: "${{ matrix.php-version }}" - - name: Determine composer cache directory - id: composer-cache - run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT + - name: "Determine composer cache directory" + id: "composer-cache" + run: "echo \"directory=$(composer config cache-dir)\" >> $GITHUB_OUTPUT" - - name: Cache dependencies installed with composer - uses: actions/cache@v3 + - name: "Cache dependencies installed with composer" + uses: "actions/cache@v3" with: - path: ${{ steps.composer-cache.outputs.directory }} - key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }} + path: "${{ steps.composer-cache.outputs.directory }}" + key: "composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}" restore-keys: | composer-${{ runner.os }}-${{ matrix.php-version }}- composer-${{ runner.os }}- composer- - - name: Download dependencies + - name: "Download dependencies" run: | composer update --no-interaction --no-progress --optimize-autoloader composer bin psalm install --no-interaction --no-progress --optimize-autoloader - - name: Run Psalm + - name: "Run Psalm" run: | vendor/bin/psalm --no-progress --output-format=github --shepherd diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 679db06763..7f435c4aaf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,64 +1,64 @@ # https://help.github.com/en/categories/automating-your-workflow-with-github-actions -on: - pull_request: +on: # yamllint disable-line rule:truthy + pull_request: ~ push: branches: - "main" - "[0-9].*" -name: Tests +name: "Tests" jobs: phpunit: - name: PHPUnit on ${{ matrix.operating-system }} with PHP ${{ matrix.php-version }} + name: "PHPUnit on ${{ matrix.operating-system }} with PHP ${{ matrix.php-version }}" strategy: matrix: operating-system: - - 'ubuntu-latest' + - "ubuntu-latest" php-version: - - '7.1' - - '7.2' - - '7.3' - - '7.4' - - '8.0' - - '8.1' + - "7.1" + - "7.2" + - "7.3" + - "7.4" + - "8.0" + - "8.1" - runs-on: ${{ matrix.operating-system }} + runs-on: "${{ matrix.operating-system }}" steps: - - name: Checkout code - uses: actions/checkout@v3 + - name: "Checkout code" + uses: "actions/checkout@v3" - - name: Install PHP with extensions - uses: shivammathur/setup-php@v2 + - name: "Install PHP with extensions" + uses: "shivammathur/setup-php@v2" with: - coverage: none - extensions: intl - php-version: ${{ matrix.php-version }} + coverage: "none" + extensions: "intl" + php-version: "${{ matrix.php-version }}" - - name: Determine composer cache directory - id: composer-cache - run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT + - name: "Determine composer cache directory" + id: "composer-cache" + run: "echo \"directory=$(composer config cache-dir)\" >> $GITHUB_OUTPUT" - - name: Cache dependencies installed with composer - uses: actions/cache@v3 + - name: "Cache dependencies installed with composer" + uses: "actions/cache@v3" with: - path: ${{ steps.composer-cache.outputs.directory }} - key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }} + path: "${{ steps.composer-cache.outputs.directory }}" + key: "composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}" restore-keys: | composer-${{ runner.os }}-${{ matrix.php-version }}- composer-${{ runner.os }}- composer- - - name: Download dependencies - run: composer update --no-interaction --no-progress --optimize-autoloader + - name: "Download dependencies" + run: "composer update --no-interaction --no-progress --optimize-autoloader" - - name: Run tests - if: ${{ '8.1' != matrix.php-version }} - run: ./vendor/bin/simple-phpunit + - name: "Run tests" + if: "${{ '8.1' != matrix.php-version }}" + run: "./vendor/bin/simple-phpunit" - - name: Run tests for php 8.1 - if: ${{ '8.1' == matrix.php-version }} - run: SYMFONY_PHPUNIT_VERSION=9.5 ./vendor/bin/simple-phpunit + - name: "Run tests for php 8.1" + if: "${{ '8.1' == matrix.php-version }}" + run: "SYMFONY_PHPUNIT_VERSION=9.5 ./vendor/bin/simple-phpunit" diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000000..8409d5e3bf --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,67 @@ +extends: "default" + +ignore: | + .build/ + vendor/ + vendor-bin/ + roave-bc-check.yaml + +rules: + braces: + max-spaces-inside-empty: 0 + max-spaces-inside: 1 + min-spaces-inside-empty: 0 + min-spaces-inside: 1 + brackets: + max-spaces-inside-empty: 0 + max-spaces-inside: 0 + min-spaces-inside-empty: 0 + min-spaces-inside: 0 + colons: + max-spaces-after: 1 + max-spaces-before: 0 + commas: + max-spaces-after: 1 + max-spaces-before: 0 + min-spaces-after: 1 + comments: + ignore-shebangs: true + min-spaces-from-content: 1 + require-starting-space: true + comments-indentation: "enable" + document-end: + present: false + document-start: + present: false + indentation: + check-multi-line-strings: false + indent-sequences: true + spaces: 2 + empty-lines: + max-end: 0 + max-start: 0 + max: 1 + empty-values: + forbid-in-block-mappings: true + forbid-in-flow-mappings: true + hyphens: + max-spaces-after: 2 + key-duplicates: "enable" + key-ordering: "disable" + line-length: "disable" + new-line-at-end-of-file: "enable" + new-lines: + type: "unix" + octal-values: + forbid-implicit-octal: true + quoted-strings: + quote-type: "double" + trailing-spaces: "enable" + truthy: + allowed-values: + - "false" + - "true" + +yaml-files: + - "*.yaml" + - "*.yml" From 9b8d695f90456a15d30b78d72887feb817c3f35e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 7 Dec 2022 14:39:53 +0100 Subject: [PATCH 10/22] Fix: Drop support for PHP 7.1, 7.2, and 7.3 (#543) --- .github/workflows/coding-standards.yml | 2 +- .github/workflows/tests.yml | 3 --- CHANGELOG.md | 2 ++ README.md | 2 +- composer.json | 7 +++++-- vendor-bin/php-cs-fixer/composer.json | 4 ++-- vendor-bin/php-cs-fixer/composer.lock | 8 ++++---- vendor-bin/phpstan/composer.json | 4 ++-- vendor-bin/phpstan/composer.lock | 6 +++--- vendor-bin/psalm/composer.json | 4 ++-- vendor-bin/psalm/composer.lock | 6 +++--- 11 files changed, 25 insertions(+), 23 deletions(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index fbff43227d..81ea1d81f3 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: php-version: - - "7.1" + - "7.4" steps: - name: "Checkout code" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7f435c4aaf..5c87b52c54 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,9 +18,6 @@ jobs: operating-system: - "ubuntu-latest" php-version: - - "7.1" - - "7.2" - - "7.3" - "7.4" - "8.0" - "8.1" diff --git a/CHANGELOG.md b/CHANGELOG.md index 3350f92c70..2445daf3f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased](https://github.com/FakerPHP/Faker/compare/v1.20.0...main) +- Dropped support for PHP 7.1, 7.2, and 7.3 (#543) + ## [2022-07-20, v1.20.0](https://github.com/FakerPHP/Faker/compare/v1.19.0..v1.20.0) - Fixed typo in French phone number (#452) diff --git a/README.md b/README.md index 018c70bb7e..8958f9847d 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ It's heavily inspired by Perl's [Data::Faker](https://metacpan.org/pod/Data::Fak ### Installation -Faker requires PHP >= 7.1. +Faker requires PHP >= 7.4. ```shell composer require fakerphp/faker diff --git a/composer.json b/composer.json index 7c192ac7e4..392fb3c662 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.1 || ^8.0", + "php": "^7.4 || ^8.0", "psr/container": "^1.0 || ^2.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" }, @@ -50,7 +50,10 @@ "bamarni/composer-bin-plugin": true, "composer/package-versions-deprecated": true }, - "sort-packages": true + "sort-packages": true, + "platform": { + "php": "7.4.32" + } }, "extra": { "branch-alias": { diff --git a/vendor-bin/php-cs-fixer/composer.json b/vendor-bin/php-cs-fixer/composer.json index 9238d9f4ed..ca13f8edf8 100644 --- a/vendor-bin/php-cs-fixer/composer.json +++ b/vendor-bin/php-cs-fixer/composer.json @@ -1,11 +1,11 @@ { "require": { - "php": "^7.1 || ^8.0", + "php": "^7.4 || ^8.0", "friendsofphp/php-cs-fixer": "^3.3.0" }, "config": { "platform": { - "php": "7.1.33" + "php": "7.4.32" }, "preferred-install": "dist", "sort-packages": true diff --git a/vendor-bin/php-cs-fixer/composer.lock b/vendor-bin/php-cs-fixer/composer.lock index 1d97d1bfac..9e7c1851d5 100644 --- a/vendor-bin/php-cs-fixer/composer.lock +++ b/vendor-bin/php-cs-fixer/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": "c7ed5b5ca7a1a555f6841c04fb41da1d", + "content-hash": "5a3d8a39f5b3ca9b528e459bd7271808", "packages": [ { "name": "composer/semver", @@ -1713,11 +1713,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.1 || ^8.0" + "php": "^7.4 || ^8.0" }, "platform-dev": [], "platform-overrides": { - "php": "7.1.33" + "php": "7.4.32" }, - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.3.0" } diff --git a/vendor-bin/phpstan/composer.json b/vendor-bin/phpstan/composer.json index 6f5ca2b0e7..79431630dd 100644 --- a/vendor-bin/phpstan/composer.json +++ b/vendor-bin/phpstan/composer.json @@ -1,13 +1,13 @@ { "require": { - "php": "^7.1 || ^8.0", + "php": "^7.4 || ^8.0", "phpstan/extension-installer": "^1.1.0", "phpstan/phpstan": "^0.12.100", "phpstan/phpstan-deprecation-rules": "^0.12.6" }, "config": { "platform": { - "php": "7.1.33" + "php": "7.4.32" }, "preferred-install": "dist", "sort-packages": true, diff --git a/vendor-bin/phpstan/composer.lock b/vendor-bin/phpstan/composer.lock index 4683a2cb87..6cb5008177 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": "98c8b515ce5fdac0bcbb29369b89f117", + "content-hash": "7b6c08f79ca08061f5282b0ca46daf3c", "packages": [ { "name": "phpstan/extension-installer", @@ -170,11 +170,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.1 || ^8.0" + "php": "^7.4 || ^8.0" }, "platform-dev": [], "platform-overrides": { - "php": "7.1.33" + "php": "7.4.32" }, "plugin-api-version": "2.3.0" } diff --git a/vendor-bin/psalm/composer.json b/vendor-bin/psalm/composer.json index b1919e01c7..3f22978855 100644 --- a/vendor-bin/psalm/composer.json +++ b/vendor-bin/psalm/composer.json @@ -1,11 +1,11 @@ { "require": { - "php": "^7.1 || ^8.0", + "php": "^7.4 || ^8.0", "vimeo/psalm": "^4.30.0" }, "config": { "platform": { - "php": "7.1.33" + "php": "7.4.32" }, "preferred-install": "dist", "sort-packages": true, diff --git a/vendor-bin/psalm/composer.lock b/vendor-bin/psalm/composer.lock index c6d4b5b6e8..bd4c905f85 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": "c06b8d5f9750932bd65c549e1674c120", + "content-hash": "6440bd3321cecaca3d65a7d334326aab", "packages": [ { "name": "amphp/amp", @@ -1806,11 +1806,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.1 || ^8.0" + "php": "^7.4 || ^8.0" }, "platform-dev": [], "platform-overrides": { - "php": "7.1.33" + "php": "7.4.32" }, "plugin-api-version": "2.3.0" } From 02572a063ab47a14ac83ebb4737bddf3a17ca8da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Dec 2022 14:46:06 +0100 Subject: [PATCH 11/22] composer(deps): bump friendsofphp/php-cs-fixer from 3.3.0 to 3.13.0 in /vendor-bin/php-cs-fixer (#551) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * composer(deps): bump friendsofphp/php-cs-fixer Bumps [friendsofphp/php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) from 3.3.0 to 3.13.0. - [Release notes](https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases) - [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md) - [Commits](https://github.com/FriendsOfPHP/PHP-CS-Fixer/compare/v3.3.0...v3.13.0) --- updated-dependencies: - dependency-name: friendsofphp/php-cs-fixer dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Fix: Run 'make cs' Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andreas Möller --- src/Faker/Extension/Helper.php | 4 +- src/Faker/ORM/Propel/ColumnTypeGuesser.php | 8 +- src/Faker/ORM/Propel2/ColumnTypeGuesser.php | 2 +- src/Faker/Provider/en_GB/Company.php | 2 - src/Faker/Provider/fr_FR/Company.php | 1 + src/Faker/Provider/ro_RO/Person.php | 8 +- src/Faker/Provider/ru_RU/Company.php | 1 + src/Faker/Provider/tr_TR/Company.php | 1 + test/Faker/Extension/ContainerBuilderTest.php | 2 +- test/Faker/Provider/ro_RO/PersonTest.php | 2 + vendor-bin/php-cs-fixer/composer.json | 2 +- vendor-bin/php-cs-fixer/composer.lock | 1000 ++++++++++++----- 12 files changed, 722 insertions(+), 311 deletions(-) diff --git a/src/Faker/Extension/Helper.php b/src/Faker/Extension/Helper.php index 2820474cd4..27a66143fe 100644 --- a/src/Faker/Extension/Helper.php +++ b/src/Faker/Extension/Helper.php @@ -57,11 +57,9 @@ public static function numerify(string $string): string } } - $string = self::replaceWildcard($string, '%', static function () { + return self::replaceWildcard($string, '%', static function () { return mt_rand(1, 9); }); - - return $string; } /** diff --git a/src/Faker/ORM/Propel/ColumnTypeGuesser.php b/src/Faker/ORM/Propel/ColumnTypeGuesser.php index 2d05230b56..3d8a9a11e3 100644 --- a/src/Faker/ORM/Propel/ColumnTypeGuesser.php +++ b/src/Faker/ORM/Propel/ColumnTypeGuesser.php @@ -69,9 +69,9 @@ public function guessFormat(\ColumnMap $column) case \PropelColumnTypes::FLOAT: case \PropelColumnTypes::DOUBLE: case \PropelColumnTypes::REAL: - return static function () use ($generator) { - return $generator->randomFloat(); - }; + return static function () use ($generator) { + return $generator->randomFloat(); + }; case \PropelColumnTypes::CHAR: case \PropelColumnTypes::VARCHAR: @@ -102,7 +102,7 @@ public function guessFormat(\ColumnMap $column) case \PropelColumnTypes::OBJECT: case \PropelColumnTypes::PHP_ARRAY: default: - // no smart way to guess what the user expects here + // no smart way to guess what the user expects here return null; } } diff --git a/src/Faker/ORM/Propel2/ColumnTypeGuesser.php b/src/Faker/ORM/Propel2/ColumnTypeGuesser.php index 66e109c798..4c08e0ad3a 100644 --- a/src/Faker/ORM/Propel2/ColumnTypeGuesser.php +++ b/src/Faker/ORM/Propel2/ColumnTypeGuesser.php @@ -105,7 +105,7 @@ public function guessFormat(ColumnMap $column) case PropelTypes::OBJECT: case PropelTypes::PHP_ARRAY: default: - // no smart way to guess what the user expects here + // no smart way to guess what the user expects here return null; } } diff --git a/src/Faker/Provider/en_GB/Company.php b/src/Faker/Provider/en_GB/Company.php index e00b34c170..acf56e5bdd 100644 --- a/src/Faker/Provider/en_GB/Company.php +++ b/src/Faker/Provider/en_GB/Company.php @@ -21,7 +21,6 @@ class Company extends \Faker\Provider\Company public static function vat(string $type = null): string { switch ($type) { - case static::VAT_TYPE_BRANCH: return static::generateBranchTraderVatNumber(); @@ -33,7 +32,6 @@ public static function vat(string $type = null): string default: return static::generateStandardVatNumber(); - } } diff --git a/src/Faker/Provider/fr_FR/Company.php b/src/Faker/Provider/fr_FR/Company.php index fcc142dadb..0a659aa7c6 100644 --- a/src/Faker/Provider/fr_FR/Company.php +++ b/src/Faker/Provider/fr_FR/Company.php @@ -173,6 +173,7 @@ protected static function isCatchPhraseValid($catchPhrase) /** * @see http://www.pole-emploi.fr/candidat/le-code-rome-et-les-fiches-metiers-@/article.jspz?id=60702 + * * @note Randomly took 300 from this list */ protected static $jobTitleFormat = [ diff --git a/src/Faker/Provider/ro_RO/Person.php b/src/Faker/Provider/ro_RO/Person.php index d3b5a5ea2a..d8ef51d005 100644 --- a/src/Faker/Provider/ro_RO/Person.php +++ b/src/Faker/Provider/ro_RO/Person.php @@ -163,12 +163,12 @@ protected function getDateOfBirth($dateOfBirth) switch (count($dateOfBirthParts)) { case 1: $dateOfBirthParts[] = $baseDate->format('m'); - //don't break, we need the day also - // no break + //don't break, we need the day also + // no break case 2: $dateOfBirthParts[] = $baseDate->format('d'); - //don't break, next line will - // no break + //don't break, next line will + // no break case 3: break; diff --git a/src/Faker/Provider/ru_RU/Company.php b/src/Faker/Provider/ru_RU/Company.php index 25c5c8e9dc..9f5d572f40 100644 --- a/src/Faker/Provider/ru_RU/Company.php +++ b/src/Faker/Provider/ru_RU/Company.php @@ -44,6 +44,7 @@ class Company extends \Faker\Provider\Company /** * @see https://ru.wikipedia.org/wiki/%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%8F:%D0%9F%D1%80%D0%BE%D1%84%D0%B5%D1%81%D1%81%D0%B8%D0%B8 + * * @note Randomly took from this list - some jobs titles for each letter */ protected static $jobTitleFormat = [ diff --git a/src/Faker/Provider/tr_TR/Company.php b/src/Faker/Provider/tr_TR/Company.php index 1458bb8622..e7b7892c15 100644 --- a/src/Faker/Provider/tr_TR/Company.php +++ b/src/Faker/Provider/tr_TR/Company.php @@ -31,6 +31,7 @@ class Company extends \Faker\Provider\Company /** * @see https://tr.wikipedia.org/wiki/Meslekler_listesi + * * @note Randomly took 300 from this list */ protected static $jobTitleFormat = [ diff --git a/test/Faker/Extension/ContainerBuilderTest.php b/test/Faker/Extension/ContainerBuilderTest.php index a97415dbc0..bdfc1937ed 100644 --- a/test/Faker/Extension/ContainerBuilderTest.php +++ b/test/Faker/Extension/ContainerBuilderTest.php @@ -34,7 +34,7 @@ public function testAddRejectsInvalidValue($value): void } /** - * @return \Generator + * @return \Generator */ public function provideInvalidValue(): \Generator { diff --git a/test/Faker/Provider/ro_RO/PersonTest.php b/test/Faker/Provider/ro_RO/PersonTest.php index 77ca19a1f8..76849e42af 100644 --- a/test/Faker/Provider/ro_RO/PersonTest.php +++ b/test/Faker/Provider/ro_RO/PersonTest.php @@ -138,6 +138,7 @@ public function testInvalidYearThrowsException($value) /** * @param string $value + * * @dataProvider validCountyCodeProvider */ public function testValidCountyCodeReturnsValidCnp($value) @@ -151,6 +152,7 @@ public function testValidCountyCodeReturnsValidCnp($value) /** * @param string $value + * * @dataProvider invalidCountyCodeProvider */ public function testInvalidCountyCodeThrowsException($value) diff --git a/vendor-bin/php-cs-fixer/composer.json b/vendor-bin/php-cs-fixer/composer.json index ca13f8edf8..55208850a3 100644 --- a/vendor-bin/php-cs-fixer/composer.json +++ b/vendor-bin/php-cs-fixer/composer.json @@ -1,7 +1,7 @@ { "require": { "php": "^7.4 || ^8.0", - "friendsofphp/php-cs-fixer": "^3.3.0" + "friendsofphp/php-cs-fixer": "^3.13.0" }, "config": { "platform": { diff --git a/vendor-bin/php-cs-fixer/composer.lock b/vendor-bin/php-cs-fixer/composer.lock index 9e7c1851d5..35b7f28419 100644 --- a/vendor-bin/php-cs-fixer/composer.lock +++ b/vendor-bin/php-cs-fixer/composer.lock @@ -4,27 +4,98 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5a3d8a39f5b3ca9b528e459bd7271808", + "content-hash": "44a6fb6f6db40d9eb55eafdb8d9b11a8", "packages": [ + { + "name": "composer/pcre", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-11-17T09:50:14+00:00" + }, { "name": "composer/semver", - "version": "3.2.6", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "83e511e247de329283478496f7a1e114c9517506" + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/83e511e247de329283478496f7a1e114c9517506", - "reference": "83e511e247de329283478496f7a1e114c9517506", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", "shasum": "" }, "require": { "php": "^5.3.2 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^0.12.54", + "phpstan/phpstan": "^1.4", "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", @@ -69,7 +140,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.2.6" + "source": "https://github.com/composer/semver/tree/3.3.2" }, "funding": [ { @@ -85,29 +156,31 @@ "type": "tidelift" } ], - "time": "2021-10-25T11:34:17+00:00" + "time": "2022-04-01T19:23:25+00:00" }, { "name": "composer/xdebug-handler", - "version": "2.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339" + "reference": "ced299686f41dce890debac69273b47ffe98a40c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339", - "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0", + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", "psr/log": "^1 || ^2 || ^3" }, "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" }, "type": "library", "autoload": { @@ -133,7 +206,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/2.0.2" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" }, "funding": [ { @@ -149,20 +222,20 @@ "type": "tidelift" } ], - "time": "2021-07-31T17:03:58+00:00" + "time": "2022-02-25T21:32:43+00:00" }, { "name": "doctrine/annotations", - "version": "1.13.2", + "version": "1.13.3", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08" + "reference": "648b0343343565c4a056bfc8392201385e8d89f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/648b0343343565c4a056bfc8392201385e8d89f0", + "reference": "648b0343343565c4a056bfc8392201385e8d89f0", "shasum": "" }, "require": { @@ -174,9 +247,10 @@ "require-dev": { "doctrine/cache": "^1.11 || ^2.0", "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^0.12.20", + "phpstan/phpstan": "^1.4.10 || ^1.8.0", "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2" + "symfony/cache": "^4.4 || ^5.2", + "vimeo/psalm": "^4.10" }, "type": "library", "autoload": { @@ -219,36 +293,34 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.13.2" + "source": "https://github.com/doctrine/annotations/tree/1.13.3" }, - "time": "2021-08-05T19:00:23+00:00" + "time": "2022-07-02T10:48:51+00:00" }, { "name": "doctrine/lexer", - "version": "1.0.2", + "version": "1.2.3", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "1febd6c3ef84253d7c815bed85fc622ad207a9f8" + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/1febd6c3ef84253d7c815bed85fc622ad207a9f8", - "reference": "1febd6c3ef84253d7c815bed85fc622ad207a9f8", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^7.1 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^4.5" + "doctrine/coding-standard": "^9.0", + "phpstan/phpstan": "^1.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.11" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" @@ -259,14 +331,14 @@ "MIT" ], "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, { "name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com" }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, { "name": "Johannes Schmitt", "email": "schmittjoh@gmail.com" @@ -283,59 +355,72 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.0.2" + "source": "https://github.com/doctrine/lexer/tree/1.2.3" }, - "time": "2019-06-08T11:03:04+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2022-02-28T11:07:21+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.3.0", + "version": "v3.13.0", "source": { "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "0ad2f84130e8fec8655682532e6d39553054831c" + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "a6232229a8309e8811dc751c28b91cb34b2943e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/0ad2f84130e8fec8655682532e6d39553054831c", - "reference": "0ad2f84130e8fec8655682532e6d39553054831c", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/a6232229a8309e8811dc751c28b91cb34b2943e1", + "reference": "a6232229a8309e8811dc751c28b91cb34b2943e1", "shasum": "" }, "require": { "composer/semver": "^3.2", - "composer/xdebug-handler": "^2.0", - "doctrine/annotations": "^1.12", + "composer/xdebug-handler": "^3.0.3", + "doctrine/annotations": "^1.13", "ext-json": "*", "ext-tokenizer": "*", - "php": "^7.1.3 || ^8.0", - "php-cs-fixer/diff": "^2.0", - "symfony/console": "^4.4.20 || ^5.1.3", - "symfony/event-dispatcher": "^4.4.20 || ^5.0", - "symfony/filesystem": "^4.4.20 || ^5.0", - "symfony/finder": "^4.4.20 || ^5.0", - "symfony/options-resolver": "^4.4.20 || ^5.0", + "php": "^7.4 || ^8.0", + "sebastian/diff": "^4.0", + "symfony/console": "^5.4 || ^6.0", + "symfony/event-dispatcher": "^5.4 || ^6.0", + "symfony/filesystem": "^5.4 || ^6.0", + "symfony/finder": "^5.4 || ^6.0", + "symfony/options-resolver": "^5.4 || ^6.0", "symfony/polyfill-mbstring": "^1.23", - "symfony/polyfill-php72": "^1.23", - "symfony/polyfill-php80": "^1.23", - "symfony/polyfill-php81": "^1.23", - "symfony/process": "^4.4.20 || ^5.0", - "symfony/stopwatch": "^4.4.20 || ^5.0" + "symfony/polyfill-php80": "^1.25", + "symfony/polyfill-php81": "^1.25", + "symfony/process": "^5.4 || ^6.0", + "symfony/stopwatch": "^5.4 || ^6.0" }, "require-dev": { "justinrainbow/json-schema": "^5.2", - "keradus/cli-executor": "^1.5", - "mikey179/vfsstream": "^1.6.8", - "php-coveralls/php-coveralls": "^2.4.3", + "keradus/cli-executor": "^2.0", + "mikey179/vfsstream": "^1.6.10", + "php-coveralls/php-coveralls": "^2.5.2", "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy": "^1.10.3", - "phpspec/prophecy-phpunit": "^1.1 || ^2.0", - "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5", - "phpunitgoodpractices/polyfill": "^1.5", - "phpunitgoodpractices/traits": "^1.9.1", - "symfony/phpunit-bridge": "^5.2.4", - "symfony/yaml": "^4.4.20 || ^5.0" + "phpspec/prophecy": "^1.15", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "phpunitgoodpractices/polyfill": "^1.6", + "phpunitgoodpractices/traits": "^1.9.2", + "symfony/phpunit-bridge": "^6.0", + "symfony/yaml": "^5.4 || ^6.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -366,8 +451,8 @@ ], "description": "A tool to automatically fix PHP code style", "support": { - "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.3.0" + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.13.0" }, "funding": [ { @@ -375,86 +460,78 @@ "type": "github" } ], - "time": "2021-11-15T17:28:29+00:00" + "time": "2022-10-31T19:28:50+00:00" }, { - "name": "php-cs-fixer/diff", - "version": "v2.0.2", + "name": "psr/cache", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3" + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/29dc0d507e838c4580d018bd8b5cb412474f7ec3", - "reference": "29dc0d507e838c4580d018bd8b5cb412474f7ec3", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", - "symfony/process": "^3.3" + "php": ">=5.3.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Psr\\Cache\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "sebastian/diff v3 backport support for PHP 5.6+", - "homepage": "https://github.com/PHP-CS-Fixer", + "description": "Common interface for caching libraries", "keywords": [ - "diff" + "cache", + "psr", + "psr-6" ], "support": { - "issues": "https://github.com/PHP-CS-Fixer/diff/issues", - "source": "https://github.com/PHP-CS-Fixer/diff/tree/v2.0.2" + "source": "https://github.com/php-fig/cache/tree/master" }, - "time": "2020-10-14T08:32:19+00:00" + "time": "2016-08-06T20:24:11+00:00" }, { - "name": "psr/cache", - "version": "1.0.1", + "name": "psr/container", + "version": "1.1.2", "source": { "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + "url": "https://github.com/php-fig/container.git", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.4.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { - "Psr\\Cache\\": "src/" + "Psr\\Container\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -464,36 +541,40 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], - "description": "Common interface for caching libraries", + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", "keywords": [ - "cache", - "psr", - "psr-6" + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" ], "support": { - "source": "https://github.com/php-fig/cache/tree/master" + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2016-08-06T20:24:11+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { - "name": "psr/container", + "name": "psr/event-dispatcher", "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.2.0" }, "type": "library", "extra": { @@ -503,7 +584,7 @@ }, "autoload": { "psr-4": { - "Psr\\Container\\": "src/" + "Psr\\EventDispatcher\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -516,20 +597,17 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "Standard interfaces for event handling.", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "events", + "psr", + "psr-14" ], "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/master" + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" }, - "time": "2017-02-14T16:28:37+00:00" + "time": "2019-01-08T18:20:26+00:00" }, { "name": "psr/log", @@ -581,45 +659,114 @@ }, "time": "2021-05-03T11:20:27+00:00" }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, { "name": "symfony/console", - "version": "v4.4.34", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "329b3a75cc6b16d435ba1b1a41df54a53382a3f0" + "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/329b3a75cc6b16d435ba1b1a41df54a53382a3f0", - "reference": "329b3a75cc6b16d435ba1b1a41df54a53382a3f0", + "url": "https://api.github.com/repos/symfony/console/zipball/8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", + "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php73": "^1.9", "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2" + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.1|^6.0" }, "conflict": { "psr/log": ">=3", - "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3|>=5", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", "symfony/lock": "<4.4", - "symfony/process": "<3.3" + "symfony/process": "<4.4" }, "provide": { "psr/log-implementation": "1.0|2.0" }, "require-dev": { "psr/log": "^1|^2", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/event-dispatcher": "^4.3", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^3.4|^4.0|^5.0", - "symfony/var-dumper": "^4.3|^5.0" + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/lock": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -652,8 +799,14 @@ ], "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], "support": { - "source": "https://github.com/symfony/console/tree/v4.4.34" + "source": "https://github.com/symfony/console/tree/v5.4.16" }, "funding": [ { @@ -669,43 +822,111 @@ "type": "tidelift" } ], - "time": "2021-11-04T12:23:33+00:00" + "time": "2022-11-25T14:09:27+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.34", + "version": "v5.4.9", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "1a024b45369c9d55d76b6b8a241bd20c9ea1cbd8" + "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1a024b45369c9d55d76b6b8a241bd20c9ea1cbd8", - "reference": "1a024b45369c9d55d76b6b8a241bd20c9ea1cbd8", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", + "reference": "8e6ce1cc0279e3ff3c8ff0f43813bc88d21ca1bc", "shasum": "" }, "require": { - "php": ">=7.1.3", - "symfony/event-dispatcher-contracts": "^1.1", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/event-dispatcher-contracts": "^2|^3", "symfony/polyfill-php80": "^1.16" }, "conflict": { - "symfony/dependency-injection": "<3.4" + "symfony/dependency-injection": "<4.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "1.1" + "symfony/event-dispatcher-implementation": "2.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/error-handler": "~3.4|~4.4", - "symfony/expression-language": "^3.4|^4.0|^5.0", - "symfony/http-foundation": "^3.4|^4.0|^5.0", - "symfony/service-contracts": "^1.1|^2", - "symfony/stopwatch": "^3.4|^4.0|^5.0" + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/expression-language": "^4.4|^5.0|^6.0", + "symfony/http-foundation": "^4.4|^5.0|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/stopwatch": "^4.4|^5.0|^6.0" }, "suggest": { "symfony/dependency-injection": "", @@ -737,7 +958,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/v4.4.34" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.9" }, "funding": [ { @@ -753,33 +974,33 @@ "type": "tidelift" } ], - "time": "2021-11-15T14:42:25+00:00" + "time": "2022-05-05T16:45:39+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v1.1.11", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "01e9a4efac0ee33a05dfdf93b346f62e7d0e998c" + "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/01e9a4efac0ee33a05dfdf93b346f62e7d0e998c", - "reference": "01e9a4efac0ee33a05dfdf93b346f62e7d0e998c", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", + "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", "shasum": "" }, "require": { - "php": ">=7.1.3" + "php": ">=7.2.5", + "psr/event-dispatcher": "^1" }, "suggest": { - "psr/event-dispatcher": "", "symfony/event-dispatcher-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.1-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -816,7 +1037,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.11" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.2" }, "funding": [ { @@ -832,25 +1053,26 @@ "type": "tidelift" } ], - "time": "2021-03-23T15:25:38+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "symfony/filesystem", - "version": "v4.4.27", + "version": "v5.4.13", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "517fb795794faf29086a77d99eb8f35e457837a7" + "reference": "ac09569844a9109a5966b9438fc29113ce77cf51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/517fb795794faf29086a77d99eb8f35e457837a7", - "reference": "517fb795794faf29086a77d99eb8f35e457837a7", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/ac09569844a9109a5966b9438fc29113ce77cf51", + "reference": "ac09569844a9109a5966b9438fc29113ce77cf51", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": ">=7.2.5", "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8", "symfony/polyfill-php80": "^1.16" }, "type": "library", @@ -879,7 +1101,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v4.4.27" + "source": "https://github.com/symfony/filesystem/tree/v5.4.13" }, "funding": [ { @@ -895,24 +1117,25 @@ "type": "tidelift" } ], - "time": "2021-07-21T12:19:41+00:00" + "time": "2022-09-21T19:53:16+00:00" }, { "name": "symfony/finder", - "version": "v4.4.30", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "70362f1e112280d75b30087c7598b837c1b468b6" + "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/70362f1e112280d75b30087c7598b837c1b468b6", - "reference": "70362f1e112280d75b30087c7598b837c1b468b6", + "url": "https://api.github.com/repos/symfony/finder/zipball/7872a66f57caffa2916a584db1aa7f12adc76f8c", + "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-php80": "^1.16" }, "type": "library", @@ -941,7 +1164,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v4.4.30" + "source": "https://github.com/symfony/finder/tree/v5.4.11" }, "funding": [ { @@ -957,24 +1180,26 @@ "type": "tidelift" } ], - "time": "2021-08-04T20:31:23+00:00" + "time": "2022-07-29T07:37:50+00:00" }, { "name": "symfony/options-resolver", - "version": "v4.4.30", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "fa0b12a3a47ed25749d47d6b4f61412fd5ca1554" + "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/fa0b12a3a47ed25749d47d6b4f61412fd5ca1554", - "reference": "fa0b12a3a47ed25749d47d6b4f61412fd5ca1554", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/54f14e36aa73cb8f7261d7686691fd4d75ea2690", + "reference": "54f14e36aa73cb8f7261d7686691fd4d75ea2690", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-php73": "~1.0", "symfony/polyfill-php80": "^1.16" }, "type": "library", @@ -1008,7 +1233,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v4.4.30" + "source": "https://github.com/symfony/options-resolver/tree/v5.4.11" }, "funding": [ { @@ -1024,32 +1249,35 @@ "type": "tidelift" } ], - "time": "2021-08-04T20:31:23+00:00" + "time": "2022-07-20T13:00:38+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-ctype": "*" + }, "suggest": { "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1057,12 +1285,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1087,7 +1315,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -1103,32 +1331,32 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", "shasum": "" }, "require": { "php": ">=7.1" }, "suggest": { - "ext-mbstring": "For best performance" + "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1136,11 +1364,95 @@ } }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { "files": [ "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1157,17 +1469,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill for intl's Normalizer class and related functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "mbstring", + "intl", + "normalizer", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" }, "funding": [ { @@ -1183,29 +1496,35 @@ "type": "tidelift" } ], - "time": "2021-05-27T12:26:48+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/polyfill-php72", - "version": "v1.23.0", + "name": "symfony/polyfill-mbstring", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1213,12 +1532,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1234,16 +1553,17 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "mbstring", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -1259,20 +1579,20 @@ "type": "tidelift" } ], - "time": "2021-05-27T09:17:38+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.23.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", "shasum": "" }, "require": { @@ -1281,7 +1601,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1289,12 +1609,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -1322,7 +1642,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" }, "funding": [ { @@ -1338,20 +1658,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.23.1", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", - "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, "require": { @@ -1360,7 +1680,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1368,12 +1688,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -1405,7 +1725,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" }, "funding": [ { @@ -1421,20 +1741,20 @@ "type": "tidelift" } ], - "time": "2021-07-28T13:41:28+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.23.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "e66119f3de95efc359483f810c4c3e6436279436" + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/e66119f3de95efc359483f810c4c3e6436279436", - "reference": "e66119f3de95efc359483f810c4c3e6436279436", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", + "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", "shasum": "" }, "require": { @@ -1443,7 +1763,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1451,12 +1771,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, "files": [ "bootstrap.php" ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, "classmap": [ "Resources/stubs" ] @@ -1484,7 +1804,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.23.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" }, "funding": [ { @@ -1500,24 +1820,24 @@ "type": "tidelift" } ], - "time": "2021-05-21T13:25:03+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", - "version": "v4.4.34", + "version": "v5.4.11", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "a8d1a7b6f9ab04e45b08ef634125ac6d1deef813" + "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/a8d1a7b6f9ab04e45b08ef634125ac6d1deef813", - "reference": "a8d1a7b6f9ab04e45b08ef634125ac6d1deef813", + "url": "https://api.github.com/repos/symfony/process/zipball/6e75fe6874cbc7e4773d049616ab450eff537bf1", + "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": ">=7.2.5", "symfony/polyfill-php80": "^1.16" }, "type": "library", @@ -1546,7 +1866,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v4.4.34" + "source": "https://github.com/symfony/process/tree/v5.4.11" }, "funding": [ { @@ -1562,25 +1882,29 @@ "type": "tidelift" } ], - "time": "2021-11-16T10:35:10+00:00" + "time": "2022-06-27T16:58:25+00:00" }, { "name": "symfony/service-contracts", - "version": "v1.1.11", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "633df678bec3452e04a7b0337c9bcfe7354124b3" + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/633df678bec3452e04a7b0337c9bcfe7354124b3", - "reference": "633df678bec3452e04a7b0337c9bcfe7354124b3", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", "shasum": "" }, "require": { - "php": ">=7.1.3", - "psr/container": "^1.0" + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" }, "suggest": { "symfony/service-implementation": "" @@ -1588,7 +1912,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.1-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -1625,7 +1949,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v1.1.11" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" }, "funding": [ { @@ -1641,25 +1965,25 @@ "type": "tidelift" } ], - "time": "2021-11-04T13:32:43+00:00" + "time": "2022-05-30T19:17:29+00:00" }, { "name": "symfony/stopwatch", - "version": "v4.4.27", + "version": "v5.4.13", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "c85d997af06a58ba83e2d2538e335b894c24523d" + "reference": "6df7a3effde34d81717bbef4591e5ffe32226d69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/c85d997af06a58ba83e2d2538e335b894c24523d", - "reference": "c85d997af06a58ba83e2d2538e335b894c24523d", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6df7a3effde34d81717bbef4591e5ffe32226d69", + "reference": "6df7a3effde34d81717bbef4591e5ffe32226d69", "shasum": "" }, "require": { - "php": ">=7.1.3", - "symfony/service-contracts": "^1.0|^2" + "php": ">=7.2.5", + "symfony/service-contracts": "^1|^2|^3" }, "type": "library", "autoload": { @@ -1687,7 +2011,93 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v4.4.27" + "source": "https://github.com/symfony/stopwatch/tree/v5.4.13" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-09-28T13:19:49+00:00" + }, + { + "name": "symfony/string", + "version": "v5.4.15", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", + "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "conflict": { + "symfony/translation-contracts": ">=3.0" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/http-client": "^4.4|^5.0|^6.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.4.15" }, "funding": [ { @@ -1703,7 +2113,7 @@ "type": "tidelift" } ], - "time": "2021-07-10T08:41:57+00:00" + "time": "2022-10-05T15:16:54+00:00" } ], "packages-dev": [], From c5d2efb28428cfcad29d60f4fbbf59eee43a5273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 7 Dec 2022 17:30:34 +0100 Subject: [PATCH 12/22] Enhancement: Enable `void_return` fixer (#554) * Enhancement: Enable void_return fixer * Fix: Run 'make cs' --- .php-cs-fixer.dist.php | 1 + src/Faker/Calculator/Isbn.php | 2 +- src/Faker/Generator.php | 6 +- src/Faker/ORM/CakePHP/EntityPopulator.php | 8 +- src/Faker/ORM/Doctrine/EntityPopulator.php | 12 +- src/Faker/ORM/Doctrine/Populator.php | 2 +- src/Faker/ORM/Mandango/EntityPopulator.php | 4 +- src/Faker/ORM/Mandango/Populator.php | 2 +- src/Faker/ORM/Propel/EntityPopulator.php | 12 +- src/Faker/ORM/Propel/Populator.php | 2 +- src/Faker/ORM/Propel2/EntityPopulator.php | 12 +- src/Faker/ORM/Propel2/Populator.php | 2 +- src/Faker/ORM/Spot/EntityPopulator.php | 12 +- src/Faker/ORM/Spot/Populator.php | 2 +- src/Faker/Provider/DateTime.php | 2 +- src/Faker/Provider/HtmlLorem.php | 26 ++-- test/Faker/Calculator/EanTest.php | 8 +- test/Faker/Calculator/IbanTest.php | 8 +- test/Faker/Calculator/LuhnTest.php | 6 +- test/Faker/Core/BarcodeTest.php | 4 +- test/Faker/Core/ColorTest.php | 20 +-- test/Faker/Core/DateTimeTest.php | 48 +++---- test/Faker/Core/NumberTest.php | 26 ++-- test/Faker/Core/UuidTest.php | 4 +- test/Faker/DefaultGeneratorTest.php | 6 +- test/Faker/Extension/HelperTest.php | 28 ++-- test/Faker/GeneratorTest.php | 32 ++--- test/Faker/Provider/AddressTest.php | 6 +- test/Faker/Provider/BarcodeTest.php | 4 +- test/Faker/Provider/BaseTest.php | 136 +++++++++--------- test/Faker/Provider/BiasedTest.php | 8 +- test/Faker/Provider/ColorTest.php | 20 +-- test/Faker/Provider/CompanyTest.php | 2 +- test/Faker/Provider/DateTimeTest.php | 40 +++--- test/Faker/Provider/HtmlLoremTest.php | 4 +- test/Faker/Provider/ImageTest.php | 26 ++-- test/Faker/Provider/InternetTest.php | 34 ++--- test/Faker/Provider/LoremTest.php | 26 ++-- test/Faker/Provider/MiscellaneousTest.php | 20 +-- test/Faker/Provider/PaymentTest.php | 14 +- test/Faker/Provider/PersonTest.php | 16 +-- test/Faker/Provider/PhoneNumberTest.php | 4 +- test/Faker/Provider/ProviderOverrideTest.php | 16 +-- test/Faker/Provider/TextTest.php | 16 +-- test/Faker/Provider/UserAgentTest.php | 16 +-- test/Faker/Provider/UuidTest.php | 4 +- test/Faker/Provider/ar_EG/CompanyTest.php | 4 +- test/Faker/Provider/ar_EG/InternetTest.php | 2 +- test/Faker/Provider/ar_EG/PersonTest.php | 2 +- test/Faker/Provider/ar_EG/TextTest.php | 2 +- test/Faker/Provider/ar_JO/InternetTest.php | 2 +- test/Faker/Provider/ar_SA/CompanyTest.php | 2 +- test/Faker/Provider/ar_SA/InternetTest.php | 2 +- test/Faker/Provider/ar_SA/PersonTest.php | 6 +- test/Faker/Provider/bg_BG/PaymentTest.php | 2 +- test/Faker/Provider/bn_BD/PersonTest.php | 4 +- test/Faker/Provider/cs_CZ/PersonTest.php | 2 +- test/Faker/Provider/da_DK/InternetTest.php | 2 +- test/Faker/Provider/de_AT/AddressTest.php | 2 +- test/Faker/Provider/de_AT/InternetTest.php | 2 +- test/Faker/Provider/de_AT/PaymentTest.php | 4 +- test/Faker/Provider/de_AT/PersonTest.php | 6 +- test/Faker/Provider/de_AT/PhoneNumberTest.php | 4 +- test/Faker/Provider/de_CH/AddressTest.php | 8 +- test/Faker/Provider/de_CH/InternetTest.php | 2 +- test/Faker/Provider/de_CH/PersonTest.php | 4 +- test/Faker/Provider/de_CH/PhoneNumberTest.php | 6 +- test/Faker/Provider/de_DE/InternetTest.php | 2 +- test/Faker/Provider/de_DE/PhoneNumberTest.php | 8 +- test/Faker/Provider/el_GR/PhoneNumberTest.php | 12 +- test/Faker/Provider/el_GR/TextTest.php | 2 +- test/Faker/Provider/en_AU/AddressTest.php | 6 +- test/Faker/Provider/en_CA/AddressTest.php | 8 +- test/Faker/Provider/en_GB/AddressTest.php | 2 +- test/Faker/Provider/en_GB/CompanyTest.php | 14 +- test/Faker/Provider/en_GB/PersonTest.php | 2 +- test/Faker/Provider/en_GB/PhoneNumberTest.php | 2 +- test/Faker/Provider/en_IN/AddressTest.php | 8 +- test/Faker/Provider/en_NG/AddressTest.php | 6 +- test/Faker/Provider/en_NG/InternetTest.php | 2 +- test/Faker/Provider/en_NG/PersonTest.php | 2 +- test/Faker/Provider/en_NG/PhoneNumberTest.php | 2 +- test/Faker/Provider/en_NZ/PhoneNumberTest.php | 4 +- test/Faker/Provider/en_PH/AddressTest.php | 8 +- test/Faker/Provider/en_SG/AddressTest.php | 4 +- test/Faker/Provider/en_SG/PhoneNumberTest.php | 14 +- test/Faker/Provider/en_UG/AddressTest.php | 6 +- test/Faker/Provider/en_US/CompanyTest.php | 2 +- test/Faker/Provider/en_US/PaymentTest.php | 6 +- test/Faker/Provider/en_US/PersonTest.php | 2 +- test/Faker/Provider/en_US/PhoneNumberTest.php | 8 +- test/Faker/Provider/en_ZA/CompanyTest.php | 2 +- test/Faker/Provider/en_ZA/InternetTest.php | 2 +- test/Faker/Provider/en_ZA/PersonTest.php | 12 +- test/Faker/Provider/en_ZA/PhoneNumberTest.php | 6 +- test/Faker/Provider/es_ES/PaymentTest.php | 2 +- test/Faker/Provider/es_ES/PersonTest.php | 4 +- test/Faker/Provider/es_ES/PhoneNumberTest.php | 4 +- test/Faker/Provider/es_ES/TextTest.php | 2 +- test/Faker/Provider/es_PE/CompanyTest.php | 6 +- test/Faker/Provider/es_PE/PersonTest.php | 2 +- test/Faker/Provider/es_VE/CompanyTest.php | 2 +- test/Faker/Provider/es_VE/PersonTest.php | 2 +- test/Faker/Provider/fa_IR/PersonTest.php | 2 +- test/Faker/Provider/fi_FI/InternetTest.php | 2 +- test/Faker/Provider/fi_FI/PersonTest.php | 8 +- test/Faker/Provider/fr_BE/PaymentTest.php | 2 +- test/Faker/Provider/fr_CH/AddressTest.php | 8 +- test/Faker/Provider/fr_CH/InternetTest.php | 2 +- test/Faker/Provider/fr_CH/PersonTest.php | 2 +- test/Faker/Provider/fr_CH/PhoneNumberTest.php | 4 +- test/Faker/Provider/fr_FR/AddressTest.php | 4 +- test/Faker/Provider/fr_FR/ColorTest.php | 4 +- test/Faker/Provider/fr_FR/CompanyTest.php | 14 +- test/Faker/Provider/fr_FR/PaymentTest.php | 4 +- test/Faker/Provider/fr_FR/PersonTest.php | 6 +- test/Faker/Provider/fr_FR/PhoneNumberTest.php | 14 +- test/Faker/Provider/fr_FR/TextTest.php | 2 +- test/Faker/Provider/hu_HU/PersonTest.php | 2 +- test/Faker/Provider/id_ID/PersonTest.php | 10 +- test/Faker/Provider/it_CH/AddressTest.php | 8 +- test/Faker/Provider/it_CH/InternetTest.php | 2 +- test/Faker/Provider/it_CH/PersonTest.php | 2 +- test/Faker/Provider/it_CH/PhoneNumberTest.php | 4 +- test/Faker/Provider/it_IT/CompanyTest.php | 2 +- test/Faker/Provider/it_IT/PersonTest.php | 2 +- test/Faker/Provider/ja_JP/InternetTest.php | 4 +- test/Faker/Provider/ja_JP/PersonTest.php | 10 +- test/Faker/Provider/ja_JP/PhoneNumberTest.php | 2 +- test/Faker/Provider/ka_GE/TextTest.php | 2 +- test/Faker/Provider/kk_KZ/CompanyTest.php | 2 +- test/Faker/Provider/kk_KZ/PersonTest.php | 2 +- test/Faker/Provider/kk_KZ/TextTest.php | 2 +- test/Faker/Provider/ko_KR/TextTest.php | 2 +- test/Faker/Provider/lt_LT/AddressTest.php | 2 +- test/Faker/Provider/mn_MN/PersonTest.php | 4 +- test/Faker/Provider/ms_MY/PersonTest.php | 2 +- test/Faker/Provider/nb_NO/PhoneNumberTest.php | 2 +- test/Faker/Provider/nl_BE/PaymentTest.php | 4 +- test/Faker/Provider/nl_BE/PersonTest.php | 6 +- test/Faker/Provider/nl_NL/CompanyTest.php | 4 +- test/Faker/Provider/nl_NL/PersonTest.php | 2 +- test/Faker/Provider/pl_PL/AddressTest.php | 2 +- .../Faker/Provider/pl_PL/LicensePlateTest.php | 32 ++--- test/Faker/Provider/pl_PL/PersonTest.php | 18 +-- test/Faker/Provider/pt_BR/CompanyTest.php | 2 +- test/Faker/Provider/pt_BR/PersonTest.php | 4 +- test/Faker/Provider/pt_BR/TextTest.php | 2 +- test/Faker/Provider/pt_PT/AddressTest.php | 4 +- test/Faker/Provider/pt_PT/PersonTest.php | 2 +- test/Faker/Provider/pt_PT/PhoneNumberTest.php | 4 +- test/Faker/Provider/ro_RO/PersonTest.php | 18 +-- test/Faker/Provider/ro_RO/PhoneNumberTest.php | 6 +- test/Faker/Provider/ru_RU/CompanyTest.php | 10 +- test/Faker/Provider/ru_RU/PersonTest.php | 6 +- test/Faker/Provider/ru_RU/TextTest.php | 2 +- .../Faker/Provider/sv_SE/MunicipalityTest.php | 2 +- test/Faker/Provider/sv_SE/PersonTest.php | 12 +- test/Faker/Provider/tr_TR/CompanyTest.php | 2 +- test/Faker/Provider/tr_TR/PaymentTest.php | 2 +- test/Faker/Provider/tr_TR/PersonTest.php | 6 +- test/Faker/Provider/tr_TR/PhoneNumberTest.php | 4 +- test/Faker/Provider/uk_UA/AddressTest.php | 12 +- test/Faker/Provider/uk_UA/PersonTest.php | 10 +- test/Faker/Provider/uk_UA/PhoneNumberTest.php | 4 +- test/Faker/Provider/zh_TW/CompanyTest.php | 2 +- test/Faker/Provider/zh_TW/PersonTest.php | 2 +- test/Faker/Provider/zh_TW/TextTest.php | 8 +- 168 files changed, 649 insertions(+), 648 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index c186f1ca07..83bb1fa7be 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -200,5 +200,6 @@ 'property', ], ], + 'void_return' => true, 'whitespace_after_comma_in_array' => true, ]); diff --git a/src/Faker/Calculator/Isbn.php b/src/Faker/Calculator/Isbn.php index 72a5c4ed93..f098233be8 100644 --- a/src/Faker/Calculator/Isbn.php +++ b/src/Faker/Calculator/Isbn.php @@ -34,7 +34,7 @@ public static function checksum(string $input): string $digits = str_split($input); array_walk( $digits, - static function (&$digit, $position) { + static function (&$digit, $position): void { $digit = (10 - $position) * $digit; } ); diff --git a/src/Faker/Generator.php b/src/Faker/Generator.php index 758399a3e6..e804f326be 100644 --- a/src/Faker/Generator.php +++ b/src/Faker/Generator.php @@ -597,7 +597,7 @@ public function ext(string $id): Extension\Extension return $extension; } - public function addProvider($provider) + public function addProvider($provider): void { array_unshift($this->providers, $provider); @@ -682,7 +682,7 @@ public function valid(?\Closure $validator = null, int $maxRetries = 10000) return new ValidGenerator($this, $validator, $maxRetries); } - public function seed($seed = null) + public function seed($seed = null): void { if ($seed === null) { mt_srand(); @@ -966,7 +966,7 @@ public function __destruct() $this->seed(); } - public function __wakeup() + public function __wakeup(): void { $this->formatters = []; } diff --git a/src/Faker/ORM/CakePHP/EntityPopulator.php b/src/Faker/ORM/CakePHP/EntityPopulator.php index cd9890bd4d..370fbd5acb 100644 --- a/src/Faker/ORM/CakePHP/EntityPopulator.php +++ b/src/Faker/ORM/CakePHP/EntityPopulator.php @@ -27,17 +27,17 @@ public function __get($name) /** * @param string $name */ - public function __set($name, $value) + public function __set($name, $value): void { $this->{$name} = $value; } - public function mergeColumnFormattersWith($columnFormatters) + public function mergeColumnFormattersWith($columnFormatters): void { $this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters); } - public function mergeModifiersWith($modifiers) + public function mergeModifiersWith($modifiers): void { $this->modifiers = array_merge($this->modifiers, $modifiers); } @@ -155,7 +155,7 @@ public function execute($class, $insertedEntities, $options = []) return $entity->{$pk[0]}; } - public function setConnection($name) + public function setConnection($name): void { $this->connectionName = $name; } diff --git a/src/Faker/ORM/Doctrine/EntityPopulator.php b/src/Faker/ORM/Doctrine/EntityPopulator.php index 79d3796b8a..92efbcce80 100644 --- a/src/Faker/ORM/Doctrine/EntityPopulator.php +++ b/src/Faker/ORM/Doctrine/EntityPopulator.php @@ -38,7 +38,7 @@ public function getClass() return $this->class->getName(); } - public function setColumnFormatters($columnFormatters) + public function setColumnFormatters($columnFormatters): void { $this->columnFormatters = $columnFormatters; } @@ -51,12 +51,12 @@ public function getColumnFormatters() return $this->columnFormatters; } - public function mergeColumnFormattersWith($columnFormatters) + public function mergeColumnFormattersWith($columnFormatters): void { $this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters); } - public function setModifiers(array $modifiers) + public function setModifiers(array $modifiers): void { $this->modifiers = $modifiers; } @@ -69,7 +69,7 @@ public function getModifiers() return $this->modifiers; } - public function mergeModifiersWith(array $modifiers) + public function mergeModifiersWith(array $modifiers): void { $this->modifiers = array_merge($this->modifiers, $modifiers); } @@ -193,7 +193,7 @@ public function execute(ObjectManager $manager, $insertedEntities, $generateId = return $obj; } - private function fillColumns($obj, $insertedEntities) + private function fillColumns($obj, $insertedEntities): void { foreach ($this->columnFormatters as $field => $format) { if (null !== $format) { @@ -220,7 +220,7 @@ private function fillColumns($obj, $insertedEntities) } } - private function callMethods($obj, $insertedEntities) + private function callMethods($obj, $insertedEntities): void { foreach ($this->getModifiers() as $modifier) { $modifier($obj, $insertedEntities); diff --git a/src/Faker/ORM/Doctrine/Populator.php b/src/Faker/ORM/Doctrine/Populator.php index 893d856627..40527ec059 100644 --- a/src/Faker/ORM/Doctrine/Populator.php +++ b/src/Faker/ORM/Doctrine/Populator.php @@ -61,7 +61,7 @@ public function __construct(Generator $generator, ObjectManager $manager = null, * @param mixed $entity A Doctrine classname, or a \Faker\ORM\Doctrine\EntityPopulator instance * @param int $number The number of entities to populate */ - public function addEntity($entity, $number, $customColumnFormatters = [], $customModifiers = [], $generateId = false) + public function addEntity($entity, $number, $customColumnFormatters = [], $customModifiers = [], $generateId = false): void { if (!$entity instanceof \Faker\ORM\Doctrine\EntityPopulator) { if (null === $this->manager) { diff --git a/src/Faker/ORM/Mandango/EntityPopulator.php b/src/Faker/ORM/Mandango/EntityPopulator.php index 515ab7b659..e89f947fe0 100644 --- a/src/Faker/ORM/Mandango/EntityPopulator.php +++ b/src/Faker/ORM/Mandango/EntityPopulator.php @@ -29,7 +29,7 @@ public function getClass() return $this->class; } - public function setColumnFormatters($columnFormatters) + public function setColumnFormatters($columnFormatters): void { $this->columnFormatters = $columnFormatters; } @@ -42,7 +42,7 @@ public function getColumnFormatters() return $this->columnFormatters; } - public function mergeColumnFormattersWith($columnFormatters) + public function mergeColumnFormattersWith($columnFormatters): void { $this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters); } diff --git a/src/Faker/ORM/Mandango/Populator.php b/src/Faker/ORM/Mandango/Populator.php index de6c3b81ce..3cee6a4c19 100644 --- a/src/Faker/ORM/Mandango/Populator.php +++ b/src/Faker/ORM/Mandango/Populator.php @@ -27,7 +27,7 @@ public function __construct(\Faker\Generator $generator, Mandango $mandango) * @param mixed $entity A Propel ActiveRecord classname, or a \Faker\ORM\Propel\EntityPopulator instance * @param int $number The number of entities to populate */ - public function addEntity($entity, $number, $customColumnFormatters = []) + public function addEntity($entity, $number, $customColumnFormatters = []): void { if (!$entity instanceof \Faker\ORM\Mandango\EntityPopulator) { $entity = new \Faker\ORM\Mandango\EntityPopulator($entity); diff --git a/src/Faker/ORM/Propel/EntityPopulator.php b/src/Faker/ORM/Propel/EntityPopulator.php index bee659d528..91dd8cb038 100644 --- a/src/Faker/ORM/Propel/EntityPopulator.php +++ b/src/Faker/ORM/Propel/EntityPopulator.php @@ -29,7 +29,7 @@ public function getClass() return $this->class; } - public function setColumnFormatters($columnFormatters) + public function setColumnFormatters($columnFormatters): void { $this->columnFormatters = $columnFormatters; } @@ -42,7 +42,7 @@ public function getColumnFormatters() return $this->columnFormatters; } - public function mergeColumnFormattersWith($columnFormatters) + public function mergeColumnFormattersWith($columnFormatters): void { $this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters); } @@ -126,7 +126,7 @@ protected function isColumnBehavior(\ColumnMap $columnMap) return false; } - public function setModifiers($modifiers) + public function setModifiers($modifiers): void { $this->modifiers = $modifiers; } @@ -139,7 +139,7 @@ public function getModifiers() return $this->modifiers; } - public function mergeModifiersWith($modifiers) + public function mergeModifiersWith($modifiers): void { $this->modifiers = array_merge($this->modifiers, $modifiers); } @@ -157,7 +157,7 @@ public function guessModifiers(\Faker\Generator $generator) foreach ($tableMap->getBehaviors() as $name => $params) { switch ($name) { case 'nested_set': - $modifiers['nested_set'] = static function ($obj, $inserted) use ($class, $generator) { + $modifiers['nested_set'] = static function ($obj, $inserted) use ($class, $generator): void { if (isset($inserted[$class])) { $queryClass = $class . 'Query'; $parent = $queryClass::create()->findPk($generator->randomElement($inserted[$class])); @@ -170,7 +170,7 @@ public function guessModifiers(\Faker\Generator $generator) break; case 'sortable': - $modifiers['sortable'] = static function ($obj, $inserted) use ($class, $generator) { + $modifiers['sortable'] = static function ($obj, $inserted) use ($class, $generator): void { $obj->insertAtRank($generator->numberBetween(1, count($inserted[$class] ?? []) + 1)); }; diff --git a/src/Faker/ORM/Propel/Populator.php b/src/Faker/ORM/Propel/Populator.php index e3d4298107..aecb028e64 100644 --- a/src/Faker/ORM/Propel/Populator.php +++ b/src/Faker/ORM/Propel/Populator.php @@ -23,7 +23,7 @@ public function __construct(\Faker\Generator $generator) * @param mixed $entity A Propel ActiveRecord classname, or a \Faker\ORM\Propel\EntityPopulator instance * @param int $number The number of entities to populate */ - public function addEntity($entity, $number, $customColumnFormatters = [], $customModifiers = []) + public function addEntity($entity, $number, $customColumnFormatters = [], $customModifiers = []): void { if (!$entity instanceof \Faker\ORM\Propel\EntityPopulator) { $entity = new \Faker\ORM\Propel\EntityPopulator($entity); diff --git a/src/Faker/ORM/Propel2/EntityPopulator.php b/src/Faker/ORM/Propel2/EntityPopulator.php index 199f4563f1..32e027ff24 100644 --- a/src/Faker/ORM/Propel2/EntityPopulator.php +++ b/src/Faker/ORM/Propel2/EntityPopulator.php @@ -30,7 +30,7 @@ public function getClass() return $this->class; } - public function setColumnFormatters($columnFormatters) + public function setColumnFormatters($columnFormatters): void { $this->columnFormatters = $columnFormatters; } @@ -43,7 +43,7 @@ public function getColumnFormatters() return $this->columnFormatters; } - public function mergeColumnFormattersWith($columnFormatters) + public function mergeColumnFormattersWith($columnFormatters): void { $this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters); } @@ -129,7 +129,7 @@ protected function isColumnBehavior(ColumnMap $columnMap) return false; } - public function setModifiers($modifiers) + public function setModifiers($modifiers): void { $this->modifiers = $modifiers; } @@ -142,7 +142,7 @@ public function getModifiers() return $this->modifiers; } - public function mergeModifiersWith($modifiers) + public function mergeModifiersWith($modifiers): void { $this->modifiers = array_merge($this->modifiers, $modifiers); } @@ -160,7 +160,7 @@ public function guessModifiers(\Faker\Generator $generator) foreach ($tableMap->getBehaviors() as $name => $params) { switch ($name) { case 'nested_set': - $modifiers['nested_set'] = static function ($obj, $inserted) use ($class, $generator) { + $modifiers['nested_set'] = static function ($obj, $inserted) use ($class, $generator): void { if (isset($inserted[$class])) { $queryClass = $class . 'Query'; $parent = $queryClass::create()->findPk($generator->randomElement($inserted[$class])); @@ -173,7 +173,7 @@ public function guessModifiers(\Faker\Generator $generator) break; case 'sortable': - $modifiers['sortable'] = static function ($obj, $inserted) use ($class, $generator) { + $modifiers['sortable'] = static function ($obj, $inserted) use ($class, $generator): void { $obj->insertAtRank($generator->numberBetween(1, count($inserted[$class] ?? []) + 1)); }; diff --git a/src/Faker/ORM/Propel2/Populator.php b/src/Faker/ORM/Propel2/Populator.php index 7698f80e9a..a9b3fc6e12 100644 --- a/src/Faker/ORM/Propel2/Populator.php +++ b/src/Faker/ORM/Propel2/Populator.php @@ -26,7 +26,7 @@ public function __construct(\Faker\Generator $generator) * @param mixed $entity A Propel ActiveRecord classname, or a \Faker\ORM\Propel2\EntityPopulator instance * @param int $number The number of entities to populate */ - public function addEntity($entity, $number, $customColumnFormatters = [], $customModifiers = []) + public function addEntity($entity, $number, $customColumnFormatters = [], $customModifiers = []): void { if (!$entity instanceof \Faker\ORM\Propel2\EntityPopulator) { $entity = new \Faker\ORM\Propel2\EntityPopulator($entity); diff --git a/src/Faker/ORM/Spot/EntityPopulator.php b/src/Faker/ORM/Spot/EntityPopulator.php index c0afbb7cae..1290e83005 100644 --- a/src/Faker/ORM/Spot/EntityPopulator.php +++ b/src/Faker/ORM/Spot/EntityPopulator.php @@ -60,7 +60,7 @@ public function getMapper() return $this->mapper; } - public function setColumnFormatters($columnFormatters) + public function setColumnFormatters($columnFormatters): void { $this->columnFormatters = $columnFormatters; } @@ -73,12 +73,12 @@ public function getColumnFormatters() return $this->columnFormatters; } - public function mergeColumnFormattersWith($columnFormatters) + public function mergeColumnFormattersWith($columnFormatters): void { $this->columnFormatters = array_merge($this->columnFormatters, $columnFormatters); } - public function setModifiers(array $modifiers) + public function setModifiers(array $modifiers): void { $this->modifiers = $modifiers; } @@ -91,7 +91,7 @@ public function getModifiers() return $this->modifiers; } - public function mergeModifiersWith(array $modifiers) + public function mergeModifiersWith(array $modifiers): void { $this->modifiers = array_merge($this->modifiers, $modifiers); } @@ -180,7 +180,7 @@ public function execute($insertedEntities) return $obj; } - private function fillColumns($obj, $insertedEntities) + private function fillColumns($obj, $insertedEntities): void { foreach ($this->columnFormatters as $field => $format) { if (null !== $format) { @@ -190,7 +190,7 @@ private function fillColumns($obj, $insertedEntities) } } - private function callMethods($obj, $insertedEntities) + private function callMethods($obj, $insertedEntities): void { foreach ($this->getModifiers() as $modifier) { $modifier($obj, $insertedEntities); diff --git a/src/Faker/ORM/Spot/Populator.php b/src/Faker/ORM/Spot/Populator.php index 67202bb3b7..1d13db54f6 100644 --- a/src/Faker/ORM/Spot/Populator.php +++ b/src/Faker/ORM/Spot/Populator.php @@ -38,7 +38,7 @@ public function addEntity( $customColumnFormatters = [], $customModifiers = [], $useExistingData = false - ) { + ): void { $mapper = $this->locator->mapper($entityName); if (null === $mapper) { diff --git a/src/Faker/Provider/DateTime.php b/src/Faker/Provider/DateTime.php index fc56108c08..00f4641aae 100644 --- a/src/Faker/Provider/DateTime.php +++ b/src/Faker/Provider/DateTime.php @@ -356,7 +356,7 @@ private static function setTimezone(\DateTime $dt, $timezone) * * @param string $timezone */ - public static function setDefaultTimezone($timezone = null) + public static function setDefaultTimezone($timezone = null): void { static::$defaultTimezone = $timezone; } diff --git a/src/Faker/Provider/HtmlLorem.php b/src/Faker/Provider/HtmlLorem.php index 06bcd87d49..a8434108da 100644 --- a/src/Faker/Provider/HtmlLorem.php +++ b/src/Faker/Provider/HtmlLorem.php @@ -94,7 +94,7 @@ private function addRandomSubTree(\DOMElement $root, $maxDepth, $maxWidth) return $root; } - private function addRandomLeaf(\DOMElement $node) + private function addRandomLeaf(\DOMElement $node): void { $rand = self::numberBetween(1, 10); @@ -146,7 +146,7 @@ private function addRandomLeaf(\DOMElement $node) } } - private function addRandomAttribute(\DOMElement $node) + private function addRandomAttribute(\DOMElement $node): void { $rand = self::numberBetween(1, 2); @@ -163,20 +163,20 @@ private function addRandomAttribute(\DOMElement $node) } } - private function addRandomP(\DOMElement $element, $maxLength = 10) + private function addRandomP(\DOMElement $element, $maxLength = 10): void { $node = $element->ownerDocument->createElement(static::P_TAG); $node->textContent = $this->generator->sentence(self::numberBetween(1, $maxLength)); $element->appendChild($node); } - private function addRandomText(\DOMElement $element, $maxLength = 10) + private function addRandomText(\DOMElement $element, $maxLength = 10): void { $text = $element->ownerDocument->createTextNode($this->generator->sentence(self::numberBetween(1, $maxLength))); $element->appendChild($text); } - private function addRandomA(\DOMElement $element, $maxLength = 10) + private function addRandomA(\DOMElement $element, $maxLength = 10): void { $text = $element->ownerDocument->createTextNode($this->generator->sentence(self::numberBetween(1, $maxLength))); $node = $element->ownerDocument->createElement(static::A_TAG); @@ -185,7 +185,7 @@ private function addRandomA(\DOMElement $element, $maxLength = 10) $element->appendChild($node); } - private function addRandomTitle(\DOMElement $element, $maxLength = 10) + private function addRandomTitle(\DOMElement $element, $maxLength = 10): void { $text = $element->ownerDocument->createTextNode($this->generator->sentence(self::numberBetween(1, $maxLength))); $node = $element->ownerDocument->createElement(static::TITLE_TAG); @@ -193,7 +193,7 @@ private function addRandomTitle(\DOMElement $element, $maxLength = 10) $element->appendChild($node); } - private function addRandomH(\DOMElement $element, $maxLength = 10) + private function addRandomH(\DOMElement $element, $maxLength = 10): void { $h = static::H_TAG . (string) self::numberBetween(1, 3); $text = $element->ownerDocument->createTextNode($this->generator->sentence(self::numberBetween(1, $maxLength))); @@ -202,7 +202,7 @@ private function addRandomH(\DOMElement $element, $maxLength = 10) $element->appendChild($node); } - private function addRandomB(\DOMElement $element, $maxLength = 10) + private function addRandomB(\DOMElement $element, $maxLength = 10): void { $text = $element->ownerDocument->createTextNode($this->generator->sentence(self::numberBetween(1, $maxLength))); $node = $element->ownerDocument->createElement(static::B_TAG); @@ -210,7 +210,7 @@ private function addRandomB(\DOMElement $element, $maxLength = 10) $element->appendChild($node); } - private function addRandomI(\DOMElement $element, $maxLength = 10) + private function addRandomI(\DOMElement $element, $maxLength = 10): void { $text = $element->ownerDocument->createTextNode($this->generator->sentence(self::numberBetween(1, $maxLength))); $node = $element->ownerDocument->createElement(static::I_TAG); @@ -218,7 +218,7 @@ private function addRandomI(\DOMElement $element, $maxLength = 10) $element->appendChild($node); } - private function addRandomSpan(\DOMElement $element, $maxLength = 10) + private function addRandomSpan(\DOMElement $element, $maxLength = 10): void { $text = $element->ownerDocument->createTextNode($this->generator->sentence(self::numberBetween(1, $maxLength))); $node = $element->ownerDocument->createElement(static::SPAN_TAG); @@ -226,7 +226,7 @@ private function addRandomSpan(\DOMElement $element, $maxLength = 10) $element->appendChild($node); } - private function addLoginForm(\DOMElement $element) + private function addLoginForm(\DOMElement $element): void { $textInput = $element->ownerDocument->createElement(static::INPUT_TAG); $textInput->setAttribute('type', 'text'); @@ -258,7 +258,7 @@ private function addLoginForm(\DOMElement $element) $element->appendChild($submit); } - private function addRandomTable(\DOMElement $element, $maxRows = 10, $maxCols = 6, $maxTitle = 4, $maxLength = 10) + private function addRandomTable(\DOMElement $element, $maxRows = 10, $maxCols = 6, $maxTitle = 4, $maxLength = 10): void { $rows = self::numberBetween(1, $maxRows); $cols = self::numberBetween(1, $maxCols); @@ -292,7 +292,7 @@ private function addRandomTable(\DOMElement $element, $maxRows = 10, $maxCols = $element->appendChild($table); } - private function addRandomUL(\DOMElement $element, $maxItems = 11, $maxLength = 4) + private function addRandomUL(\DOMElement $element, $maxItems = 11, $maxLength = 4): void { $num = self::numberBetween(1, $maxItems); $ul = $element->ownerDocument->createElement(static::UL_TAG); diff --git a/test/Faker/Calculator/EanTest.php b/test/Faker/Calculator/EanTest.php index 704ee31e43..f611285b9b 100644 --- a/test/Faker/Calculator/EanTest.php +++ b/test/Faker/Calculator/EanTest.php @@ -30,7 +30,7 @@ public function ean8ValidationProvider() /** * @dataProvider Ean8checksumProvider */ - public function testChecksumEan8($partial, $checksum) + public function testChecksumEan8($partial, $checksum): void { self::assertSame($checksum, Ean::checksum($partial)); } @@ -38,7 +38,7 @@ public function testChecksumEan8($partial, $checksum) /** * @dataProvider ean8ValidationProvider */ - public function testEan8Validation($ean8, $valid) + public function testEan8Validation($ean8, $valid): void { self::assertSame($valid, Ean::isValid($ean8)); } @@ -67,7 +67,7 @@ public function ean13ValidationProvider() /** * @dataProvider Ean13checksumProvider */ - public function testChecksumEan13($partial, $checksum) + public function testChecksumEan13($partial, $checksum): void { self::assertSame($checksum, Ean::checksum($partial)); } @@ -75,7 +75,7 @@ public function testChecksumEan13($partial, $checksum) /** * @dataProvider ean13ValidationProvider */ - public function testEan13Validation($ean13, $valid) + public function testEan13Validation($ean13, $valid): void { self::assertSame($valid, Ean::isValid($ean13)); } diff --git a/test/Faker/Calculator/IbanTest.php b/test/Faker/Calculator/IbanTest.php index 4ed7a57e39..e25444c62b 100644 --- a/test/Faker/Calculator/IbanTest.php +++ b/test/Faker/Calculator/IbanTest.php @@ -83,7 +83,7 @@ public function checksumProvider() /** * @dataProvider checksumProvider */ - public function testChecksum($iban, $checksum) + public function testChecksum($iban, $checksum): void { self::assertEquals($checksum, Iban::checksum($iban), $iban); } @@ -232,7 +232,7 @@ public function validatorProvider() /** * @dataProvider validatorProvider */ - public function testIsValid($iban, $isValid) + public function testIsValid($iban, $isValid): void { self::assertEquals($isValid, Iban::isValid($iban), $iban); } @@ -272,7 +272,7 @@ public function alphaToNumberProvider() /** * @dataProvider alphaToNumberProvider */ - public function testAlphaToNumber($letter, $number) + public function testAlphaToNumber($letter, $number): void { self::assertEquals($number, Iban::alphaToNumber($letter), $letter); } @@ -298,7 +298,7 @@ public function mod97Provider() /** * @dataProvider mod97Provider */ - public function testMod97($number, $result) + public function testMod97($number, $result): void { self::assertEquals($result, Iban::mod97($number), $number); } diff --git a/test/Faker/Calculator/LuhnTest.php b/test/Faker/Calculator/LuhnTest.php index 1adb81025d..3f1b106e4e 100644 --- a/test/Faker/Calculator/LuhnTest.php +++ b/test/Faker/Calculator/LuhnTest.php @@ -28,7 +28,7 @@ public function checkDigitProvider() /** * @dataProvider checkDigitProvider */ - public function testComputeCheckDigit($partialNumber, $checkDigit) + public function testComputeCheckDigit($partialNumber, $checkDigit): void { self::assertIsString($checkDigit); self::assertEquals($checkDigit, Luhn::computeCheckDigit($partialNumber)); @@ -55,12 +55,12 @@ public function validatorProvider() /** * @dataProvider validatorProvider */ - public function testIsValid($number, $isValid) + public function testIsValid($number, $isValid): void { self::assertEquals($isValid, Luhn::isValid($number)); } - public function testGenerateLuhnNumberWithInvalidPrefix() + public function testGenerateLuhnNumberWithInvalidPrefix(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Argument should be an integer.'); diff --git a/test/Faker/Core/BarcodeTest.php b/test/Faker/Core/BarcodeTest.php index fb4bd8592b..631350027c 100644 --- a/test/Faker/Core/BarcodeTest.php +++ b/test/Faker/Core/BarcodeTest.php @@ -10,14 +10,14 @@ final class BarcodeTest extends TestCase { - public function testEan8() + public function testEan8(): void { $code = $this->faker->ean8(); self::assertMatchesRegularExpression('/^\d{8}$/i', $code); self::assertTrue(Ean::isValid($code)); } - public function testEan13() + public function testEan13(): void { $code = $this->faker->ean13(); self::assertMatchesRegularExpression('/^\d{13}$/i', $code); diff --git a/test/Faker/Core/ColorTest.php b/test/Faker/Core/ColorTest.php index a75349fca8..13183c89ec 100644 --- a/test/Faker/Core/ColorTest.php +++ b/test/Faker/Core/ColorTest.php @@ -9,39 +9,39 @@ final class ColorTest extends TestCase { - public function testHexColor() + public function testHexColor(): void { $color = new Color(); self::assertMatchesRegularExpression('/^#[a-f0-9]{6}$/i', $color->hexColor()); } - public function testSafeHexColor() + public function testSafeHexColor(): void { $color = new Color(); self::assertMatchesRegularExpression('/^#[a-f0-9]{6}$/i', $color->safeHexColor()); } - public function testRgbColorAsArray() + public function testRgbColorAsArray(): void { $color = new Color(); self::assertCount(3, $color->rgbColorAsArray()); } - public function testRgbColor() + public function testRgbColor(): void { $color = new Color(); $regexp = '([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])'; self::assertMatchesRegularExpression('/^' . $regexp . ',' . $regexp . ',' . $regexp . '$/i', $color->rgbColor()); } - public function testRgbCssColor() + public function testRgbCssColor(): void { $color = new Color(); $regexp = '([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])'; self::assertMatchesRegularExpression('/^rgb\(' . $regexp . ',' . $regexp . ',' . $regexp . '\)$/i', $color->rgbCssColor()); } - public function testRgbaCssColor() + public function testRgbaCssColor(): void { $color = new Color(); $regexp = '([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])'; @@ -49,19 +49,19 @@ public function testRgbaCssColor() self::assertMatchesRegularExpression('/^rgba\(' . $regexp . ',' . $regexp . ',' . $regexp . ',' . $regexpAlpha . '\)$/i', $color->rgbaCssColor()); } - public function testSafeColorName() + public function testSafeColorName(): void { $color = new Color(); self::assertMatchesRegularExpression('/^[\w]+$/', $color->safeColorName()); } - public function testColorName() + public function testColorName(): void { $color = new Color(); self::assertMatchesRegularExpression('/^[\w]+$/', $color->colorName()); } - public function testHslColor() + public function testHslColor(): void { $color = new Color(); $regexp360 = '(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])'; @@ -69,7 +69,7 @@ public function testHslColor() self::assertMatchesRegularExpression('/^' . $regexp360 . ',' . $regexp100 . ',' . $regexp100 . '$/', $color->hslColor()); } - public function testHslColorArray() + public function testHslColorArray(): void { $color = new Color(); self::assertCount(3, $color->hslColorAsArray()); diff --git a/test/Faker/Core/DateTimeTest.php b/test/Faker/Core/DateTimeTest.php index 4b7da9fd76..f51cbc378d 100644 --- a/test/Faker/Core/DateTimeTest.php +++ b/test/Faker/Core/DateTimeTest.php @@ -24,7 +24,7 @@ protected function setUp(): void $this->extension = $this->faker->ext(DateTimeExtension::class); } - public function testDateTime() + public function testDateTime(): void { $dateTime = $this->extension->dateTime('2005-10-19T14:12:00'); @@ -32,7 +32,7 @@ public function testDateTime() self::assertEquals(new \DateTime('1990-09-29T12:12:53'), $dateTime); } - public function testDateTimeWithTimezone() + public function testDateTimeWithTimezone(): void { $dateTime = $this->extension->dateTime('2021-09-05T15:10:00', 'America/Los_Angeles'); @@ -41,7 +41,7 @@ public function testDateTimeWithTimezone() self::assertEquals(new \DateTimeZone('America/Los_Angeles'), $dateTime->getTimezone()); } - public function testDateTimeAD() + public function testDateTimeAD(): void { $dateTime = $this->extension->dateTimeAD('2012-04-12T19:22:23'); @@ -49,7 +49,7 @@ public function testDateTimeAD() self::assertEquals(new \DateTime('1166-06-01T17:43:42'), $dateTime); } - public function testDateTimeBetween() + public function testDateTimeBetween(): void { $dateTime = $this->extension->dateTimeBetween('1998-12-18T11:23:40', '2004-09-15T22:10:45'); @@ -57,13 +57,13 @@ public function testDateTimeBetween() self::assertEquals(new \DateTime('2002-04-17T09:33:38'), $dateTime); } - public function testDateTimeBetweenShouldThrowIfFromIsNotAnteriorToUntil() + public function testDateTimeBetweenShouldThrowIfFromIsNotAnteriorToUntil(): void { self::expectException(\InvalidArgumentException::class); $this->extension->dateTimeBetween('2004-09-15T22:10:45', '1998-12-18T11:23:40'); } - public function testDateTimeInInterval() + public function testDateTimeInInterval(): void { $dateTime = $this->extension->dateTimeInInterval('1999-07-16T17:30:12', '+2 years'); @@ -71,7 +71,7 @@ public function testDateTimeInInterval() self::assertEquals(new \DateTime('2000-09-12T07:10:58'), $dateTime); } - public function testDateTimeThisWeek() + public function testDateTimeThisWeek(): void { $dateTime = $this->extension->dateTimeThisWeek(); @@ -80,7 +80,7 @@ public function testDateTimeThisWeek() self::assertLessThanOrEqual(new \DateTime('sunday this week'), $dateTime); } - public function testDateTimeThisMonth() + public function testDateTimeThisMonth(): void { $dateTime = $this->extension->dateTimeThisMonth(); @@ -89,7 +89,7 @@ public function testDateTimeThisMonth() self::assertLessThanOrEqual(new \DateTime('last day of this month'), $dateTime); } - public function testDateTimeThisYear() + public function testDateTimeThisYear(): void { $dateTime = $this->extension->dateTimeThisYear(); @@ -98,7 +98,7 @@ public function testDateTimeThisYear() self::assertLessThanOrEqual(new \DateTime('last day of december'), $dateTime); } - public function testDateTimeThisDecade() + public function testDateTimeThisDecade(): void { $dateTime = $this->extension->dateTimeThisDecade(); @@ -109,7 +109,7 @@ public function testDateTimeThisDecade() self::assertLessThanOrEqual(new \DateTime('now'), $dateTime); } - public function testDateTimeThisCentury() + public function testDateTimeThisCentury(): void { $dateTime = $this->extension->dateTimeThisCentury(); @@ -120,7 +120,7 @@ public function testDateTimeThisCentury() self::assertLessThanOrEqual(new \DateTime('now'), $dateTime); } - public function testDate() + public function testDate(): void { $date = $this->extension->date('Y-m-d', '2102-11-12T14:45:29'); @@ -128,7 +128,7 @@ public function testDate() self::assertEquals('2046-12-26', $date); } - public function testTime() + public function testTime(): void { $time = $this->extension->time('H:i:s', '1978-06-27T09:43:21'); @@ -136,7 +136,7 @@ public function testTime() self::assertEquals('21:59:44', $time); } - public function testUnixTime() + public function testUnixTime(): void { $unixTime = $this->extension->unixTime('1993-08-29T15:10:00'); @@ -144,7 +144,7 @@ public function testUnixTime() self::assertEquals(432630664, $unixTime); } - public function testUnitTimeWithNumericUntil() + public function testUnitTimeWithNumericUntil(): void { $unixTime = $this->extension->unixTime(1643830258); @@ -152,7 +152,7 @@ public function testUnitTimeWithNumericUntil() self::assertEquals(952499510, $unixTime); } - public function testIso8601() + public function testIso8601(): void { $iso8601 = $this->extension->iso8601('1993-07-11T15:10:00'); @@ -161,7 +161,7 @@ public function testIso8601() self::assertEquals('1983-08-19T21:45:51+0000', $iso8601); } - public function testAmPm() + public function testAmPm(): void { $amPm = $this->extension->amPm('1929-04-14T15:10:23'); @@ -170,7 +170,7 @@ public function testAmPm() self::assertContains($amPm, ['am', 'pm']); } - public function testDayOfMonth() + public function testDayOfMonth(): void { $dayOfMonth = $this->extension->dayOfMonth('2001-04-29T15:10:12'); @@ -178,7 +178,7 @@ public function testDayOfMonth() self::assertEquals('25', $dayOfMonth); } - public function testDayOfWeek() + public function testDayOfWeek(): void { $dayOfWeek = $this->extension->dayOfWeek('2021-12-12T15:10:00'); @@ -186,7 +186,7 @@ public function testDayOfWeek() self::assertEquals('Monday', $dayOfWeek); } - public function testMonth() + public function testMonth(): void { $month = $this->extension->month('2021-05-23T15:10:00'); @@ -194,7 +194,7 @@ public function testMonth() self::assertEquals('10', $month); } - public function testMonthName() + public function testMonthName(): void { $monthName = $this->extension->monthName('2021-06-06T15:10:00'); @@ -202,7 +202,7 @@ public function testMonthName() self::assertEquals('October', $monthName); } - public function testYear() + public function testYear(): void { $year = $this->extension->year('2021-09-12T15:10:00'); @@ -210,7 +210,7 @@ public function testYear() self::assertEquals('1999', $year); } - public function testCentury() + public function testCentury(): void { $century = $this->extension->century(); @@ -218,7 +218,7 @@ public function testCentury() self::assertEquals('XIX', $century); } - public function testTimezone() + public function testTimezone(): void { $timezone = $this->extension->timezone(); $countryTimezone = $this->extension->timezone('US'); diff --git a/test/Faker/Core/NumberTest.php b/test/Faker/Core/NumberTest.php index bc8cea4120..38adfb7830 100644 --- a/test/Faker/Core/NumberTest.php +++ b/test/Faker/Core/NumberTest.php @@ -8,24 +8,24 @@ final class NumberTest extends TestCase { - public function testRandomDigitReturnsInteger() + public function testRandomDigitReturnsInteger(): void { self::assertIsInt($this->faker->randomDigit()); } - public function testRandomDigitReturnsDigit() + public function testRandomDigitReturnsDigit(): void { self::assertGreaterThanOrEqual(0, $this->faker->randomDigit()); self::assertLessThan(10, $this->faker->randomDigit()); } - public function testRandomDigitNotNullReturnsNotNullDigit() + public function testRandomDigitNotNullReturnsNotNullDigit(): void { self::assertGreaterThan(0, $this->faker->randomDigitNotZero()); self::assertLessThan(10, $this->faker->randomDigitNotZero()); } - public function testRandomDigitNotReturnsValidDigit() + public function testRandomDigitNotReturnsValidDigit(): void { for ($i = 0; $i <= 9; ++$i) { self::assertGreaterThanOrEqual(0, $this->faker->randomDigitNot($i)); @@ -34,35 +34,35 @@ public function testRandomDigitNotReturnsValidDigit() } } - public function testRandomNumberThrowsExceptionWhenCalledWithATooHighNumberOfDigits() + public function testRandomNumberThrowsExceptionWhenCalledWithATooHighNumberOfDigits(): void { $this->expectException(\InvalidArgumentException::class); $this->faker->randomNumber(10); } - public function testRandomNumberHasValidNullableAutogenerate() + public function testRandomNumberHasValidNullableAutogenerate(): void { self::assertGreaterThan(0, $this->faker->randomNumber()); } - public function testRandomNumberReturnsInteger() + public function testRandomNumberReturnsInteger(): void { self::assertIsInt($this->faker->randomNumber()); self::assertIsInt($this->faker->randomNumber(5, false)); } - public function testRandomNumberReturnsDigit() + public function testRandomNumberReturnsDigit(): void { self::assertGreaterThanOrEqual(0, $this->faker->randomNumber(3)); self::assertLessThan(1000, $this->faker->randomNumber(3)); } - public function testRandomNumberAcceptsStrictParamToEnforceNumberSize() + public function testRandomNumberAcceptsStrictParamToEnforceNumberSize(): void { self::assertEquals(5, strlen((string) $this->faker->randomNumber(5, true))); } - public function testNumberBetween() + public function testNumberBetween(): void { $min = 5; $max = 6; @@ -71,12 +71,12 @@ public function testNumberBetween() self::assertGreaterThanOrEqual($this->faker->numberBetween($min, $max), $max); } - public function testNumberBetweenAcceptsZeroAsMax() + public function testNumberBetweenAcceptsZeroAsMax(): void { self::assertEquals(0, $this->faker->numberBetween(0, 0)); } - public function testRandomFloat() + public function testRandomFloat(): void { $min = 4; $max = 10; @@ -92,7 +92,7 @@ public function testRandomFloat() self::assertLessThanOrEqual($nbMaxDecimals, strlen($parts[1])); } - public function testRandomFloatHasValidNullableAutogenerate() + public function testRandomFloatHasValidNullableAutogenerate(): void { self::assertGreaterThan(0, $this->faker->randomFloat()); } diff --git a/test/Faker/Core/UuidTest.php b/test/Faker/Core/UuidTest.php index 4e3b7b5088..0d2666063d 100644 --- a/test/Faker/Core/UuidTest.php +++ b/test/Faker/Core/UuidTest.php @@ -7,14 +7,14 @@ final class UuidTest extends TestCase { - public function testUuidReturnsUuid() + public function testUuidReturnsUuid(): void { $instance = new Uuid(); $uuid = $instance->uuid3(); self::assertTrue($this->isUuid($uuid)); } - public function testUuidExpectedSeed() + public function testUuidExpectedSeed(): void { $instance = new Uuid(); diff --git a/test/Faker/DefaultGeneratorTest.php b/test/Faker/DefaultGeneratorTest.php index 23eced28ea..8d88a342bc 100644 --- a/test/Faker/DefaultGeneratorTest.php +++ b/test/Faker/DefaultGeneratorTest.php @@ -9,7 +9,7 @@ final class DefaultGeneratorTest extends TestCase /** * @group legacy */ - public function testGeneratorReturnsNullByDefault() + public function testGeneratorReturnsNullByDefault(): void { $generator = new DefaultGenerator(); self::assertNull($generator->value); @@ -18,7 +18,7 @@ public function testGeneratorReturnsNullByDefault() /** * @group legacy */ - public function testGeneratorReturnsDefaultValueForAnyPropertyGet() + public function testGeneratorReturnsDefaultValueForAnyPropertyGet(): void { $generator = new DefaultGenerator(123); self::assertSame(123, $generator->foo); @@ -28,7 +28,7 @@ public function testGeneratorReturnsDefaultValueForAnyPropertyGet() /** * @group legacy */ - public function testGeneratorReturnsDefaultValueForAnyMethodCall() + public function testGeneratorReturnsDefaultValueForAnyMethodCall(): void { $generator = new DefaultGenerator(123); self::assertSame(123, $generator->foobar()); diff --git a/test/Faker/Extension/HelperTest.php b/test/Faker/Extension/HelperTest.php index b5bc654c41..6240b18798 100644 --- a/test/Faker/Extension/HelperTest.php +++ b/test/Faker/Extension/HelperTest.php @@ -7,76 +7,76 @@ final class HelperTest extends TestCase { - public function testRandomElementReturnsNullWhenArrayEmpty() + public function testRandomElementReturnsNullWhenArrayEmpty(): void { self::assertNull(Helper::randomElement([])); } - public function testRandomElementReturnsElementFromArray() + public function testRandomElementReturnsElementFromArray(): void { $elements = ['23', 'e', 32, '#']; self::assertContains(Helper::randomElement($elements), $elements); } - public function testRandomElementReturnsElementFromAssociativeArray() + public function testRandomElementReturnsElementFromAssociativeArray(): void { $elements = ['tata' => '23', 'toto' => 'e', 'tutu' => 32, 'titi' => '#']; self::assertContains(Helper::randomElement($elements), $elements); } - public function testNumerifyReturnsSameStringWhenItContainsNoHashSign() + public function testNumerifyReturnsSameStringWhenItContainsNoHashSign(): void { self::assertEquals('fooBar?', Helper::numerify('fooBar?')); } - public function testNumerifyReturnsStringWithHashSignsReplacedByDigits() + public function testNumerifyReturnsStringWithHashSignsReplacedByDigits(): void { self::assertMatchesRegularExpression('/foo\dBa\dr/', Helper::numerify('foo#Ba#r')); } - public function testNumerifyReturnsStringWithPercentageSignsReplacedByDigits() + public function testNumerifyReturnsStringWithPercentageSignsReplacedByDigits(): void { self::assertMatchesRegularExpression('/foo\dBa\dr/', Helper::numerify('foo%Ba%r')); } - public function testNumerifyReturnsStringWithPercentageSignsReplacedByNotNullDigits() + public function testNumerifyReturnsStringWithPercentageSignsReplacedByNotNullDigits(): void { self::assertNotEquals('0', Helper::numerify('%')); } - public function testNumerifyCanGenerateALargeNumberOfDigits() + public function testNumerifyCanGenerateALargeNumberOfDigits(): void { $largePattern = str_repeat('#', 20); // definitely larger than PHP_INT_MAX on all systems self::assertEquals(20, strlen(Helper::numerify($largePattern))); } - public function testNumerifyReturnsLargeNumber() + public function testNumerifyReturnsLargeNumber(): void { $result = Helper::numerify(str_repeat('#', 10)); self::assertGreaterThan(100, (int) $result); } - public function testLexifyReturnsSameStringWhenItContainsNoQuestionMark() + public function testLexifyReturnsSameStringWhenItContainsNoQuestionMark(): void { self::assertEquals('fooBar#', Helper::lexify('fooBar#')); } - public function testLexifyReturnsStringWithQuestionMarksReplacedByLetters() + public function testLexifyReturnsStringWithQuestionMarksReplacedByLetters(): void { self::assertMatchesRegularExpression('/foo[a-z]Ba[a-z]r/', Helper::lexify('foo?Ba?r')); } - public function testBothifyCombinesNumerifyAndLexify() + public function testBothifyCombinesNumerifyAndLexify(): void { self::assertMatchesRegularExpression('/foo[a-z]Ba\dr/', Helper::bothify('foo?Ba#r')); } - public function testBothifyAsterisk() + public function testBothifyAsterisk(): void { self::assertMatchesRegularExpression('/foo([a-z]|\d)Ba([a-z]|\d)r/', Helper::bothify('foo*Ba*r')); } - public function testBothifyUtf() + public function testBothifyUtf(): void { $utf = 'œ∑´®†¥¨ˆøπ“‘和製╯°□°╯︵ ┻━┻🐵 🙈 ﺚﻣ ﻦﻔﺳ ﺲﻘﻄﺗ ﻮﺑﺎﻠﺘﺣﺪﻳﺩ،, ﺝﺰﻳﺮﺘﻳ ﺏﺎﺴﺘﺧﺩﺎﻣ ﺄﻧ ﺪﻧﻭ. ﺇﺫ ﻪﻧﺍ؟ ﺎﻠﺴﺗﺍﺭ ﻮﺘ'; self::assertMatchesRegularExpression('/' . $utf . 'foo\dB[a-z]a([a-z]|\d)r/u', Helper::bothify($utf . 'foo#B?a*r')); diff --git a/test/Faker/GeneratorTest.php b/test/Faker/GeneratorTest.php index 4b14d7315f..2036b7cf5b 100644 --- a/test/Faker/GeneratorTest.php +++ b/test/Faker/GeneratorTest.php @@ -57,14 +57,14 @@ public function testMimeType(): void self::assertMatchesRegularExpression('|.*/.*|', $mime); } - public function testAddProviderGivesPriorityToNewlyAddedProvider() + public function testAddProviderGivesPriorityToNewlyAddedProvider(): void { $this->faker->addProvider(new Fixture\Provider\FooProvider()); $this->faker->addProvider(new Fixture\Provider\BarProvider()); self::assertEquals('barfoo', $this->faker->format('fooFormatter')); } - public function testGetProvidersReturnsCorrectProviders() + public function testGetProvidersReturnsCorrectProviders(): void { $this->faker->addProvider(new Fixture\Provider\FooProvider()); $this->faker->addProvider(new Fixture\Provider\BarProvider()); @@ -73,13 +73,13 @@ public function testGetProvidersReturnsCorrectProviders() self::assertCount(2, $this->faker->getProviders()); } - public function testGetFormatterReturnsCallable() + public function testGetFormatterReturnsCallable(): void { $this->faker->addProvider(new Fixture\Provider\FooProvider()); self::assertIsCallable($this->faker->getFormatter('fooFormatter')); } - public function testGetFormatterReturnsCorrectFormatter() + public function testGetFormatterReturnsCorrectFormatter(): void { $provider = new Fixture\Provider\FooProvider(); $this->faker->addProvider($provider); @@ -105,26 +105,26 @@ public function testAddProviderClearsPreviousFormatters(): void self::assertSame($expected, $this->faker->getFormatter('fooFormatter')); } - public function testGetFormatterThrowsExceptionOnIncorrectProvider() + public function testGetFormatterThrowsExceptionOnIncorrectProvider(): void { $this->expectException(\InvalidArgumentException::class); $this->faker->getFormatter('fooFormatter'); } - public function testGetFormatterThrowsExceptionOnIncorrectFormatter() + public function testGetFormatterThrowsExceptionOnIncorrectFormatter(): void { $this->expectException(\InvalidArgumentException::class); $this->faker->addProvider(new Fixture\Provider\FooProvider()); $this->faker->getFormatter('barFormatter'); } - public function testFormatCallsFormatterOnProvider() + public function testFormatCallsFormatterOnProvider(): void { $this->faker->addProvider(new Fixture\Provider\FooProvider()); self::assertEquals('foobar', $this->faker->format('fooFormatter')); } - public function testFormatTransfersArgumentsToFormatter() + public function testFormatTransfersArgumentsToFormatter(): void { $this->faker = new Generator(); $provider = new Fixture\Provider\FooProvider(); @@ -132,7 +132,7 @@ public function testFormatTransfersArgumentsToFormatter() self::assertEquals('bazfoo', $this->faker->format('fooFormatterWithArguments', ['foo'])); } - public function testFormatterCallsGenerator() + public function testFormatterCallsGenerator(): void { $builder = new ContainerBuilder(); $builder->add(Blood::class, BloodExtension::class); @@ -142,7 +142,7 @@ public function testFormatterCallsGenerator() self::assertTrue(in_array($output, ['A', 'AB', 'B', '0'], true)); } - public function testFormatterCallsExtension() + public function testFormatterCallsExtension(): void { $builder = new ContainerBuilder(); $builder->add(Blood::class); @@ -152,12 +152,12 @@ public function testFormatterCallsExtension() self::assertTrue(in_array($output, ['A', 'AB', 'B', '0'], true)); } - public function testParseReturnsSameStringWhenItContainsNoCurlyBraces() + public function testParseReturnsSameStringWhenItContainsNoCurlyBraces(): void { self::assertEquals('fooBar#?', $this->faker->parse('fooBar#?')); } - public function testParseReturnsStringWithTokensReplacedByFormatters() + public function testParseReturnsStringWithTokensReplacedByFormatters(): void { $this->faker->addProvider(new Fixture\Provider\FooProvider()); self::assertEquals('This is foobar a text with foobar', $this->faker->parse('This is {{fooFormatter}} a text with {{ fooFormatter }}')); @@ -166,25 +166,25 @@ public function testParseReturnsStringWithTokensReplacedByFormatters() /** * @group legacy */ - public function testMagicGetCallsFormat() + public function testMagicGetCallsFormat(): void { $this->faker->addProvider(new Fixture\Provider\FooProvider()); self::assertEquals('foobar', $this->faker->fooFormatter); } - public function testMagicCallCallsFormat() + public function testMagicCallCallsFormat(): void { $this->faker->addProvider(new Fixture\Provider\FooProvider()); self::assertEquals('foobar', $this->faker->fooFormatter()); } - public function testMagicCallCallsFormatWithArguments() + public function testMagicCallCallsFormatWithArguments(): void { $this->faker->addProvider(new Fixture\Provider\FooProvider()); self::assertEquals('bazfoo', $this->faker->fooFormatterWithArguments('foo')); } - public function testSeed() + public function testSeed(): void { $this->faker->seed(0); $mtRandWithSeedZero = mt_rand(); diff --git a/test/Faker/Provider/AddressTest.php b/test/Faker/Provider/AddressTest.php index 908029dc6f..1307b7c931 100644 --- a/test/Faker/Provider/AddressTest.php +++ b/test/Faker/Provider/AddressTest.php @@ -10,7 +10,7 @@ */ final class AddressTest extends TestCase { - public function testLatitude() + public function testLatitude(): void { $latitude = $this->faker->latitude(); self::assertIsFloat($latitude); @@ -18,7 +18,7 @@ public function testLatitude() self::assertLessThanOrEqual(90, $latitude); } - public function testLongitude() + public function testLongitude(): void { $longitude = $this->faker->longitude(); self::assertIsFloat($longitude); @@ -26,7 +26,7 @@ public function testLongitude() self::assertLessThanOrEqual(180, $longitude); } - public function testCoordinate() + public function testCoordinate(): void { $coordinate = $this->faker->localCoordinates(); self::assertIsArray($coordinate); diff --git a/test/Faker/Provider/BarcodeTest.php b/test/Faker/Provider/BarcodeTest.php index 94734ecc34..97e78ead16 100644 --- a/test/Faker/Provider/BarcodeTest.php +++ b/test/Faker/Provider/BarcodeTest.php @@ -12,14 +12,14 @@ */ final class BarcodeTest extends TestCase { - public function testEan8() + public function testEan8(): void { $code = $this->faker->ean8(); self::assertMatchesRegularExpression('/^\d{8}$/i', $code); self::assertTrue(Ean::isValid($code)); } - public function testEan13() + public function testEan13(): void { $code = $this->faker->ean13(); self::assertMatchesRegularExpression('/^\d{13}$/i', $code); diff --git a/test/Faker/Provider/BaseTest.php b/test/Faker/Provider/BaseTest.php index 3af3de211e..fba14868c7 100644 --- a/test/Faker/Provider/BaseTest.php +++ b/test/Faker/Provider/BaseTest.php @@ -10,24 +10,24 @@ */ final class BaseTest extends TestCase { - public function testRandomDigitReturnsInteger() + public function testRandomDigitReturnsInteger(): void { self::assertIsInt(BaseProvider::randomDigit()); } - public function testRandomDigitReturnsDigit() + public function testRandomDigitReturnsDigit(): void { self::assertGreaterThanOrEqual(0, BaseProvider::randomDigit()); self::assertLessThan(10, BaseProvider::randomDigit()); } - public function testRandomDigitNotNullReturnsNotNullDigit() + public function testRandomDigitNotNullReturnsNotNullDigit(): void { self::assertGreaterThan(0, BaseProvider::randomDigitNotNull()); self::assertLessThan(10, BaseProvider::randomDigitNotNull()); } - public function testRandomDigitNotReturnsValidDigit() + public function testRandomDigitNotReturnsValidDigit(): void { for ($i = 0; $i <= 9; ++$i) { self::assertGreaterThanOrEqual(0, BaseProvider::randomDigitNot($i)); @@ -36,36 +36,36 @@ public function testRandomDigitNotReturnsValidDigit() } } - public function testRandomNumberThrowsExceptionWhenCalledWithAMax() + public function testRandomNumberThrowsExceptionWhenCalledWithAMax(): void { $this->expectException(\InvalidArgumentException::class); BaseProvider::randomNumber(5, 200); } - public function testRandomNumberThrowsExceptionWhenCalledWithATooHighNumberOfDigits() + public function testRandomNumberThrowsExceptionWhenCalledWithATooHighNumberOfDigits(): void { $this->expectException(\InvalidArgumentException::class); BaseProvider::randomNumber(10); } - public function testRandomNumberReturnsInteger() + public function testRandomNumberReturnsInteger(): void { self::assertIsInt(BaseProvider::randomNumber()); self::assertIsInt(BaseProvider::randomNumber(5, false)); } - public function testRandomNumberReturnsDigit() + public function testRandomNumberReturnsDigit(): void { self::assertGreaterThanOrEqual(0, BaseProvider::randomNumber(3)); self::assertLessThan(1000, BaseProvider::randomNumber(3)); } - public function testRandomNumberAcceptsStrictParamToEnforceNumberSize() + public function testRandomNumberAcceptsStrictParamToEnforceNumberSize(): void { self::assertEquals(5, strlen((string) BaseProvider::randomNumber(5, true))); } - public function testNumberBetween() + public function testNumberBetween(): void { $min = 5; $max = 6; @@ -74,12 +74,12 @@ public function testNumberBetween() self::assertGreaterThanOrEqual(BaseProvider::numberBetween($min, $max), $max); } - public function testNumberBetweenAcceptsZeroAsMax() + public function testNumberBetweenAcceptsZeroAsMax(): void { self::assertEquals(0, BaseProvider::numberBetween(0, 0)); } - public function testRandomFloat() + public function testRandomFloat(): void { $min = 4; $max = 10; @@ -95,94 +95,94 @@ public function testRandomFloat() self::assertLessThanOrEqual($nbMaxDecimals, strlen($parts[1])); } - public function testRandomLetterReturnsString() + public function testRandomLetterReturnsString(): void { self::assertIsString(BaseProvider::randomLetter()); } - public function testRandomLetterReturnsSingleLetter() + public function testRandomLetterReturnsSingleLetter(): void { self::assertEquals(1, strlen(BaseProvider::randomLetter())); } - public function testRandomLetterReturnsLowercaseLetter() + public function testRandomLetterReturnsLowercaseLetter(): void { $lowercaseLetters = 'abcdefghijklmnopqrstuvwxyz'; self::assertNotFalse(strpos($lowercaseLetters, BaseProvider::randomLetter())); } - public function testRandomAsciiReturnsString() + public function testRandomAsciiReturnsString(): void { self::assertIsString(BaseProvider::randomAscii()); } - public function testRandomAsciiReturnsSingleCharacter() + public function testRandomAsciiReturnsSingleCharacter(): void { self::assertEquals(1, strlen(BaseProvider::randomAscii())); } - public function testRandomAsciiReturnsAsciiCharacter() + public function testRandomAsciiReturnsAsciiCharacter(): void { $lowercaseLetters = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'; self::assertNotFalse(strpos($lowercaseLetters, BaseProvider::randomAscii())); } - public function testRandomElementReturnsNullWhenArrayEmpty() + public function testRandomElementReturnsNullWhenArrayEmpty(): void { self::assertNull(BaseProvider::randomElement([])); } - public function testRandomElementReturnsNullWhenCollectionEmpty() + public function testRandomElementReturnsNullWhenCollectionEmpty(): void { self::assertNull(BaseProvider::randomElement(new Collection([]))); } - public function testRandomElementReturnsElementFromArray() + public function testRandomElementReturnsElementFromArray(): void { $elements = ['23', 'e', 32, '#']; self::assertContains(BaseProvider::randomElement($elements), $elements); } - public function testRandomElementReturnsElementFromAssociativeArray() + public function testRandomElementReturnsElementFromAssociativeArray(): void { $elements = ['tata' => '23', 'toto' => 'e', 'tutu' => 32, 'titi' => '#']; self::assertContains(BaseProvider::randomElement($elements), $elements); } - public function testRandomElementReturnsElementFromCollection() + public function testRandomElementReturnsElementFromCollection(): void { $collection = new Collection(['one', 'two', 'three']); self::assertContains(BaseProvider::randomElement($collection), $collection); } - public function testShuffleReturnsStringWhenPassedAStringArgument() + public function testShuffleReturnsStringWhenPassedAStringArgument(): void { self::assertIsString(BaseProvider::shuffle('foo')); } - public function testShuffleReturnsArrayWhenPassedAnArrayArgument() + public function testShuffleReturnsArrayWhenPassedAnArrayArgument(): void { self::assertIsArray(BaseProvider::shuffle([1, 2, 3])); } - public function testShuffleThrowsExceptionWhenPassedAnInvalidArgument() + public function testShuffleThrowsExceptionWhenPassedAnInvalidArgument(): void { $this->expectException(\InvalidArgumentException::class); BaseProvider::shuffle(false); } - public function testShuffleArraySupportsEmptyArrays() + public function testShuffleArraySupportsEmptyArrays(): void { self::assertEquals([], BaseProvider::shuffleArray([])); } - public function testShuffleArrayReturnsAnArrayOfTheSameSize() + public function testShuffleArrayReturnsAnArrayOfTheSameSize(): void { $array = [1, 2, 3, 4, 5]; self::assertSameSize($array, BaseProvider::shuffleArray($array)); } - public function testShuffleArrayReturnsAnArrayWithSameElements() + public function testShuffleArrayReturnsAnArrayWithSameElements(): void { $array = [2, 4, 6, 8, 10]; $shuffleArray = BaseProvider::shuffleArray($array); @@ -193,32 +193,32 @@ public function testShuffleArrayReturnsAnArrayWithSameElements() self::assertContains(10, $shuffleArray); } - public function testShuffleArrayReturnsADifferentArrayThanTheOriginal() + public function testShuffleArrayReturnsADifferentArrayThanTheOriginal(): void { $arr = [1, 2, 3, 4, 5]; $shuffledArray = BaseProvider::shuffleArray($arr); self::assertNotEquals($arr, $shuffledArray); } - public function testShuffleArrayLeavesTheOriginalArrayUntouched() + public function testShuffleArrayLeavesTheOriginalArrayUntouched(): void { $arr = [1, 2, 3, 4, 5]; BaseProvider::shuffleArray($arr); self::assertEquals($arr, [1, 2, 3, 4, 5]); } - public function testShuffleStringSupportsEmptyStrings() + public function testShuffleStringSupportsEmptyStrings(): void { self::assertEquals('', BaseProvider::shuffleString('')); } - public function testShuffleStringReturnsAnStringOfTheSameSize() + public function testShuffleStringReturnsAnStringOfTheSameSize(): void { $string = 'abcdef'; self::assertEquals(strlen($string), strlen(BaseProvider::shuffleString($string))); } - public function testShuffleStringReturnsAnStringWithSameElements() + public function testShuffleStringReturnsAnStringWithSameElements(): void { $string = 'acegi'; $shuffleString = BaseProvider::shuffleString($string); @@ -229,78 +229,78 @@ public function testShuffleStringReturnsAnStringWithSameElements() self::assertStringContainsString('i', $shuffleString); } - public function testShuffleStringReturnsADifferentStringThanTheOriginal() + public function testShuffleStringReturnsADifferentStringThanTheOriginal(): void { $string = 'abcdef'; $shuffledString = BaseProvider::shuffleString($string); self::assertNotEquals($string, $shuffledString); } - public function testShuffleStringLeavesTheOriginalStringUntouched() + public function testShuffleStringLeavesTheOriginalStringUntouched(): void { $string = 'abcdef'; BaseProvider::shuffleString($string); self::assertEquals($string, 'abcdef'); } - public function testNumerifyReturnsSameStringWhenItContainsNoHashSign() + public function testNumerifyReturnsSameStringWhenItContainsNoHashSign(): void { self::assertEquals('fooBar?', BaseProvider::numerify('fooBar?')); } - public function testNumerifyReturnsStringWithHashSignsReplacedByDigits() + public function testNumerifyReturnsStringWithHashSignsReplacedByDigits(): void { self::assertMatchesRegularExpression('/foo\dBa\dr/', BaseProvider::numerify('foo#Ba#r')); } - public function testNumerifyReturnsStringWithPercentageSignsReplacedByDigits() + public function testNumerifyReturnsStringWithPercentageSignsReplacedByDigits(): void { self::assertMatchesRegularExpression('/foo\dBa\dr/', BaseProvider::numerify('foo%Ba%r')); } - public function testNumerifyReturnsStringWithPercentageSignsReplacedByNotNullDigits() + public function testNumerifyReturnsStringWithPercentageSignsReplacedByNotNullDigits(): void { self::assertNotEquals('0', BaseProvider::numerify('%')); } - public function testNumerifyCanGenerateALargeNumberOfDigits() + public function testNumerifyCanGenerateALargeNumberOfDigits(): void { $largePattern = str_repeat('#', 20); // definitely larger than PHP_INT_MAX on all systems self::assertEquals(20, strlen(BaseProvider::numerify($largePattern))); } - public function testLexifyReturnsSameStringWhenItContainsNoQuestionMark() + public function testLexifyReturnsSameStringWhenItContainsNoQuestionMark(): void { self::assertEquals('fooBar#', BaseProvider::lexify('fooBar#')); } - public function testLexifyReturnsStringWithQuestionMarksReplacedByLetters() + public function testLexifyReturnsStringWithQuestionMarksReplacedByLetters(): void { self::assertMatchesRegularExpression('/foo[a-z]Ba[a-z]r/', BaseProvider::lexify('foo?Ba?r')); } - public function testBothifyCombinesNumerifyAndLexify() + public function testBothifyCombinesNumerifyAndLexify(): void { self::assertMatchesRegularExpression('/foo[a-z]Ba\dr/', BaseProvider::bothify('foo?Ba#r')); } - public function testBothifyAsterisk() + public function testBothifyAsterisk(): void { self::assertMatchesRegularExpression('/foo([a-z]|\d)Ba([a-z]|\d)r/', BaseProvider::bothify('foo*Ba*r')); } - public function testBothifyUtf() + public function testBothifyUtf(): void { $utf = 'œ∑´®†¥¨ˆøπ“‘和製╯°□°╯︵ ┻━┻🐵 🙈 ﺚﻣ ﻦﻔﺳ ﺲﻘﻄﺗ ﻮﺑﺎﻠﺘﺣﺪﻳﺩ،, ﺝﺰﻳﺮﺘﻳ ﺏﺎﺴﺘﺧﺩﺎﻣ ﺄﻧ ﺪﻧﻭ. ﺇﺫ ﻪﻧﺍ؟ ﺎﻠﺴﺗﺍﺭ ﻮﺘ'; self::assertMatchesRegularExpression('/' . $utf . 'foo\dB[a-z]a([a-z]|\d)r/u', BaseProvider::bothify($utf . 'foo#B?a*r')); } - public function testAsciifyReturnsSameStringWhenItContainsNoStarSign() + public function testAsciifyReturnsSameStringWhenItContainsNoStarSign(): void { self::assertEquals('fooBar?', BaseProvider::asciify('fooBar?')); } - public function testAsciifyReturnsStringWithStarSignsReplacedByAsciiChars() + public function testAsciifyReturnsStringWithStarSignsReplacedByAsciiChars(): void { self::assertMatchesRegularExpression('/foo.Ba.r/', BaseProvider::asciify('foo*Ba*r')); } @@ -319,7 +319,7 @@ public function regexifyBasicDataProvider() /** * @dataProvider regexifyBasicDataProvider */ - public function testRegexifyBasicFeatures($input, $output, $message) + public function testRegexifyBasicFeatures($input, $output, $message): void { self::assertEquals($output, BaseProvider::regexify($input), $message); } @@ -351,26 +351,26 @@ public function regexifyDataProvider() /** * @dataProvider regexifyDataProvider */ - public function testRegexifySupportedRegexSyntax($pattern, $message) + public function testRegexifySupportedRegexSyntax($pattern, $message): void { self::assertMatchesRegularExpression('/' . $pattern . '/', BaseProvider::regexify($pattern), 'Regexify supports ' . $message); } - public function testOptionalReturnsProviderValueWhenCalledWithWeight1() + public function testOptionalReturnsProviderValueWhenCalledWithWeight1(): void { $faker = new \Faker\Generator(); $faker->addProvider(new \Faker\Provider\Base($faker)); self::assertNotNull($faker->optional(100)->randomDigit); } - public function testOptionalReturnsNullWhenCalledWithWeight0() + public function testOptionalReturnsNullWhenCalledWithWeight0(): void { $faker = new \Faker\Generator(); $faker->addProvider(new \Faker\Provider\Base($faker)); self::assertNull($faker->optional(0)->randomDigit); } - public function testOptionalAllowsChainingPropertyAccess() + public function testOptionalAllowsChainingPropertyAccess(): void { $faker = new \Faker\Generator(); $faker->addProvider(new \Faker\Provider\Base($faker)); @@ -379,7 +379,7 @@ public function testOptionalAllowsChainingPropertyAccess() self::assertNull($faker->optional(0)->count); } - public function testOptionalAllowsChainingMethodCall() + public function testOptionalAllowsChainingMethodCall(): void { $faker = new \Faker\Generator(); $faker->addProvider(new \Faker\Provider\Base($faker)); @@ -388,7 +388,7 @@ public function testOptionalAllowsChainingMethodCall() self::assertNull($faker->optional(0)->count()); } - public function testOptionalAllowsChainingProviderCallRandomlyReturnNull() + public function testOptionalAllowsChainingProviderCallRandomlyReturnNull(): void { $faker = new \Faker\Generator(); $faker->addProvider(new \Faker\Provider\Base($faker)); @@ -410,7 +410,7 @@ public function testOptionalAllowsChainingProviderCallRandomlyReturnNull() /** * @see https://github.com/fzaninotto/Faker/issues/265 */ - public function testOptionalPercentageAndWeight() + public function testOptionalPercentageAndWeight(): void { $faker = new \Faker\Generator(); $faker->addProvider(new \Faker\Provider\Base($faker)); @@ -430,7 +430,7 @@ public function testOptionalPercentageAndWeight() ); } - public function testUniqueAllowsChainingPropertyAccess() + public function testUniqueAllowsChainingPropertyAccess(): void { $faker = new \Faker\Generator(); $faker->addProvider(new \Faker\Provider\Base($faker)); @@ -438,7 +438,7 @@ public function testUniqueAllowsChainingPropertyAccess() self::assertEquals(1, $faker->unique()->count); } - public function testUniqueAllowsChainingMethodCall() + public function testUniqueAllowsChainingMethodCall(): void { $faker = new \Faker\Generator(); $faker->addProvider(new \Faker\Provider\Base($faker)); @@ -446,7 +446,7 @@ public function testUniqueAllowsChainingMethodCall() self::assertEquals(1, $faker->unique()->count()); } - public function testUniqueReturnsOnlyUniqueValues() + public function testUniqueReturnsOnlyUniqueValues(): void { $faker = new \Faker\Generator(); $faker->addProvider(new \Faker\Provider\Base($faker)); @@ -459,7 +459,7 @@ public function testUniqueReturnsOnlyUniqueValues() self::assertEquals([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], $values); } - public function testUniqueThrowsExceptionWhenNoUniqueValueCanBeGenerated() + public function testUniqueThrowsExceptionWhenNoUniqueValueCanBeGenerated(): void { $this->expectException(\OverflowException::class); $faker = new \Faker\Generator(); @@ -470,7 +470,7 @@ public function testUniqueThrowsExceptionWhenNoUniqueValueCanBeGenerated() } } - public function testUniqueCanResetUniquesWhenPassedTrueAsArgument() + public function testUniqueCanResetUniquesWhenPassedTrueAsArgument(): void { $faker = new \Faker\Generator(); $faker->addProvider(new \Faker\Provider\Base($faker)); @@ -488,21 +488,21 @@ public function testUniqueCanResetUniquesWhenPassedTrueAsArgument() self::assertEquals([0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9], $values); } - public function testValidAllowsChainingPropertyAccess() + public function testValidAllowsChainingPropertyAccess(): void { $faker = new \Faker\Generator(); $faker->addProvider(new \Faker\Provider\Base($faker)); self::assertLessThan(10, $faker->valid()->randomDigit); } - public function testValidAllowsChainingMethodCall() + public function testValidAllowsChainingMethodCall(): void { $faker = new \Faker\Generator(); $faker->addProvider(new \Faker\Provider\Base($faker)); self::assertLessThan(10, $faker->valid()->numberBetween(5, 9)); } - public function testValidReturnsOnlyValidValues() + public function testValidReturnsOnlyValidValues(): void { $faker = new \Faker\Generator(); $faker->addProvider(new \Faker\Provider\Base($faker)); @@ -519,7 +519,7 @@ public function testValidReturnsOnlyValidValues() self::assertEquals([0, 2, 4, 6, 8], $uniqueValues); } - public function testValidThrowsExceptionWhenNoValidValueCanBeGenerated() + public function testValidThrowsExceptionWhenNoValidValueCanBeGenerated(): void { $this->expectException(\OverflowException::class); $faker = new \Faker\Generator(); @@ -533,7 +533,7 @@ public function testValidThrowsExceptionWhenNoValidValueCanBeGenerated() } } - public function testValidThrowsExceptionWhenParameterIsNotCallable() + public function testValidThrowsExceptionWhenParameterIsNotCallable(): void { $faker = new \Faker\Generator(); $faker->addProvider(new \Faker\Provider\Base($faker)); @@ -541,14 +541,14 @@ public function testValidThrowsExceptionWhenParameterIsNotCallable() $faker->valid(12)->randomElement([1, 3, 5, 7, 9]); } - public function testRandomElementsThrowsWhenRequestingTooManyKeys() + public function testRandomElementsThrowsWhenRequestingTooManyKeys(): void { $this->expectException(\LengthException::class); $this->expectExceptionMessage('Cannot get 2 elements, only 1 in array'); BaseProvider::randomElements(['foo'], 2); } - public function testRandomElements() + public function testRandomElements(): void { self::assertCount(1, BaseProvider::randomElements(), 'Should work without any input'); diff --git a/test/Faker/Provider/BiasedTest.php b/test/Faker/Provider/BiasedTest.php index a040c850b7..80eb9cb6ab 100644 --- a/test/Faker/Provider/BiasedTest.php +++ b/test/Faker/Provider/BiasedTest.php @@ -20,14 +20,14 @@ protected function setUp(): void $this->results = array_fill(1, self::MAX, 0); } - public function performFake($function) + public function performFake($function): void { for ($i = 0; $i < self::NUMBERS; ++$i) { ++$this->results[$this->faker->biasedNumberBetween(1, self::MAX, $function)]; } } - public function testUnbiased() + public function testUnbiased(): void { $this->performFake(['\Faker\Provider\Biased', 'unbiased']); @@ -42,7 +42,7 @@ public function testUnbiased() } } - public function testLinearHigh() + public function testLinearHigh(): void { $this->performFake(['\Faker\Provider\Biased', 'linearHigh']); @@ -56,7 +56,7 @@ public function testLinearHigh() } } - public function testLinearLow() + public function testLinearLow(): void { $this->performFake(['\Faker\Provider\Biased', 'linearLow']); diff --git a/test/Faker/Provider/ColorTest.php b/test/Faker/Provider/ColorTest.php index 90298a2b1c..49e1524622 100644 --- a/test/Faker/Provider/ColorTest.php +++ b/test/Faker/Provider/ColorTest.php @@ -10,58 +10,58 @@ */ final class ColorTest extends TestCase { - public function testHexColor() + public function testHexColor(): void { self::assertMatchesRegularExpression('/^#[a-f0-9]{6}$/i', Color::hexColor()); } - public function testSafeHexColor() + public function testSafeHexColor(): void { self::assertMatchesRegularExpression('/^#[a-f0-9]{6}$/i', Color::safeHexColor()); } - public function testRgbColorAsArray() + public function testRgbColorAsArray(): void { self::assertCount(3, Color::rgbColorAsArray()); } - public function testRgbColor() + public function testRgbColor(): void { $regexp = '([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])'; self::assertMatchesRegularExpression('/^' . $regexp . ',' . $regexp . ',' . $regexp . '$/i', Color::rgbColor()); } - public function testRgbCssColor() + public function testRgbCssColor(): void { $regexp = '([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])'; self::assertMatchesRegularExpression('/^rgb\(' . $regexp . ',' . $regexp . ',' . $regexp . '\)$/i', Color::rgbCssColor()); } - public function testRgbaCssColor() + public function testRgbaCssColor(): void { $regexp = '([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])'; $regexpAlpha = '([01]?(\.\d+)?)'; self::assertMatchesRegularExpression('/^rgba\(' . $regexp . ',' . $regexp . ',' . $regexp . ',' . $regexpAlpha . '\)$/i', Color::rgbaCssColor()); } - public function testSafeColorName() + public function testSafeColorName(): void { self::assertMatchesRegularExpression('/^[\w]+$/', Color::safeColorName()); } - public function testColorName() + public function testColorName(): void { self::assertMatchesRegularExpression('/^[\w]+$/', Color::colorName()); } - public function testHslColor() + public function testHslColor(): void { $regexp360 = '(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])'; $regexp100 = '(?:100|[1-9]?[0-9])'; self::assertMatchesRegularExpression('/^' . $regexp360 . ',' . $regexp100 . ',' . $regexp100 . '$/', Color::hslColor()); } - public function testHslColorArray() + public function testHslColorArray(): void { self::assertCount(3, Color::hslColorAsArray()); } diff --git a/test/Faker/Provider/CompanyTest.php b/test/Faker/Provider/CompanyTest.php index 418f2ad817..55002dec18 100644 --- a/test/Faker/Provider/CompanyTest.php +++ b/test/Faker/Provider/CompanyTest.php @@ -11,7 +11,7 @@ */ final class CompanyTest extends TestCase { - public function testJobTitle() + public function testJobTitle(): void { $jobTitle = $this->faker->jobTitle(); $pattern = '/^[A-Za-z]+$/'; diff --git a/test/Faker/Provider/DateTimeTest.php b/test/Faker/Provider/DateTimeTest.php index 86e076b9ca..5b0ce2bdf6 100644 --- a/test/Faker/Provider/DateTimeTest.php +++ b/test/Faker/Provider/DateTimeTest.php @@ -21,7 +21,7 @@ protected function tearDown(): void DateTimeProvider::setDefaultTimezone(); } - public function testPreferDefaultTimezoneOverSystemTimezone() + public function testPreferDefaultTimezoneOverSystemTimezone(): void { /** * Set the system timezone to something *other* than the timezone used @@ -45,7 +45,7 @@ public function testPreferDefaultTimezoneOverSystemTimezone() date_default_timezone_set($originalSystemTimezone); } - public function testUseSystemTimezoneWhenDefaultTimezoneIsNotSet() + public function testUseSystemTimezoneWhenDefaultTimezoneIsNotSet(): void { /** * Set the system timezone to something *other* than the timezone used @@ -71,7 +71,7 @@ public function testUseSystemTimezoneWhenDefaultTimezoneIsNotSet() date_default_timezone_set($originalSystemTimezone); } - public function testUnixTime() + public function testUnixTime(): void { $timestamp = DateTimeProvider::unixTime(); self::assertIsInt($timestamp); @@ -79,7 +79,7 @@ public function testUnixTime() self::assertLessThanOrEqual(time(), $timestamp); } - public function testDateTime() + public function testDateTime(): void { $date = DateTimeProvider::dateTime(); self::assertInstanceOf('\DateTime', $date); @@ -88,13 +88,13 @@ public function testDateTime() self::assertEquals(new \DateTimeZone($this->defaultTz), $date->getTimezone()); } - public function testDateTimeWithTimezone() + public function testDateTimeWithTimezone(): void { $date = DateTimeProvider::dateTime('now', 'America/New_York'); self::assertEquals($date->getTimezone(), new \DateTimeZone('America/New_York')); } - public function testDateTimeAD() + public function testDateTimeAD(): void { $date = DateTimeProvider::dateTimeAD(); self::assertInstanceOf('\DateTime', $date); @@ -103,7 +103,7 @@ public function testDateTimeAD() self::assertEquals(new \DateTimeZone($this->defaultTz), $date->getTimezone()); } - public function testDateTimeThisCentury() + public function testDateTimeThisCentury(): void { $date = DateTimeProvider::dateTimeThisCentury(); self::assertInstanceOf('\DateTime', $date); @@ -112,7 +112,7 @@ public function testDateTimeThisCentury() self::assertEquals(new \DateTimeZone($this->defaultTz), $date->getTimezone()); } - public function testDateTimeThisDecade() + public function testDateTimeThisDecade(): void { $date = DateTimeProvider::dateTimeThisDecade(); self::assertInstanceOf('\DateTime', $date); @@ -121,7 +121,7 @@ public function testDateTimeThisDecade() self::assertEquals(new \DateTimeZone($this->defaultTz), $date->getTimezone()); } - public function testDateTimeThisYear() + public function testDateTimeThisYear(): void { $date = DateTimeProvider::dateTimeThisYear(); self::assertInstanceOf('\DateTime', $date); @@ -130,7 +130,7 @@ public function testDateTimeThisYear() self::assertEquals(new \DateTimeZone($this->defaultTz), $date->getTimezone()); } - public function testDateTimeThisMonth() + public function testDateTimeThisMonth(): void { $date = DateTimeProvider::dateTimeThisMonth(); self::assertInstanceOf('\DateTime', $date); @@ -139,31 +139,31 @@ public function testDateTimeThisMonth() self::assertEquals(new \DateTimeZone($this->defaultTz), $date->getTimezone()); } - public function testDateTimeThisCenturyWithTimezone() + public function testDateTimeThisCenturyWithTimezone(): void { $date = DateTimeProvider::dateTimeThisCentury('now', 'America/New_York'); self::assertEquals($date->getTimezone(), new \DateTimeZone('America/New_York')); } - public function testDateTimeThisDecadeWithTimezone() + public function testDateTimeThisDecadeWithTimezone(): void { $date = DateTimeProvider::dateTimeThisDecade('now', 'America/New_York'); self::assertEquals($date->getTimezone(), new \DateTimeZone('America/New_York')); } - public function testDateTimeThisYearWithTimezone() + public function testDateTimeThisYearWithTimezone(): void { $date = DateTimeProvider::dateTimeThisYear('now', 'America/New_York'); self::assertEquals($date->getTimezone(), new \DateTimeZone('America/New_York')); } - public function testDateTimeThisMonthWithTimezone() + public function testDateTimeThisMonthWithTimezone(): void { $date = DateTimeProvider::dateTimeThisMonth('now', 'America/New_York'); self::assertEquals($date->getTimezone(), new \DateTimeZone('America/New_York')); } - public function testIso8601() + public function testIso8601(): void { $date = DateTimeProvider::iso8601(); self::assertMatchesRegularExpression('/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-Z](\d{4})?$/', $date); @@ -171,7 +171,7 @@ public function testIso8601() self::assertLessThanOrEqual(new \DateTime(), new \DateTime($date)); } - public function testDate() + public function testDate(): void { $date = DateTimeProvider::date(); self::assertMatchesRegularExpression('/^\d{4}-\d{2}-\d{2}$/', $date); @@ -179,7 +179,7 @@ public function testDate() self::assertLessThanOrEqual(new \DateTime(), new \DateTime($date)); } - public function testTime() + public function testTime(): void { $date = DateTimeProvider::time(); self::assertMatchesRegularExpression('/^\d{2}:\d{2}:\d{2}$/', $date); @@ -188,7 +188,7 @@ public function testTime() /** * @dataProvider providerDateTimeBetween */ - public function testDateTimeBetween($start, $end) + public function testDateTimeBetween($start, $end): void { $date = DateTimeProvider::dateTimeBetween($start, $end); self::assertInstanceOf('\DateTime', $date); @@ -210,7 +210,7 @@ public function providerDateTimeBetween() /** * @dataProvider providerDateTimeInInterval */ - public function testDateTimeInInterval($start, $interval, $isInFuture) + public function testDateTimeInInterval($start, $interval, $isInFuture): void { $date = DateTimeProvider::dateTimeInInterval($start, $interval); self::assertInstanceOf('\DateTime', $date); @@ -236,7 +236,7 @@ public function providerDateTimeInInterval() ]; } - public function testFixedSeedWithMaximumTimestamp() + public function testFixedSeedWithMaximumTimestamp(): void { $max = '2118-03-01 12:00:00'; diff --git a/test/Faker/Provider/HtmlLoremTest.php b/test/Faker/Provider/HtmlLoremTest.php index f72b3723c3..0290d16966 100644 --- a/test/Faker/Provider/HtmlLoremTest.php +++ b/test/Faker/Provider/HtmlLoremTest.php @@ -10,14 +10,14 @@ */ final class HtmlLoremTest extends TestCase { - public function testProvider() + public function testProvider(): void { $node = $this->faker->randomHtml(6, 10); self::assertStringStartsWith('', $node); self::assertStringEndsWith("\n", $node); } - public function testRandomHtmlReturnsValidHTMLString() + public function testRandomHtmlReturnsValidHTMLString(): void { $node = $this->faker->randomHtml(6, 10); $dom = new \DOMDocument(); diff --git a/test/Faker/Provider/ImageTest.php b/test/Faker/Provider/ImageTest.php index 8b3897be49..7530c83946 100644 --- a/test/Faker/Provider/ImageTest.php +++ b/test/Faker/Provider/ImageTest.php @@ -10,7 +10,7 @@ */ final class ImageTest extends TestCase { - public function testImageUrlUses640x680AsTheDefaultSize() + public function testImageUrlUses640x680AsTheDefaultSize(): void { self::assertMatchesRegularExpression( '#^https://via.placeholder.com/640x480.png/#', @@ -18,7 +18,7 @@ public function testImageUrlUses640x680AsTheDefaultSize() ); } - public function testImageUrlAcceptsCustomWidthAndHeight() + public function testImageUrlAcceptsCustomWidthAndHeight(): void { self::assertMatchesRegularExpression( '#^https://via.placeholder.com/800x400.png/#', @@ -26,7 +26,7 @@ public function testImageUrlAcceptsCustomWidthAndHeight() ); } - public function testImageUrlAcceptsCustomCategory() + public function testImageUrlAcceptsCustomCategory(): void { self::assertMatchesRegularExpression( '#^https://via.placeholder.com/800x400.png/[\w]{6}\?text=nature\+.*#', @@ -34,7 +34,7 @@ public function testImageUrlAcceptsCustomCategory() ); } - public function testImageUrlAcceptsCustomText() + public function testImageUrlAcceptsCustomText(): void { self::assertMatchesRegularExpression( '#^https://via.placeholder.com/800x400.png/[\w]{6}\?text=nature\+Faker#', @@ -42,7 +42,7 @@ public function testImageUrlAcceptsCustomText() ); } - public function testImageUrlReturnsLinkToRegularImageWhenGrayIsFalse() + public function testImageUrlReturnsLinkToRegularImageWhenGrayIsFalse(): void { $imageUrl = Image::imageUrl( 800, @@ -59,7 +59,7 @@ public function testImageUrlReturnsLinkToRegularImageWhenGrayIsFalse() ); } - public function testImageUrlReturnsLinkToRegularImageWhenGrayIsTrue() + public function testImageUrlReturnsLinkToRegularImageWhenGrayIsTrue(): void { $imageUrl = Image::imageUrl( 800, @@ -76,7 +76,7 @@ public function testImageUrlReturnsLinkToRegularImageWhenGrayIsTrue() ); } - public function testImageUrlAddsARandomGetParameterByDefault() + public function testImageUrlAddsARandomGetParameterByDefault(): void { $url = Image::imageUrl(800, 400); $splitUrl = preg_split('/\?text=/', $url); @@ -85,7 +85,7 @@ public function testImageUrlAddsARandomGetParameterByDefault() self::assertMatchesRegularExpression('#\w*#', $splitUrl[1]); } - public function testImageUrlThrowsExceptionOnInvalidImageFormat() + public function testImageUrlThrowsExceptionOnInvalidImageFormat(): void { $this->expectException(\InvalidArgumentException::class); Image::imageUrl( @@ -99,7 +99,7 @@ public function testImageUrlThrowsExceptionOnInvalidImageFormat() ); } - public function testImageUrlAcceptsDifferentImageFormats() + public function testImageUrlAcceptsDifferentImageFormats(): void { foreach (Image::getFormats() as $format) { $imageUrl = Image::imageUrl( @@ -119,7 +119,7 @@ public function testImageUrlAcceptsDifferentImageFormats() } } - public function testDownloadWithDefaults() + public function testDownloadWithDefaults(): void { self::checkUrlConnection(Image::BASE_URL); @@ -129,7 +129,7 @@ public function testDownloadWithDefaults() self::checkImageProperties($file, 640, 480, 'png'); } - public function testDownloadWithDifferentImageFormats() + public function testDownloadWithDifferentImageFormats(): void { self::checkUrlConnection(Image::BASE_URL); @@ -158,7 +158,7 @@ private static function checkImageProperties( int $width, int $height, string $format - ) { + ): void { if (function_exists('getimagesize')) { $imageConstants = Image::getFormatConstants(); [$actualWidth, $actualHeight, $type, $attr] = getimagesize($file); @@ -174,7 +174,7 @@ private static function checkImageProperties( } } - private static function checkUrlConnection(string $url) + private static function checkUrlConnection(string $url): void { $curlPing = curl_init($url); curl_setopt($curlPing, CURLOPT_TIMEOUT, 5); diff --git a/test/Faker/Provider/InternetTest.php b/test/Faker/Provider/InternetTest.php index 646bab5397..8da667675b 100644 --- a/test/Faker/Provider/InternetTest.php +++ b/test/Faker/Provider/InternetTest.php @@ -16,7 +16,7 @@ final class InternetTest extends TestCase /** * @dataProvider localeDataProvider */ - public function testEmailIsValid($locale) + public function testEmailIsValid($locale): void { $this->loadLocalProviders($locale); self::assertNotFalse(filter_var($this->faker->email(), FILTER_VALIDATE_EMAIL)); @@ -25,7 +25,7 @@ public function testEmailIsValid($locale) /** * @dataProvider localeDataProvider */ - public function testUsernameIsValid($locale) + public function testUsernameIsValid($locale): void { $this->loadLocalProviders($locale); $pattern = '/^[A-Za-z0-9]+([._][A-Za-z0-9]+)*$/'; @@ -36,7 +36,7 @@ public function testUsernameIsValid($locale) /** * @dataProvider localeDataProvider */ - public function testDomainnameIsValid($locale) + public function testDomainnameIsValid($locale): void { $this->loadLocalProviders($locale); $pattern = '/^[a-z]+(\.[a-z]+)+$/'; @@ -47,7 +47,7 @@ public function testDomainnameIsValid($locale) /** * @dataProvider localeDataProvider */ - public function testDomainwordIsValid($locale) + public function testDomainwordIsValid($locale): void { $this->loadLocalProviders($locale); $pattern = '/^[a-z]+$/'; @@ -55,75 +55,75 @@ public function testDomainwordIsValid($locale) self::assertMatchesRegularExpression($pattern, $domainWord); } - public function loadLocalProviders($locale) + public function loadLocalProviders($locale): void { $this->loadLocalProvider($locale, 'Internet'); $this->loadLocalProvider($locale, 'Person'); $this->loadLocalProvider($locale, 'Company'); } - public function testPasswordIsValid() + public function testPasswordIsValid(): void { self::assertMatchesRegularExpression('/^.{6}$/', $this->faker->password(6, 6)); } - public function testSlugIsValid() + public function testSlugIsValid(): void { $pattern = '/^[a-z0-9-]+$/'; $slug = $this->faker->slug(); self::assertSame(preg_match($pattern, $slug), 1); } - public function testSlugWithoutVariableNbWordsProducesValidSlug() + public function testSlugWithoutVariableNbWordsProducesValidSlug(): void { $pattern = '/^[a-z0-9-]+$/'; $slug = $this->faker->slug(6, false); self::assertSame(preg_match($pattern, $slug), 1); } - public function testSlugWithoutVariableNbWordsProducesCorrectNumberOfNbWords() + public function testSlugWithoutVariableNbWordsProducesCorrectNumberOfNbWords(): void { $slug = $this->faker->slug(3, false); self::assertCount(3, explode('-', $slug)); } - public function testSlugWithoutNbWordsIsEmpty() + public function testSlugWithoutNbWordsIsEmpty(): void { $slug = $this->faker->slug(0); self::assertSame('', $slug); } - public function testUrlIsValid() + public function testUrlIsValid(): void { self::assertNotFalse(filter_var($this->faker->url(), FILTER_VALIDATE_URL)); } - public function testLocalIpv4() + public function testLocalIpv4(): void { self::assertNotFalse(filter_var($this->faker->localIpv4(), FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)); } - public function testIpv4() + public function testIpv4(): void { self::assertNotFalse(filter_var($this->faker->ipv4(), FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)); } - public function testIpv4NotLocalNetwork() + public function testIpv4NotLocalNetwork(): void { self::assertDoesNotMatchRegularExpression('/\A0\./', $this->faker->ipv4()); } - public function testIpv4NotBroadcast() + public function testIpv4NotBroadcast(): void { self::assertNotEquals('255.255.255.255', $this->faker->ipv4()); } - public function testIpv6() + public function testIpv6(): void { self::assertNotFalse(filter_var($this->faker->ipv6(), FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)); } - public function testMacAddress() + public function testMacAddress(): void { self::assertNotFalse(filter_var($this->faker->macAddress(), FILTER_VALIDATE_MAC)); } diff --git a/test/Faker/Provider/LoremTest.php b/test/Faker/Provider/LoremTest.php index 33ceceeab8..1d2ed8c917 100644 --- a/test/Faker/Provider/LoremTest.php +++ b/test/Faker/Provider/LoremTest.php @@ -10,48 +10,48 @@ */ final class LoremTest extends TestCase { - public function testTextThrowsExceptionWhenAskedTextSizeLessThan5() + public function testTextThrowsExceptionWhenAskedTextSizeLessThan5(): void { $this->expectException(\InvalidArgumentException::class); Lorem::text(4); } - public function testTextReturnsWordsWhenAskedSizeLessThan25() + public function testTextReturnsWordsWhenAskedSizeLessThan25(): void { self::assertEquals('Word word word word.', TestableLorem::text(24)); } - public function testTextReturnsSentencesWhenAskedSizeLessThan100() + public function testTextReturnsSentencesWhenAskedSizeLessThan100(): void { self::assertEquals('This is a test sentence. This is a test sentence. This is a test sentence.', TestableLorem::text(99)); } - public function testTextReturnsParagraphsWhenAskedSizeGreaterOrEqualThanThan100() + public function testTextReturnsParagraphsWhenAskedSizeGreaterOrEqualThanThan100(): void { self::assertEquals('This is a test paragraph. It has three sentences. Exactly three.', TestableLorem::text(100)); } - public function testSentenceWithZeroNbWordsReturnsEmptyString() + public function testSentenceWithZeroNbWordsReturnsEmptyString(): void { self::assertEquals('', Lorem::sentence(0)); } - public function testSentenceWithNegativeNbWordsReturnsEmptyString() + public function testSentenceWithNegativeNbWordsReturnsEmptyString(): void { self::assertEquals('', Lorem::sentence(-1)); } - public function testParagraphWithZeroNbSentencesReturnsEmptyString() + public function testParagraphWithZeroNbSentencesReturnsEmptyString(): void { self::assertEquals('', Lorem::paragraph(0)); } - public function testParagraphWithNegativeNbSentencesReturnsEmptyString() + public function testParagraphWithNegativeNbSentencesReturnsEmptyString(): void { self::assertEquals('', Lorem::paragraph(-1)); } - public function testSentenceWithPositiveNbWordsReturnsAtLeastOneWord() + public function testSentenceWithPositiveNbWordsReturnsAtLeastOneWord(): void { $sentence = Lorem::sentence(1); @@ -59,7 +59,7 @@ public function testSentenceWithPositiveNbWordsReturnsAtLeastOneWord() self::assertGreaterThanOrEqual(1, count(explode(' ', $sentence))); } - public function testParagraphWithPositiveNbSentencesReturnsAtLeastOneWord() + public function testParagraphWithPositiveNbSentencesReturnsAtLeastOneWord(): void { $paragraph = Lorem::paragraph(1); @@ -67,21 +67,21 @@ public function testParagraphWithPositiveNbSentencesReturnsAtLeastOneWord() self::assertGreaterThanOrEqual(1, count(explode(' ', $paragraph))); } - public function testWordssAsText() + public function testWordssAsText(): void { $words = TestableLorem::words(2, true); self::assertEquals('word word', $words); } - public function testSentencesAsText() + public function testSentencesAsText(): void { $sentences = TestableLorem::sentences(2, true); self::assertEquals('This is a test sentence. This is a test sentence.', $sentences); } - public function testParagraphsAsText() + public function testParagraphsAsText(): void { $paragraphs = TestableLorem::paragraphs(2, true); diff --git a/test/Faker/Provider/MiscellaneousTest.php b/test/Faker/Provider/MiscellaneousTest.php index 233b9ca271..51336d8e3b 100644 --- a/test/Faker/Provider/MiscellaneousTest.php +++ b/test/Faker/Provider/MiscellaneousTest.php @@ -10,52 +10,52 @@ */ final class MiscellaneousTest extends TestCase { - public function testBoolean() + public function testBoolean(): void { self::assertContains(Miscellaneous::boolean(), [true, false]); } - public function testMd5() + public function testMd5(): void { self::assertMatchesRegularExpression('/^[a-z0-9]{32}$/', Miscellaneous::md5()); } - public function testSha1() + public function testSha1(): void { self::assertMatchesRegularExpression('/^[a-z0-9]{40}$/', Miscellaneous::sha1()); } - public function testSha256() + public function testSha256(): void { self::assertMatchesRegularExpression('/^[a-z0-9]{64}$/', Miscellaneous::sha256()); } - public function testLocale() + public function testLocale(): void { self::assertMatchesRegularExpression('/^[a-z]{2,3}_[A-Z]{2}$/', Miscellaneous::locale()); } - public function testCountryCode() + public function testCountryCode(): void { self::assertMatchesRegularExpression('/^[A-Z]{2}$/', Miscellaneous::countryCode()); } - public function testCountryISOAlpha3() + public function testCountryISOAlpha3(): void { self::assertMatchesRegularExpression('/^[A-Z]{3}$/', Miscellaneous::countryISOAlpha3()); } - public function testLanguage() + public function testLanguage(): void { self::assertMatchesRegularExpression('/^[a-z]{2}$/', Miscellaneous::languageCode()); } - public function testCurrencyCode() + public function testCurrencyCode(): void { self::assertMatchesRegularExpression('/^[A-Z]{3}$/', Miscellaneous::currencyCode()); } - public function testEmoji() + public function testEmoji(): void { self::assertMatchesRegularExpression('/^[\x{1F600}-\x{1F637}]$/u', Miscellaneous::emoji()); } diff --git a/test/Faker/Provider/PaymentTest.php b/test/Faker/Provider/PaymentTest.php index f564d07b28..1e90da0d9e 100644 --- a/test/Faker/Provider/PaymentTest.php +++ b/test/Faker/Provider/PaymentTest.php @@ -15,7 +15,7 @@ */ final class PaymentTest extends TestCase { - public function testCreditCardTypeReturnsValidVendorName() + public function testCreditCardTypeReturnsValidVendorName(): void { self::assertContains($this->faker->creditCardType, ['Visa', 'Visa Retired', 'MasterCard', 'American Express', 'Discover Card', 'JCB']); } @@ -34,26 +34,26 @@ public function creditCardNumberProvider() /** * @dataProvider creditCardNumberProvider */ - public function testCreditCardNumberReturnsValidCreditCardNumber($type, $regexp) + public function testCreditCardNumberReturnsValidCreditCardNumber($type, $regexp): void { $cardNumber = $this->faker->creditCardNumber($type); self::assertMatchesRegularExpression($regexp, $cardNumber); self::assertTrue(Luhn::isValid($cardNumber)); } - public function testCreditCardNumberCanFormatOutput() + public function testCreditCardNumberCanFormatOutput(): void { self::assertMatchesRegularExpression('/^6011-\d{4}-\d{4}-\d{4}$/', $this->faker->creditCardNumber('Discover Card', true)); } - public function testCreditCardExpirationDateReturnsValidDateByDefault() + public function testCreditCardExpirationDateReturnsValidDateByDefault(): void { $expirationDate = $this->faker->creditCardExpirationDate; self::assertGreaterThan(time(), $expirationDate->getTimestamp()); self::assertLessThan(strtotime('+36 months'), $expirationDate->getTimestamp()); } - public function testRandomCard() + public function testRandomCard(): void { $cardDetails = $this->faker->creditCardDetails; self::assertEquals(count($cardDetails), 4); @@ -132,7 +132,7 @@ public function testRandomCard() /** * @dataProvider localeDataProvider */ - public function testBankAccountNumber($locale) + public function testBankAccountNumber($locale): void { $parts = explode('_', $locale); $countryCode = array_pop($parts); @@ -176,7 +176,7 @@ public function ibanFormatProvider() /** * @dataProvider ibanFormatProvider */ - public function testIban($countryCode, $regex) + public function testIban($countryCode, $regex): void { $iban = $this->faker->iban($countryCode); diff --git a/test/Faker/Provider/PersonTest.php b/test/Faker/Provider/PersonTest.php index 469c25f380..1d2b02265d 100644 --- a/test/Faker/Provider/PersonTest.php +++ b/test/Faker/Provider/PersonTest.php @@ -13,7 +13,7 @@ final class PersonTest extends TestCase /** * @dataProvider firstNameProvider */ - public function testFirstName($gender, $expected) + public function testFirstName($gender, $expected): void { self::assertContains($this->faker->firstName($gender), $expected); } @@ -28,12 +28,12 @@ public function firstNameProvider() ]; } - public function testFirstNameMale() + public function testFirstNameMale(): void { self::assertContains(Person::firstNameMale(), ['John']); } - public function testFirstNameFemale() + public function testFirstNameFemale(): void { self::assertContains(Person::firstNameFemale(), ['Jane']); } @@ -41,7 +41,7 @@ public function testFirstNameFemale() /** * @dataProvider titleProvider */ - public function testTitle($gender, $expected) + public function testTitle($gender, $expected): void { self::assertContains($this->faker->title($gender), $expected); } @@ -56,22 +56,22 @@ public function titleProvider() ]; } - public function testTitleMale() + public function testTitleMale(): void { self::assertContains(Person::titleMale(), ['Mr.', 'Dr.', 'Prof.']); } - public function testTitleFemale() + public function testTitleFemale(): void { self::assertContains(Person::titleFemale(), ['Mrs.', 'Ms.', 'Miss', 'Dr.', 'Prof.']); } - public function testLastNameReturnsDoe() + public function testLastNameReturnsDoe(): void { self::assertEquals($this->faker->lastName(), 'Doe'); } - public function testNameReturnsFirstNameAndLastName() + public function testNameReturnsFirstNameAndLastName(): void { self::assertContains($this->faker->name(), ['John Doe', 'Jane Doe']); self::assertContains($this->faker->name('foobar'), ['John Doe', 'Jane Doe']); diff --git a/test/Faker/Provider/PhoneNumberTest.php b/test/Faker/Provider/PhoneNumberTest.php index 8a1b3c7238..fe412d8406 100644 --- a/test/Faker/Provider/PhoneNumberTest.php +++ b/test/Faker/Provider/PhoneNumberTest.php @@ -11,7 +11,7 @@ */ final class PhoneNumberTest extends TestCase { - public function testE164PhoneNumberFormat() + public function testE164PhoneNumberFormat(): void { for ($i = 0; $i < 1000; ++$i) { $number = $this->faker->e164PhoneNumber(); @@ -20,7 +20,7 @@ public function testE164PhoneNumberFormat() } } - public function testImeiReturnsValidNumber() + public function testImeiReturnsValidNumber(): void { $imei = $this->faker->imei(); self::assertTrue(Luhn::isValid($imei)); diff --git a/test/Faker/Provider/ProviderOverrideTest.php b/test/Faker/Provider/ProviderOverrideTest.php index 2d04495947..de07e803b6 100644 --- a/test/Faker/Provider/ProviderOverrideTest.php +++ b/test/Faker/Provider/ProviderOverrideTest.php @@ -31,7 +31,7 @@ final class ProviderOverrideTest extends TestCase * * @param string $locale */ - public function testAddress($locale = null) + public function testAddress($locale = null): void { $faker = Faker\Factory::create($locale); @@ -46,7 +46,7 @@ public function testAddress($locale = null) * * @param string $locale */ - public function testCompany($locale = null) + public function testCompany($locale = null): void { $faker = Faker\Factory::create($locale); @@ -58,7 +58,7 @@ public function testCompany($locale = null) * * @param string $locale */ - public function testDateTime($locale = null) + public function testDateTime($locale = null): void { $faker = Faker\Factory::create($locale); @@ -71,7 +71,7 @@ public function testDateTime($locale = null) * * @param string $locale */ - public function testInternet($locale = null) + public function testInternet($locale = null): void { $faker = Faker\Factory::create($locale); @@ -88,7 +88,7 @@ public function testInternet($locale = null) * * @param string $locale */ - public function testPerson($locale = null) + public function testPerson($locale = null): void { $faker = Faker\Factory::create($locale); @@ -103,7 +103,7 @@ public function testPerson($locale = null) * * @param string $locale */ - public function testPhoneNumber($locale = null) + public function testPhoneNumber($locale = null): void { $faker = Faker\Factory::create($locale); @@ -115,7 +115,7 @@ public function testPhoneNumber($locale = null) * * @param string $locale */ - public function testUserAgent($locale = null) + public function testUserAgent($locale = null): void { $faker = Faker\Factory::create($locale); @@ -128,7 +128,7 @@ public function testUserAgent($locale = null) * @param null $locale * @param string $locale */ - public function testUuid($locale = null) + public function testUuid($locale = null): void { $faker = Faker\Factory::create($locale); diff --git a/test/Faker/Provider/TextTest.php b/test/Faker/Provider/TextTest.php index 65c648cf07..05b79e95a4 100644 --- a/test/Faker/Provider/TextTest.php +++ b/test/Faker/Provider/TextTest.php @@ -21,7 +21,7 @@ final class TextTest extends TestCase * [200] * [500] */ - public function testRealTextMaxLength($length) + public function testRealTextMaxLength($length): void { self::assertLessThan($length, strlen($this->faker->realText($length))); } @@ -37,12 +37,12 @@ public function testRealTextMaxLength($length) * [200] * [500] */ - public function testRealTextMinLength($length) + public function testRealTextMinLength($length): void { self::assertGreaterThanOrEqual($length * 0.8, strlen($this->faker->realText($length))); } - public function testRealTextMaxIndex() + public function testRealTextMaxIndex(): void { $this->expectException(\InvalidArgumentException::class); @@ -51,7 +51,7 @@ public function testRealTextMaxIndex() self::fail('The index should be less than or equal to 5.'); } - public function testRealTextMinIndex() + public function testRealTextMinIndex(): void { $this->expectException(\InvalidArgumentException::class); @@ -60,7 +60,7 @@ public function testRealTextMinIndex() self::fail('The index should be greater than or equal to 1.'); } - public function testRealTextMinNbChars() + public function testRealTextMinNbChars(): void { $this->expectException(\InvalidArgumentException::class); @@ -78,7 +78,7 @@ public function testRealTextMinNbChars() * [180, 200] * [1950, 2000] */ - public function testRealTextBetweenTextLength($min, $max) + public function testRealTextBetweenTextLength($min, $max): void { $strlen = strlen($this->faker->realTextBetween($min, $max)); @@ -86,7 +86,7 @@ public function testRealTextBetweenTextLength($min, $max) self::assertLessThan($max, $strlen); } - public function testRealTextBetweenMinNbChars() + public function testRealTextBetweenMinNbChars(): void { $this->expectException(\InvalidArgumentException::class); @@ -95,7 +95,7 @@ public function testRealTextBetweenMinNbChars() self::fail('minNbChars should be smaller than maxNbChars'); } - public function testRealTextBetweenMinNbCharsGreaterThan1() + public function testRealTextBetweenMinNbCharsGreaterThan1(): void { $this->expectException(\InvalidArgumentException::class); diff --git a/test/Faker/Provider/UserAgentTest.php b/test/Faker/Provider/UserAgentTest.php index cf7386a474..15a9ae6b7f 100644 --- a/test/Faker/Provider/UserAgentTest.php +++ b/test/Faker/Provider/UserAgentTest.php @@ -10,7 +10,7 @@ */ final class UserAgentTest extends TestCase { - public function testAllAgents() + public function testAllAgents(): void { $agent = new UserAgent($this->faker); $reflection = new \ReflectionClass($agent); @@ -22,37 +22,37 @@ public function testAllAgents() } } - public function testRandomUserAgent() + public function testRandomUserAgent(): void { self::assertNotNull(UserAgent::userAgent()); } - public function testFirefoxUserAgent() + public function testFirefoxUserAgent(): void { self::assertStringContainsString(' Firefox/', UserAgent::firefox()); } - public function testSafariUserAgent() + public function testSafariUserAgent(): void { self::assertStringContainsString('Safari/', UserAgent::safari()); } - public function testInternetExplorerUserAgent() + public function testInternetExplorerUserAgent(): void { self::assertStringStartsWith('Mozilla/5.0 (compatible; MSIE ', UserAgent::internetExplorer()); } - public function testOperaUserAgent() + public function testOperaUserAgent(): void { self::assertStringStartsWith('Opera/', UserAgent::opera()); } - public function testChromeUserAgent() + public function testChromeUserAgent(): void { self::assertStringContainsString('(KHTML, like Gecko) Chrome/', UserAgent::chrome()); } - public function testMSEdgeUserAgent() + public function testMSEdgeUserAgent(): void { self::assertStringContainsString('Edg', UserAgent::msedge()); } diff --git a/test/Faker/Provider/UuidTest.php b/test/Faker/Provider/UuidTest.php index 8d047c5255..ea410ffe6c 100644 --- a/test/Faker/Provider/UuidTest.php +++ b/test/Faker/Provider/UuidTest.php @@ -10,13 +10,13 @@ */ final class UuidTest extends TestCase { - public function testUuidReturnsUuid() + public function testUuidReturnsUuid(): void { $uuid = BaseProvider::uuid(); self::assertTrue($this->isUuid($uuid)); } - public function testUuidExpectedSeed() + public function testUuidExpectedSeed(): void { if (pack('L', 0x6162797A) == pack('N', 0x6162797A)) { self::markTestSkipped('Big Endian'); diff --git a/test/Faker/Provider/ar_EG/CompanyTest.php b/test/Faker/Provider/ar_EG/CompanyTest.php index 189dfb12c8..382f328b83 100644 --- a/test/Faker/Provider/ar_EG/CompanyTest.php +++ b/test/Faker/Provider/ar_EG/CompanyTest.php @@ -11,14 +11,14 @@ */ final class CompanyTest extends TestCase { - public function testCompanyTaxIdNumberIsValid() + public function testCompanyTaxIdNumberIsValid(): void { $companyTaxIdNumber = $this->faker->companyTaxIdNumber(); self::assertMatchesRegularExpression('/\d{9}$/', $companyTaxIdNumber); self::assertTrue(Luhn::isValid($companyTaxIdNumber)); } - public function testCompanyTradeRegisterNumberIsValid() + public function testCompanyTradeRegisterNumberIsValid(): void { $companyTradeRegisterNumber = $this->faker->companyTradeRegisterNumber(); self::assertMatchesRegularExpression('/\d{6}$/', $companyTradeRegisterNumber); diff --git a/test/Faker/Provider/ar_EG/InternetTest.php b/test/Faker/Provider/ar_EG/InternetTest.php index ebb07c9f14..8be152ad3d 100644 --- a/test/Faker/Provider/ar_EG/InternetTest.php +++ b/test/Faker/Provider/ar_EG/InternetTest.php @@ -10,7 +10,7 @@ */ final class InternetTest extends TestCase { - public function testEmailIsValid() + public function testEmailIsValid(): void { $email = $this->faker->email(); self::assertMatchesRegularExpression('/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-z]{2,3}$/', $email); diff --git a/test/Faker/Provider/ar_EG/PersonTest.php b/test/Faker/Provider/ar_EG/PersonTest.php index 226788eabc..b940c7be63 100644 --- a/test/Faker/Provider/ar_EG/PersonTest.php +++ b/test/Faker/Provider/ar_EG/PersonTest.php @@ -11,7 +11,7 @@ */ final class PersonTest extends TestCase { - public function testNationalIdNumber() + public function testNationalIdNumber(): void { $nationalIdNumber = $this->faker->nationalIdNumber(); self::assertMatchesRegularExpression('/^2\d{13}$/', $nationalIdNumber); diff --git a/test/Faker/Provider/ar_EG/TextTest.php b/test/Faker/Provider/ar_EG/TextTest.php index 8191b48137..c18b51950c 100644 --- a/test/Faker/Provider/ar_EG/TextTest.php +++ b/test/Faker/Provider/ar_EG/TextTest.php @@ -10,7 +10,7 @@ */ final class TextTest extends TestCase { - public function testText() + public function testText(): void { self::assertNotSame('', $this->faker->realtext(200, 2)); } diff --git a/test/Faker/Provider/ar_JO/InternetTest.php b/test/Faker/Provider/ar_JO/InternetTest.php index c184b97df6..534965a784 100644 --- a/test/Faker/Provider/ar_JO/InternetTest.php +++ b/test/Faker/Provider/ar_JO/InternetTest.php @@ -12,7 +12,7 @@ */ final class InternetTest extends TestCase { - public function testEmailIsValid() + public function testEmailIsValid(): void { $email = $this->faker->email(); self::assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); diff --git a/test/Faker/Provider/ar_SA/CompanyTest.php b/test/Faker/Provider/ar_SA/CompanyTest.php index 84c277012f..e79272d83e 100644 --- a/test/Faker/Provider/ar_SA/CompanyTest.php +++ b/test/Faker/Provider/ar_SA/CompanyTest.php @@ -11,7 +11,7 @@ */ final class CompanyTest extends TestCase { - public function testCompanyIdNumberIsValid() + public function testCompanyIdNumberIsValid(): void { $companyIdNumber = $this->faker->companyIdNumber; self::assertMatchesRegularExpression('/^700\d{7}$/', $companyIdNumber); diff --git a/test/Faker/Provider/ar_SA/InternetTest.php b/test/Faker/Provider/ar_SA/InternetTest.php index af8bcc993e..5b666a02e8 100644 --- a/test/Faker/Provider/ar_SA/InternetTest.php +++ b/test/Faker/Provider/ar_SA/InternetTest.php @@ -10,7 +10,7 @@ */ final class InternetTest extends TestCase { - public function testEmailIsValid() + public function testEmailIsValid(): void { $email = $this->faker->email(); self::assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); diff --git a/test/Faker/Provider/ar_SA/PersonTest.php b/test/Faker/Provider/ar_SA/PersonTest.php index d8ad7f6de1..c3c46faa2e 100644 --- a/test/Faker/Provider/ar_SA/PersonTest.php +++ b/test/Faker/Provider/ar_SA/PersonTest.php @@ -11,21 +11,21 @@ */ final class PersonTest extends TestCase { - public function testIdNumber() + public function testIdNumber(): void { $idNumber = $this->faker->idNumber; self::assertMatchesRegularExpression('/^[1|2]\d{9}$/', $idNumber); self::assertTrue(Luhn::isValid($idNumber)); } - public function testNationalIdNumber() + public function testNationalIdNumber(): void { $nationalIdNumber = $this->faker->nationalIdNumber; self::assertMatchesRegularExpression('/^1\d{9}$/', $nationalIdNumber); self::assertTrue(Luhn::isValid($nationalIdNumber)); } - public function testForeignerIdNumber() + public function testForeignerIdNumber(): void { $foreignerIdNumber = $this->faker->foreignerIdNumber; self::assertMatchesRegularExpression('/^2\d{9}$/', $foreignerIdNumber); diff --git a/test/Faker/Provider/bg_BG/PaymentTest.php b/test/Faker/Provider/bg_BG/PaymentTest.php index 2ff0be9143..e429e64e86 100644 --- a/test/Faker/Provider/bg_BG/PaymentTest.php +++ b/test/Faker/Provider/bg_BG/PaymentTest.php @@ -10,7 +10,7 @@ */ final class PaymentTest extends TestCase { - public function testVatIsValid() + public function testVatIsValid(): void { $vat = $this->faker->vat(); $unspacedVat = $this->faker->vat(false); diff --git a/test/Faker/Provider/bn_BD/PersonTest.php b/test/Faker/Provider/bn_BD/PersonTest.php index 2da1a5b58e..38223f4d0f 100644 --- a/test/Faker/Provider/bn_BD/PersonTest.php +++ b/test/Faker/Provider/bn_BD/PersonTest.php @@ -10,13 +10,13 @@ */ final class PersonTest extends TestCase { - public function testIfFirstNameMaleCanReturnData() + public function testIfFirstNameMaleCanReturnData(): void { $firstNameMale = $this->faker->firstNameMale(); self::assertNotEmpty($firstNameMale); } - public function testIfFirstNameFemaleCanReturnData() + public function testIfFirstNameFemaleCanReturnData(): void { $firstNameFemale = $this->faker->firstNameFemale(); self::assertNotEmpty($firstNameFemale); diff --git a/test/Faker/Provider/cs_CZ/PersonTest.php b/test/Faker/Provider/cs_CZ/PersonTest.php index 767ce65ba7..5d0adaf845 100644 --- a/test/Faker/Provider/cs_CZ/PersonTest.php +++ b/test/Faker/Provider/cs_CZ/PersonTest.php @@ -11,7 +11,7 @@ */ final class PersonTest extends TestCase { - public function testBirthNumber() + public function testBirthNumber(): void { for ($i = 0; $i < 1000; ++$i) { $birthNumber = $this->faker->birthNumber(); diff --git a/test/Faker/Provider/da_DK/InternetTest.php b/test/Faker/Provider/da_DK/InternetTest.php index 6a1b04fb81..ad84d6f0f0 100644 --- a/test/Faker/Provider/da_DK/InternetTest.php +++ b/test/Faker/Provider/da_DK/InternetTest.php @@ -12,7 +12,7 @@ */ final class InternetTest extends TestCase { - public function testEmailIsValid() + public function testEmailIsValid(): void { $email = $this->faker->email(); self::assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); diff --git a/test/Faker/Provider/de_AT/AddressTest.php b/test/Faker/Provider/de_AT/AddressTest.php index 74c3598d36..7bc8072b4a 100644 --- a/test/Faker/Provider/de_AT/AddressTest.php +++ b/test/Faker/Provider/de_AT/AddressTest.php @@ -13,7 +13,7 @@ final class AddressTest extends TestCase /** * @see https://en.wikipedia.org/wiki/List_of_postal_codes_in_Austria */ - public function testPostcodeReturnsPostcodeThatMatchesAustrianFormat() + public function testPostcodeReturnsPostcodeThatMatchesAustrianFormat(): void { $postcode = $this->faker->postcode; diff --git a/test/Faker/Provider/de_AT/InternetTest.php b/test/Faker/Provider/de_AT/InternetTest.php index 7c7203b431..9c65a42ba5 100644 --- a/test/Faker/Provider/de_AT/InternetTest.php +++ b/test/Faker/Provider/de_AT/InternetTest.php @@ -12,7 +12,7 @@ */ final class InternetTest extends TestCase { - public function testEmailIsValid() + public function testEmailIsValid(): void { $email = $this->faker->email(); self::assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); diff --git a/test/Faker/Provider/de_AT/PaymentTest.php b/test/Faker/Provider/de_AT/PaymentTest.php index 067c28f54a..378571a09c 100644 --- a/test/Faker/Provider/de_AT/PaymentTest.php +++ b/test/Faker/Provider/de_AT/PaymentTest.php @@ -10,7 +10,7 @@ */ final class PaymentTest extends TestCase { - public function testVatIsValid() + public function testVatIsValid(): void { $vat = $this->faker->vat(); $unspacedVat = $this->faker->vat(false); @@ -18,7 +18,7 @@ public function testVatIsValid() self::assertMatchesRegularExpression('/^(ATU\d{8})$/', $unspacedVat); } - public function testBankAccountNumber() + public function testBankAccountNumber(): void { $accNo = $this->faker->bankAccountNumber; self::assertEquals(substr($accNo, 0, 2), 'AT'); diff --git a/test/Faker/Provider/de_AT/PersonTest.php b/test/Faker/Provider/de_AT/PersonTest.php index 3086d36aa1..26217fc6e9 100644 --- a/test/Faker/Provider/de_AT/PersonTest.php +++ b/test/Faker/Provider/de_AT/PersonTest.php @@ -10,7 +10,7 @@ */ final class PersonTest extends TestCase { - public function testSsnWithDefaultValuesCorrect() + public function testSsnWithDefaultValuesCorrect(): void { for ($i = 0; $i < 100; ++$i) { $number = $this->faker->ssn; @@ -27,7 +27,7 @@ public function testSsnWithDefaultValuesCorrect() } } - public function testSsnWithGivenBirthDateCorrect() + public function testSsnWithGivenBirthDateCorrect(): void { $number = $this->faker->ssn(new \DateTime('2010-09-08 06:05:04')); @@ -50,7 +50,7 @@ protected function getProviders(): iterable yield new Person($this->faker); } - private function assertCorrectSsnVerificationNumber($ssn) + private function assertCorrectSsnVerificationNumber($ssn): void { $weights = [3, 7, 9, 0, 5, 8, 4, 2, 1, 6]; $checkSum = 0; diff --git a/test/Faker/Provider/de_AT/PhoneNumberTest.php b/test/Faker/Provider/de_AT/PhoneNumberTest.php index 5c41215a92..85551e8bc0 100644 --- a/test/Faker/Provider/de_AT/PhoneNumberTest.php +++ b/test/Faker/Provider/de_AT/PhoneNumberTest.php @@ -10,13 +10,13 @@ */ final class PhoneNumberTest extends TestCase { - public function testPhoneNumberFormat() + public function testPhoneNumberFormat(): void { $number = $this->faker->phoneNumber; self::assertMatchesRegularExpression('/^06\d{2} \d{7}|\+43 \d{4} \d{4}(-\d{2})?$/', $number); } - public function testE164PhoneNumberFormat() + public function testE164PhoneNumberFormat(): void { for ($i = 0; $i < 10; ++$i) { $number = $this->faker->e164PhoneNumber(); diff --git a/test/Faker/Provider/de_CH/AddressTest.php b/test/Faker/Provider/de_CH/AddressTest.php index 2837c96b76..d12dbcb90e 100644 --- a/test/Faker/Provider/de_CH/AddressTest.php +++ b/test/Faker/Provider/de_CH/AddressTest.php @@ -11,7 +11,7 @@ */ final class AddressTest extends TestCase { - public function testCanton() + public function testCanton(): void { $canton = $this->faker->canton(); self::assertIsArray($canton); @@ -25,21 +25,21 @@ public function testCanton() } } - public function testCantonName() + public function testCantonName(): void { $cantonName = $this->faker->cantonName(); self::assertIsString($cantonName); self::assertGreaterThan(2, strlen($cantonName)); } - public function testCantonShort() + public function testCantonShort(): void { $cantonShort = $this->faker->cantonShort(); self::assertIsString($cantonShort); self::assertEquals(2, strlen($cantonShort)); } - public function testAddress() + public function testAddress(): void { $address = $this->faker->address(); self::assertIsString($address); diff --git a/test/Faker/Provider/de_CH/InternetTest.php b/test/Faker/Provider/de_CH/InternetTest.php index e4faee0d43..6cf3cc1c74 100644 --- a/test/Faker/Provider/de_CH/InternetTest.php +++ b/test/Faker/Provider/de_CH/InternetTest.php @@ -12,7 +12,7 @@ */ final class InternetTest extends TestCase { - public function testEmailIsValid() + public function testEmailIsValid(): void { $email = $this->faker->email(); self::assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); diff --git a/test/Faker/Provider/de_CH/PersonTest.php b/test/Faker/Provider/de_CH/PersonTest.php index 9fc60b2890..6de728bd03 100644 --- a/test/Faker/Provider/de_CH/PersonTest.php +++ b/test/Faker/Provider/de_CH/PersonTest.php @@ -11,14 +11,14 @@ */ final class PersonTest extends TestCase { - public function testAvs13Number() + public function testAvs13Number(): void { $avs = $this->faker->avs13; self::assertMatchesRegularExpression('/^756\.([0-9]{4})\.([0-9]{4})\.([0-9]{2})$/', $avs); self::assertTrue(Ean::isValid(str_replace('.', '', $avs))); } - public function testAhv13Number() + public function testAhv13Number(): void { $ahv = $this->faker->ahv13; self::assertMatchesRegularExpression('/^756\.([0-9]{4})\.([0-9]{4})\.([0-9]{2})$/', $ahv); diff --git a/test/Faker/Provider/de_CH/PhoneNumberTest.php b/test/Faker/Provider/de_CH/PhoneNumberTest.php index 551414688d..853589f5aa 100644 --- a/test/Faker/Provider/de_CH/PhoneNumberTest.php +++ b/test/Faker/Provider/de_CH/PhoneNumberTest.php @@ -10,17 +10,17 @@ */ final class PhoneNumberTest extends TestCase { - public function testPhoneNumber() + public function testPhoneNumber(): void { self::assertMatchesRegularExpression('/^0\d{2} ?\d{3} ?\d{2} ?\d{2}|\+41 ?(\(0\))?\d{2} ?\d{3} ?\d{2} ?\d{2}$/', $this->faker->phoneNumber()); } - public function testMobileNumber() + public function testMobileNumber(): void { self::assertMatchesRegularExpression('/^07[56789] ?\d{3} ?\d{2} ?\d{2}$/', $this->faker->mobileNumber()); } - public function testE164PhoneNumberFormat() + public function testE164PhoneNumberFormat(): void { for ($i = 0; $i < 10; ++$i) { $number = $this->faker->e164PhoneNumber(); diff --git a/test/Faker/Provider/de_DE/InternetTest.php b/test/Faker/Provider/de_DE/InternetTest.php index 48c6fd07d8..7fabbd4183 100644 --- a/test/Faker/Provider/de_DE/InternetTest.php +++ b/test/Faker/Provider/de_DE/InternetTest.php @@ -12,7 +12,7 @@ */ final class InternetTest extends TestCase { - public function testEmailIsValid() + public function testEmailIsValid(): void { $email = $this->faker->email(); self::assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); diff --git a/test/Faker/Provider/de_DE/PhoneNumberTest.php b/test/Faker/Provider/de_DE/PhoneNumberTest.php index a57a8097c4..c0a66cd77d 100644 --- a/test/Faker/Provider/de_DE/PhoneNumberTest.php +++ b/test/Faker/Provider/de_DE/PhoneNumberTest.php @@ -10,7 +10,7 @@ */ final class PhoneNumberTest extends TestCase { - public function testPhoneNumber() + public function testPhoneNumber(): void { for ($i = 0; $i < 100; ++$i) { $number = $this->faker->phoneNumber(); @@ -20,7 +20,7 @@ public function testPhoneNumber() } } - public function testE164PhoneNumberFormat() + public function testE164PhoneNumberFormat(): void { for ($i = 0; $i < 100; ++$i) { $number = $this->faker->e164PhoneNumber(); @@ -28,7 +28,7 @@ public function testE164PhoneNumberFormat() } } - public function testMobileNumberFormat() + public function testMobileNumberFormat(): void { for ($i = 0; $i < 100; ++$i) { $number = $this->faker->mobileNumber(); @@ -36,7 +36,7 @@ public function testMobileNumberFormat() } } - public function testTollFreeAreaCode() + public function testTollFreeAreaCode(): void { self::assertContains($this->faker->tollFreeAreaCode(), [800]); } diff --git a/test/Faker/Provider/el_GR/PhoneNumberTest.php b/test/Faker/Provider/el_GR/PhoneNumberTest.php index 85421a3bad..2403fdd510 100644 --- a/test/Faker/Provider/el_GR/PhoneNumberTest.php +++ b/test/Faker/Provider/el_GR/PhoneNumberTest.php @@ -10,7 +10,7 @@ */ final class PhoneNumberTest extends TestCase { - public function testFixedLineNumber() + public function testFixedLineNumber(): void { $fixedLineNumber = $this->faker->fixedLineNumber(); self::assertNotSame(' ', $fixedLineNumber[0]); @@ -20,7 +20,7 @@ public function testFixedLineNumber() ); } - public function testMobileNumber() + public function testMobileNumber(): void { $mobileNumber = $this->faker->mobileNumber(); self::assertNotSame(' ', $mobileNumber[0]); @@ -30,7 +30,7 @@ public function testMobileNumber() ); } - public function testPersonalNumber() + public function testPersonalNumber(): void { $personalNumber = $this->faker->personalNumber(); self::assertNotSame(' ', $personalNumber[0]); @@ -40,7 +40,7 @@ public function testPersonalNumber() ); } - public function testTollFreeNumber() + public function testTollFreeNumber(): void { $tollFreeNumber = $this->faker->tollFreeNumber(); self::assertNotSame(' ', $tollFreeNumber[0]); @@ -50,7 +50,7 @@ public function testTollFreeNumber() ); } - public function testSharedCostNumber() + public function testSharedCostNumber(): void { $sharedCostNumber = $this->faker->sharedCostNumber(); self::assertNotSame(' ', $sharedCostNumber[0]); @@ -60,7 +60,7 @@ public function testSharedCostNumber() ); } - public function testPremiumRateNumber() + public function testPremiumRateNumber(): void { $premiumRateNumber = $this->faker->premiumRateNumber(); self::assertNotSame(' ', $premiumRateNumber[0]); diff --git a/test/Faker/Provider/el_GR/TextTest.php b/test/Faker/Provider/el_GR/TextTest.php index 5ffa347749..666912593e 100644 --- a/test/Faker/Provider/el_GR/TextTest.php +++ b/test/Faker/Provider/el_GR/TextTest.php @@ -25,7 +25,7 @@ protected function getMethod($name) return $method; } - public function testItShouldAppendEndPunctToTheEndOfString() + public function testItShouldAppendEndPunctToTheEndOfString(): void { self::assertSame( 'Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ.', diff --git a/test/Faker/Provider/en_AU/AddressTest.php b/test/Faker/Provider/en_AU/AddressTest.php index 78ce98c16b..35a5853cc7 100644 --- a/test/Faker/Provider/en_AU/AddressTest.php +++ b/test/Faker/Provider/en_AU/AddressTest.php @@ -9,7 +9,7 @@ */ final class AddressTest extends TestCase { - public function testCityPrefix() + public function testCityPrefix(): void { $cityPrefix = $this->faker->cityPrefix(); self::assertNotEmpty($cityPrefix); @@ -17,7 +17,7 @@ public function testCityPrefix() self::assertMatchesRegularExpression('/[A-Z][a-z]+/', $cityPrefix); } - public function testStreetSuffix() + public function testStreetSuffix(): void { $streetSuffix = $this->faker->streetSuffix(); self::assertNotEmpty($streetSuffix); @@ -25,7 +25,7 @@ public function testStreetSuffix() self::assertMatchesRegularExpression('/[A-Z][a-z]+/', $streetSuffix); } - public function testState() + public function testState(): void { $state = $this->faker->state(); self::assertNotEmpty($state); diff --git a/test/Faker/Provider/en_CA/AddressTest.php b/test/Faker/Provider/en_CA/AddressTest.php index 1f269dc091..6deff229d5 100644 --- a/test/Faker/Provider/en_CA/AddressTest.php +++ b/test/Faker/Provider/en_CA/AddressTest.php @@ -12,7 +12,7 @@ final class AddressTest extends TestCase /** * Test the validity of province */ - public function testProvince() + public function testProvince(): void { $province = $this->faker->province(); self::assertNotEmpty($province); @@ -23,7 +23,7 @@ public function testProvince() /** * Test the validity of province abbreviation */ - public function testProvinceAbbr() + public function testProvinceAbbr(): void { $provinceAbbr = $this->faker->provinceAbbr(); self::assertNotEmpty($provinceAbbr); @@ -34,7 +34,7 @@ public function testProvinceAbbr() /** * Test the validity of postcode letter */ - public function testPostcodeLetter() + public function testPostcodeLetter(): void { $postcodeLetter = $this->faker->randomPostcodeLetter(); self::assertNotEmpty($postcodeLetter); @@ -45,7 +45,7 @@ public function testPostcodeLetter() /** * Test the validity of Canadian postcode */ - public function testPostcode() + public function testPostcode(): void { $postcode = $this->faker->postcode(); self::assertNotEmpty($postcode); diff --git a/test/Faker/Provider/en_GB/AddressTest.php b/test/Faker/Provider/en_GB/AddressTest.php index 18862ec1f0..adc49b852c 100644 --- a/test/Faker/Provider/en_GB/AddressTest.php +++ b/test/Faker/Provider/en_GB/AddressTest.php @@ -9,7 +9,7 @@ */ final class AddressTest extends TestCase { - public function testPostcode() + public function testPostcode(): void { $postcode = $this->faker->postcode(); self::assertNotEmpty($postcode); diff --git a/test/Faker/Provider/en_GB/CompanyTest.php b/test/Faker/Provider/en_GB/CompanyTest.php index 3d423a5ba8..125ba2e56e 100644 --- a/test/Faker/Provider/en_GB/CompanyTest.php +++ b/test/Faker/Provider/en_GB/CompanyTest.php @@ -10,7 +10,7 @@ */ final class CompanyTest extends TestCase { - public function testModulus97Algorithm() + public function testModulus97Algorithm(): void { // 9755 format self::assertSame('27', $this->faker->calculateModulus97(1234567)); @@ -20,30 +20,30 @@ public function testModulus97Algorithm() self::assertSame('06', $this->faker->calculateModulus97(1271786)); } - public function testModulus97AlgorithmWithInvalidArgument() + public function testModulus97AlgorithmWithInvalidArgument(): void { $this->expectException(\InvalidArgumentException::class); $this->faker->calculateModulus97(123); } - public function testVat() + public function testVat(): void { $this->assertDefaultVatFormat($this->faker->vat()); $this->assertDefaultVatFormat($this->faker->vat(Company::VAT_TYPE_DEFAULT)); } - private function assertDefaultVatFormat($number) + private function assertDefaultVatFormat($number): void { self::assertEquals(1, preg_match('/^GB[\d]{3} [\d]{4} [\d]{2}$/', $number)); } - public function testVatBranchType() + public function testVatBranchType(): void { $number = $this->faker->vat(Company::VAT_TYPE_BRANCH); self::assertEquals(1, preg_match('/^GB[\d]{3} [\d]{4} [\d]{2} [\d]{3}$/', $number)); } - public function testVatGovernmentType() + public function testVatGovernmentType(): void { $number = $this->faker->vat(Company::VAT_TYPE_GOVERNMENT); $match = preg_match('/^GBGD([\d]{3})$/', $number, $matches); @@ -51,7 +51,7 @@ public function testVatGovernmentType() self::assertTrue($matches[1] < 499); } - public function testVatHealthAuthorityType() + public function testVatHealthAuthorityType(): void { $number = $this->faker->vat(Company::VAT_TYPE_HEALTH_AUTHORITY); $match = preg_match('/^GBHA([\d]{3})$/', $number, $matches); diff --git a/test/Faker/Provider/en_GB/PersonTest.php b/test/Faker/Provider/en_GB/PersonTest.php index 413659e4a0..8219993951 100644 --- a/test/Faker/Provider/en_GB/PersonTest.php +++ b/test/Faker/Provider/en_GB/PersonTest.php @@ -10,7 +10,7 @@ */ final class PersonTest extends TestCase { - public function testNationalInsuranceNumber() + public function testNationalInsuranceNumber(): void { $result = $this->faker->nino; diff --git a/test/Faker/Provider/en_GB/PhoneNumberTest.php b/test/Faker/Provider/en_GB/PhoneNumberTest.php index 14b05b58d2..db6ee1d122 100644 --- a/test/Faker/Provider/en_GB/PhoneNumberTest.php +++ b/test/Faker/Provider/en_GB/PhoneNumberTest.php @@ -10,7 +10,7 @@ */ final class PhoneNumberTest extends TestCase { - public function testE164PhoneNumberFormat() + public function testE164PhoneNumberFormat(): void { for ($i = 0; $i < 10; ++$i) { $number = $this->faker->e164PhoneNumber(); diff --git a/test/Faker/Provider/en_IN/AddressTest.php b/test/Faker/Provider/en_IN/AddressTest.php index 01e4cec1b2..3cba11481d 100644 --- a/test/Faker/Provider/en_IN/AddressTest.php +++ b/test/Faker/Provider/en_IN/AddressTest.php @@ -9,7 +9,7 @@ */ final class AddressTest extends TestCase { - public function testCity() + public function testCity(): void { $city = $this->faker->city(); self::assertNotEmpty($city); @@ -17,7 +17,7 @@ public function testCity() self::assertMatchesRegularExpression('/[A-Z][a-z]+/', $city); } - public function testCountry() + public function testCountry(): void { $country = $this->faker->country(); self::assertNotEmpty($country); @@ -25,7 +25,7 @@ public function testCountry() self::assertMatchesRegularExpression('/[A-Z][a-z]+/', $country); } - public function testLocalityName() + public function testLocalityName(): void { $localityName = $this->faker->localityName(); self::assertNotEmpty($localityName); @@ -33,7 +33,7 @@ public function testLocalityName() self::assertMatchesRegularExpression('/[A-Z][a-z]+/', $localityName); } - public function testAreaSuffix() + public function testAreaSuffix(): void { $areaSuffix = $this->faker->areaSuffix(); self::assertNotEmpty($areaSuffix); diff --git a/test/Faker/Provider/en_NG/AddressTest.php b/test/Faker/Provider/en_NG/AddressTest.php index 8e81b9c94f..41dd59184b 100644 --- a/test/Faker/Provider/en_NG/AddressTest.php +++ b/test/Faker/Provider/en_NG/AddressTest.php @@ -9,7 +9,7 @@ */ final class AddressTest extends TestCase { - public function testPostcodeIsNotEmptyAndIsValid() + public function testPostcodeIsNotEmptyAndIsValid(): void { $postcode = $this->faker->postcode(); @@ -20,7 +20,7 @@ public function testPostcodeIsNotEmptyAndIsValid() /** * Test the name of the Nigerian State/County */ - public function testCountyIsAValidString() + public function testCountyIsAValidString(): void { $county = $this->faker->county; @@ -31,7 +31,7 @@ public function testCountyIsAValidString() /** * Test the name of the Nigerian Region in a State. */ - public function testRegionIsAValidString() + public function testRegionIsAValidString(): void { $region = $this->faker->region; diff --git a/test/Faker/Provider/en_NG/InternetTest.php b/test/Faker/Provider/en_NG/InternetTest.php index 2b430dbb4a..3acb9b57ee 100644 --- a/test/Faker/Provider/en_NG/InternetTest.php +++ b/test/Faker/Provider/en_NG/InternetTest.php @@ -11,7 +11,7 @@ */ final class InternetTest extends TestCase { - public function testEmailIsValid() + public function testEmailIsValid(): void { $email = $this->faker->email(); self::assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); diff --git a/test/Faker/Provider/en_NG/PersonTest.php b/test/Faker/Provider/en_NG/PersonTest.php index 562b833664..42aa5902b3 100644 --- a/test/Faker/Provider/en_NG/PersonTest.php +++ b/test/Faker/Provider/en_NG/PersonTest.php @@ -10,7 +10,7 @@ */ final class PersonTest extends TestCase { - public function testPersonNameIsAValidString() + public function testPersonNameIsAValidString(): void { $name = $this->faker->name; diff --git a/test/Faker/Provider/en_NG/PhoneNumberTest.php b/test/Faker/Provider/en_NG/PhoneNumberTest.php index 2e61165ebc..9e913df28e 100644 --- a/test/Faker/Provider/en_NG/PhoneNumberTest.php +++ b/test/Faker/Provider/en_NG/PhoneNumberTest.php @@ -10,7 +10,7 @@ */ final class PhoneNumberTest extends TestCase { - public function testPhoneNumberReturnsPhoneNumberWithOrWithoutCountryCode() + public function testPhoneNumberReturnsPhoneNumberWithOrWithoutCountryCode(): void { $phoneNumber = $this->faker->phoneNumber(); diff --git a/test/Faker/Provider/en_NZ/PhoneNumberTest.php b/test/Faker/Provider/en_NZ/PhoneNumberTest.php index 9375421601..a65c24d9f4 100644 --- a/test/Faker/Provider/en_NZ/PhoneNumberTest.php +++ b/test/Faker/Provider/en_NZ/PhoneNumberTest.php @@ -10,13 +10,13 @@ */ final class PhoneNumberTest extends TestCase { - public function testIfPhoneNumberCanReturnData() + public function testIfPhoneNumberCanReturnData(): void { $number = $this->faker->phoneNumber; self::assertNotEmpty($number); } - public function phoneNumberFormat() + public function phoneNumberFormat(): void { $number = $this->faker->phoneNumber; self::assertMatchesRegularExpression( diff --git a/test/Faker/Provider/en_PH/AddressTest.php b/test/Faker/Provider/en_PH/AddressTest.php index ce9c707bea..0e202c4a6f 100644 --- a/test/Faker/Provider/en_PH/AddressTest.php +++ b/test/Faker/Provider/en_PH/AddressTest.php @@ -10,28 +10,28 @@ */ final class AddressTest extends TestCase { - public function testProvince() + public function testProvince(): void { $province = $this->faker->province(); self::assertNotEmpty($province); self::assertIsString($province); } - public function testCity() + public function testCity(): void { $city = $this->faker->city(); self::assertNotEmpty($city); self::assertIsString($city); } - public function testMunicipality() + public function testMunicipality(): void { $municipality = $this->faker->municipality(); self::assertNotEmpty($municipality); self::assertIsString($municipality); } - public function testBarangay() + public function testBarangay(): void { $barangay = $this->faker->barangay(); self::assertIsString($barangay); diff --git a/test/Faker/Provider/en_SG/AddressTest.php b/test/Faker/Provider/en_SG/AddressTest.php index 0eb445f2b0..1a376e9faa 100644 --- a/test/Faker/Provider/en_SG/AddressTest.php +++ b/test/Faker/Provider/en_SG/AddressTest.php @@ -10,12 +10,12 @@ */ final class AddressTest extends TestCase { - public function testStreetNumber() + public function testStreetNumber(): void { self::assertMatchesRegularExpression('/^\d{2,3}$/', $this->faker->streetNumber()); } - public function testBlockNumber() + public function testBlockNumber(): void { self::assertMatchesRegularExpression('/^Blk\s*\d{2,3}[A-H]*$/i', $this->faker->blockNumber()); } diff --git a/test/Faker/Provider/en_SG/PhoneNumberTest.php b/test/Faker/Provider/en_SG/PhoneNumberTest.php index 1b4f7a5eae..26e8ad4a91 100644 --- a/test/Faker/Provider/en_SG/PhoneNumberTest.php +++ b/test/Faker/Provider/en_SG/PhoneNumberTest.php @@ -13,7 +13,7 @@ final class PhoneNumberTest extends TestCase // http://en.wikipedia.org/wiki/Telephone_numbers_in_Singapore#Numbering_plan // x means 0 to 9 // y means 0 to 8 only - public function testMobilePhoneNumberStartWith9Returns9yxxxxxx() + public function testMobilePhoneNumberStartWith9Returns9yxxxxxx(): void { $startsWith9 = false; @@ -28,7 +28,7 @@ public function testMobilePhoneNumberStartWith9Returns9yxxxxxx() // http://en.wikipedia.org/wiki/Telephone_numbers_in_Singapore#Numbering_plan // x means 0 to 9 // z means 1 to 8 only - public function testMobilePhoneNumberStartWith8Returns8zxxxxxx() + public function testMobilePhoneNumberStartWith8Returns8zxxxxxx(): void { $startsWith8 = false; @@ -44,27 +44,27 @@ protected function getProviders(): iterable yield new PhoneNumber($this->faker); } - public function testTollFreeInternationalNumber() + public function testTollFreeInternationalNumber(): void { self::assertMatchesRegularExpression('/^800\s*\d{3}\s*\d{4}$/', $this->faker->tollFreeInternationalNumber); } - public function testTollFreeLineNumber() + public function testTollFreeLineNumber(): void { self::assertMatchesRegularExpression('/^1800\s*\d{3}\s*\d{4}$/', $this->faker->tollFreeLineNumber); } - public function testPremiumPhoneNumber() + public function testPremiumPhoneNumber(): void { self::assertMatchesRegularExpression('/^1900\s*\d{3}\s*\d{4}$/', $this->faker->premiumPhoneNumber); } - public function testFixedLineNumber() + public function testFixedLineNumber(): void { self::assertMatchesRegularExpression('/^(\+65|65)?\s*6\d{3}\s*\d{4}$/', $this->faker->fixedLineNumber); } - public function testVoipNumber() + public function testVoipNumber(): void { self::assertMatchesRegularExpression('/^(\+65|65)?\s*3\d{3}\s*\d{4}$/', $this->faker->voipNumber); } diff --git a/test/Faker/Provider/en_UG/AddressTest.php b/test/Faker/Provider/en_UG/AddressTest.php index 83285982bd..0ccab4cdb3 100644 --- a/test/Faker/Provider/en_UG/AddressTest.php +++ b/test/Faker/Provider/en_UG/AddressTest.php @@ -10,21 +10,21 @@ */ final class AddressTest extends TestCase { - public function testCityName() + public function testCityName(): void { $city = $this->faker->cityName(); self::assertNotEmpty($city); self::assertIsString($city); } - public function testDistrict() + public function testDistrict(): void { $district = $this->faker->district(); self::assertNotEmpty($district); self::assertIsString($district); } - public function testRegion() + public function testRegion(): void { $region = $this->faker->region(); self::assertNotEmpty($region); diff --git a/test/Faker/Provider/en_US/CompanyTest.php b/test/Faker/Provider/en_US/CompanyTest.php index 66815c4cb1..219384056e 100644 --- a/test/Faker/Provider/en_US/CompanyTest.php +++ b/test/Faker/Provider/en_US/CompanyTest.php @@ -13,7 +13,7 @@ final class CompanyTest extends TestCase /** * @see https://stackoverflow.com/questions/4242433/regex-for-ein-number-and-ssn-number-format-in-jquery/35471665#35471665 */ - public function testEin() + public function testEin(): void { $number = $this->faker->ein; diff --git a/test/Faker/Provider/en_US/PaymentTest.php b/test/Faker/Provider/en_US/PaymentTest.php index 38641c2cd2..168f390a24 100644 --- a/test/Faker/Provider/en_US/PaymentTest.php +++ b/test/Faker/Provider/en_US/PaymentTest.php @@ -9,14 +9,14 @@ */ final class PaymentTest extends TestCase { - public function testBankAccountNumber() + public function testBankAccountNumber(): void { $accNo = $this->faker->bankAccountNumber; self::assertTrue(ctype_digit($accNo)); self::assertLessThanOrEqual(17, strlen($accNo)); } - public function testBankRoutingNumber() + public function testBankRoutingNumber(): void { $routingNo = $this->faker->bankRoutingNumber; self::assertMatchesRegularExpression('/^\d{9}$/', $routingNo); @@ -67,7 +67,7 @@ public function routingNumberProvider() /** * @dataProvider routingNumberProvider */ - public function testCalculateRoutingNumberChecksum($routingNo) + public function testCalculateRoutingNumberChecksum($routingNo): void { self::assertEquals($routingNo[8], Payment::calculateRoutingNumberChecksum($routingNo), $routingNo); } diff --git a/test/Faker/Provider/en_US/PersonTest.php b/test/Faker/Provider/en_US/PersonTest.php index c13b81bb49..ced8e54f18 100644 --- a/test/Faker/Provider/en_US/PersonTest.php +++ b/test/Faker/Provider/en_US/PersonTest.php @@ -10,7 +10,7 @@ */ final class PersonTest extends TestCase { - public function testSsn() + public function testSsn(): void { for ($i = 0; $i < 100; ++$i) { $number = $this->faker->ssn; diff --git a/test/Faker/Provider/en_US/PhoneNumberTest.php b/test/Faker/Provider/en_US/PhoneNumberTest.php index 00fc64e5c6..6782c5712f 100644 --- a/test/Faker/Provider/en_US/PhoneNumberTest.php +++ b/test/Faker/Provider/en_US/PhoneNumberTest.php @@ -10,7 +10,7 @@ */ final class PhoneNumberTest extends TestCase { - public function testPhoneNumber() + public function testPhoneNumber(): void { for ($i = 0; $i < 100; ++$i) { $number = $this->faker->phoneNumber; @@ -39,12 +39,12 @@ public function testPhoneNumber() } } - public function testTollFreeAreaCode() + public function testTollFreeAreaCode(): void { self::assertContains($this->faker->tollFreeAreaCode, [800, 822, 833, 844, 855, 866, 877, 888, 880, 887, 889]); } - public function testTollFreePhoneNumber() + public function testTollFreePhoneNumber(): void { for ($i = 0; $i < 100; ++$i) { $number = $this->faker->tollFreePhoneNumber; @@ -72,7 +72,7 @@ public function testTollFreePhoneNumber() } } - public function testE164PhoneNumberFormat() + public function testE164PhoneNumberFormat(): void { for ($i = 0; $i < 10; ++$i) { $number = $this->faker->e164PhoneNumber(); diff --git a/test/Faker/Provider/en_ZA/CompanyTest.php b/test/Faker/Provider/en_ZA/CompanyTest.php index 9963bd6122..3f3056f159 100644 --- a/test/Faker/Provider/en_ZA/CompanyTest.php +++ b/test/Faker/Provider/en_ZA/CompanyTest.php @@ -10,7 +10,7 @@ */ final class CompanyTest extends TestCase { - public function testGenerateValidCompanyNumber() + public function testGenerateValidCompanyNumber(): void { $companyRegNo = $this->faker->companyNumber(); diff --git a/test/Faker/Provider/en_ZA/InternetTest.php b/test/Faker/Provider/en_ZA/InternetTest.php index 29c14a68f4..ae53f03596 100644 --- a/test/Faker/Provider/en_ZA/InternetTest.php +++ b/test/Faker/Provider/en_ZA/InternetTest.php @@ -12,7 +12,7 @@ */ final class InternetTest extends TestCase { - public function testEmailIsValid() + public function testEmailIsValid(): void { $email = $this->faker->email(); self::assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); diff --git a/test/Faker/Provider/en_ZA/PersonTest.php b/test/Faker/Provider/en_ZA/PersonTest.php index 300d4f103a..5a0cb2298a 100644 --- a/test/Faker/Provider/en_ZA/PersonTest.php +++ b/test/Faker/Provider/en_ZA/PersonTest.php @@ -11,7 +11,7 @@ */ final class PersonTest extends TestCase { - public function testIdNumberWithDefaults() + public function testIdNumberWithDefaults(): void { $idNumber = $this->faker->idNumber(); @@ -20,7 +20,7 @@ public function testIdNumberWithDefaults() self::assertIsString($idNumber); } - public function testIdNumberForMales() + public function testIdNumberForMales(): void { $idNumber = $this->faker->idNumber(new \DateTime(), true, 'male'); @@ -29,7 +29,7 @@ public function testIdNumberForMales() self::assertContains($genderDigit, ['5', '6', '7', '8', '9']); } - public function testIdNumberForFemales() + public function testIdNumberForFemales(): void { $idNumber = $this->faker->idNumber(new \DateTime(), true, 'female'); @@ -38,21 +38,21 @@ public function testIdNumberForFemales() self::assertContains($genderDigit, ['0', '1', '2', '3', '4']); } - public function testLicenceCode() + public function testLicenceCode(): void { $validLicenceCodes = ['A', 'A1', 'B', 'C', 'C1', 'C2', 'EB', 'EC', 'EC1', 'I', 'L', 'L1']; self::assertContains($this->faker->licenceCode, $validLicenceCodes); } - public function testMaleTitles() + public function testMaleTitles(): void { $validMaleTitles = ['Mr.', 'Dr.', 'Prof.', 'Rev.', 'Hon.']; self::assertContains(Person::titleMale(), $validMaleTitles); } - public function testFemaleTitles() + public function testFemaleTitles(): void { $validateFemaleTitles = ['Mrs.', 'Ms.', 'Miss', 'Dr.', 'Prof.', 'Rev.', 'Hon.']; diff --git a/test/Faker/Provider/en_ZA/PhoneNumberTest.php b/test/Faker/Provider/en_ZA/PhoneNumberTest.php index 60453fa8bf..95561ebc12 100644 --- a/test/Faker/Provider/en_ZA/PhoneNumberTest.php +++ b/test/Faker/Provider/en_ZA/PhoneNumberTest.php @@ -10,7 +10,7 @@ */ final class PhoneNumberTest extends TestCase { - public function testPhoneNumber() + public function testPhoneNumber(): void { for ($i = 0; $i < 10; ++$i) { $number = $this->faker->phoneNumber; @@ -26,7 +26,7 @@ public function testPhoneNumber() } } - public function testTollFreePhoneNumber() + public function testTollFreePhoneNumber(): void { for ($i = 0; $i < 10; ++$i) { $number = $this->faker->tollFreeNumber; @@ -41,7 +41,7 @@ public function testTollFreePhoneNumber() } } - public function testCellPhoneNumber() + public function testCellPhoneNumber(): void { for ($i = 0; $i < 10; ++$i) { $number = $this->faker->mobileNumber; diff --git a/test/Faker/Provider/es_ES/PaymentTest.php b/test/Faker/Provider/es_ES/PaymentTest.php index 0ff85c4563..b22644b795 100644 --- a/test/Faker/Provider/es_ES/PaymentTest.php +++ b/test/Faker/Provider/es_ES/PaymentTest.php @@ -10,7 +10,7 @@ */ final class PaymentTest extends TestCase { - public function testVAT() + public function testVAT(): void { $vat = $this->faker->vat(); diff --git a/test/Faker/Provider/es_ES/PersonTest.php b/test/Faker/Provider/es_ES/PersonTest.php index 77efebca1e..5d7797efd5 100644 --- a/test/Faker/Provider/es_ES/PersonTest.php +++ b/test/Faker/Provider/es_ES/PersonTest.php @@ -10,7 +10,7 @@ */ final class PersonTest extends TestCase { - public function testDNI() + public function testDNI(): void { self::assertTrue($this->isValidDNI($this->faker->dni)); } @@ -30,7 +30,7 @@ public function isValidDNI($string) return strtoupper($letter) === $map[((int) $number) % 23]; } - public function testLicenceCode() + public function testLicenceCode(): void { $validLicenceCodes = ['AM', 'A1', 'A2', 'A', 'B', 'B+E', 'C1', 'C1+E', 'C', 'C+E', 'D1', 'D1+E', 'D', 'D+E']; diff --git a/test/Faker/Provider/es_ES/PhoneNumberTest.php b/test/Faker/Provider/es_ES/PhoneNumberTest.php index d581981fc3..10abb0cecf 100644 --- a/test/Faker/Provider/es_ES/PhoneNumberTest.php +++ b/test/Faker/Provider/es_ES/PhoneNumberTest.php @@ -10,12 +10,12 @@ */ final class PhoneNumberTest extends TestCase { - public function testMobileNumber() + public function testMobileNumber(): void { self::assertNotEquals('', $this->faker->mobileNumber()); } - public function testTollFreeNumber() + public function testTollFreeNumber(): void { self::assertEquals(11, strlen($this->faker->tollFreeNumber())); } diff --git a/test/Faker/Provider/es_ES/TextTest.php b/test/Faker/Provider/es_ES/TextTest.php index c5a09d5053..da29c0282f 100644 --- a/test/Faker/Provider/es_ES/TextTest.php +++ b/test/Faker/Provider/es_ES/TextTest.php @@ -10,7 +10,7 @@ */ final class TextTest extends TestCase { - public function testText() + public function testText(): void { self::assertNotSame('', $this->faker->realtext(200, 2)); } diff --git a/test/Faker/Provider/es_PE/CompanyTest.php b/test/Faker/Provider/es_PE/CompanyTest.php index 0c64b80910..d2302e888d 100644 --- a/test/Faker/Provider/es_PE/CompanyTest.php +++ b/test/Faker/Provider/es_PE/CompanyTest.php @@ -10,7 +10,7 @@ */ final class CompanyTest extends TestCase { - public function testGenerateValidRuc() + public function testGenerateValidRuc(): void { $companyRUC = $this->faker->ruc(); @@ -18,14 +18,14 @@ public function testGenerateValidRuc() self::assertMatchesRegularExpression('/^([1|2])0\d{9}$/', $companyRUC); } - public function testGenerateValidRucPersonaNatural() + public function testGenerateValidRucPersonaNatural(): void { $companyRUC = $this->faker->ruc(true); self::assertMatchesRegularExpression('/^10\d{9}$/', $companyRUC); } - public function testGenerateValidRucPersonaJuridica() + public function testGenerateValidRucPersonaJuridica(): void { $companyRUC = $this->faker->ruc(false); diff --git a/test/Faker/Provider/es_PE/PersonTest.php b/test/Faker/Provider/es_PE/PersonTest.php index 2d726593e6..504dd5ddb8 100644 --- a/test/Faker/Provider/es_PE/PersonTest.php +++ b/test/Faker/Provider/es_PE/PersonTest.php @@ -10,7 +10,7 @@ */ final class PersonTest extends TestCase { - public function testDNI() + public function testDNI(): void { $dni = $this->faker->dni; self::assertMatchesRegularExpression('/\A[0-9]{8}\Z/', $dni); diff --git a/test/Faker/Provider/es_VE/CompanyTest.php b/test/Faker/Provider/es_VE/CompanyTest.php index eb08588fba..7df86f8815 100644 --- a/test/Faker/Provider/es_VE/CompanyTest.php +++ b/test/Faker/Provider/es_VE/CompanyTest.php @@ -13,7 +13,7 @@ final class CompanyTest extends TestCase /** * national Id format validator */ - public function testNationalId() + public function testNationalId(): void { $pattern = '/^[VJGECP]-?\d{8}-?\d$/'; $rif = $this->faker->taxpayerIdentificationNumber; diff --git a/test/Faker/Provider/es_VE/PersonTest.php b/test/Faker/Provider/es_VE/PersonTest.php index 7cadc4a6f4..3827b6684c 100644 --- a/test/Faker/Provider/es_VE/PersonTest.php +++ b/test/Faker/Provider/es_VE/PersonTest.php @@ -10,7 +10,7 @@ */ final class PersonTest extends TestCase { - public function testNationalId() + public function testNationalId(): void { $pattern = '/(?:^V-?\d{5,9}$)|(?:^E-?\d{8,9}$)/'; diff --git a/test/Faker/Provider/fa_IR/PersonTest.php b/test/Faker/Provider/fa_IR/PersonTest.php index f3ac4da0f2..cec0e12ae9 100644 --- a/test/Faker/Provider/fa_IR/PersonTest.php +++ b/test/Faker/Provider/fa_IR/PersonTest.php @@ -10,7 +10,7 @@ */ final class PersonTest extends TestCase { - public function testNationalCode() + public function testNationalCode(): void { for ($i = 0; $i < 100; ++$i) { $nationalCode = $this->faker->nationalCode; diff --git a/test/Faker/Provider/fi_FI/InternetTest.php b/test/Faker/Provider/fi_FI/InternetTest.php index b30be29ef5..1725d33b51 100644 --- a/test/Faker/Provider/fi_FI/InternetTest.php +++ b/test/Faker/Provider/fi_FI/InternetTest.php @@ -12,7 +12,7 @@ */ final class InternetTest extends TestCase { - public function testEmailIsValid() + public function testEmailIsValid(): void { $email = $this->faker->email(); self::assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); diff --git a/test/Faker/Provider/fi_FI/PersonTest.php b/test/Faker/Provider/fi_FI/PersonTest.php index 88b27cea73..51fe056ab5 100644 --- a/test/Faker/Provider/fi_FI/PersonTest.php +++ b/test/Faker/Provider/fi_FI/PersonTest.php @@ -25,7 +25,7 @@ public function provideSeedAndExpectedReturn() /** * @dataProvider provideSeedAndExpectedReturn */ - public function testPersonalIdentityNumberUsesBirthDateIfProvided($seed, $birthdate, $expected) + public function testPersonalIdentityNumberUsesBirthDateIfProvided($seed, $birthdate, $expected): void { $faker = $this->faker; $faker->seed($seed); @@ -33,7 +33,7 @@ public function testPersonalIdentityNumberUsesBirthDateIfProvided($seed, $birthd self::assertEquals($expected, $pin); } - public function testPersonalIdentityNumberGeneratesCompliantNumbers() + public function testPersonalIdentityNumberGeneratesCompliantNumbers(): void { if (strtotime('1800-01-01 00:00:00')) { $min = '1900'; @@ -62,13 +62,13 @@ public function testPersonalIdentityNumberGeneratesCompliantNumbers() } } - public function testPersonalIdentityNumberGeneratesOddValuesForMales() + public function testPersonalIdentityNumberGeneratesOddValuesForMales(): void { $pin = $this->faker->personalIdentityNumber(null, 'male'); self::assertEquals(1, $pin[9] % 2); } - public function testPersonalIdentityNumberGeneratesEvenValuesForFemales() + public function testPersonalIdentityNumberGeneratesEvenValuesForFemales(): void { $pin = $this->faker->personalIdentityNumber(null, 'female'); self::assertEquals(0, $pin[9] % 2); diff --git a/test/Faker/Provider/fr_BE/PaymentTest.php b/test/Faker/Provider/fr_BE/PaymentTest.php index c7beffef61..26e25353b6 100644 --- a/test/Faker/Provider/fr_BE/PaymentTest.php +++ b/test/Faker/Provider/fr_BE/PaymentTest.php @@ -10,7 +10,7 @@ */ final class PaymentTest extends TestCase { - public function testVatIsValid() + public function testVatIsValid(): void { $vat = $this->faker->vat(); $unspacedVat = $this->faker->vat(false); diff --git a/test/Faker/Provider/fr_CH/AddressTest.php b/test/Faker/Provider/fr_CH/AddressTest.php index b942b43c9a..75ad46bc0b 100644 --- a/test/Faker/Provider/fr_CH/AddressTest.php +++ b/test/Faker/Provider/fr_CH/AddressTest.php @@ -11,7 +11,7 @@ */ final class AddressTest extends TestCase { - public function testCanton() + public function testCanton(): void { $canton = $this->faker->canton(); self::assertIsArray($canton); @@ -25,21 +25,21 @@ public function testCanton() } } - public function testCantonName() + public function testCantonName(): void { $cantonName = $this->faker->cantonName(); self::assertIsString($cantonName); self::assertGreaterThan(2, strlen($cantonName)); } - public function testCantonShort() + public function testCantonShort(): void { $cantonShort = $this->faker->cantonShort(); self::assertIsString($cantonShort); self::assertEquals(2, strlen($cantonShort)); } - public function testAddress() + public function testAddress(): void { $address = $this->faker->address(); self::assertIsString($address); diff --git a/test/Faker/Provider/fr_CH/InternetTest.php b/test/Faker/Provider/fr_CH/InternetTest.php index 33e1aa07b7..2e4e35a675 100644 --- a/test/Faker/Provider/fr_CH/InternetTest.php +++ b/test/Faker/Provider/fr_CH/InternetTest.php @@ -12,7 +12,7 @@ */ final class InternetTest extends TestCase { - public function testEmailIsValid() + public function testEmailIsValid(): void { $email = $this->faker->email(); self::assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); diff --git a/test/Faker/Provider/fr_CH/PersonTest.php b/test/Faker/Provider/fr_CH/PersonTest.php index 4b59bbb735..6352331019 100644 --- a/test/Faker/Provider/fr_CH/PersonTest.php +++ b/test/Faker/Provider/fr_CH/PersonTest.php @@ -11,7 +11,7 @@ */ final class PersonTest extends TestCase { - public function testAvs13Number() + public function testAvs13Number(): void { $avs = $this->faker->avs13; self::assertMatchesRegularExpression('/^756\.([0-9]{4})\.([0-9]{4})\.([0-9]{2})$/', $avs); diff --git a/test/Faker/Provider/fr_CH/PhoneNumberTest.php b/test/Faker/Provider/fr_CH/PhoneNumberTest.php index 22d5d767e3..e095befb7b 100644 --- a/test/Faker/Provider/fr_CH/PhoneNumberTest.php +++ b/test/Faker/Provider/fr_CH/PhoneNumberTest.php @@ -10,12 +10,12 @@ */ final class PhoneNumberTest extends TestCase { - public function testPhoneNumber() + public function testPhoneNumber(): void { self::assertMatchesRegularExpression('/^0\d{2} ?\d{3} ?\d{2} ?\d{2}|\+41 ?(\(0\))?\d{2} ?\d{3} ?\d{2} ?\d{2}$/', $this->faker->phoneNumber()); } - public function testMobileNumber() + public function testMobileNumber(): void { self::assertMatchesRegularExpression('/^07[56789] ?\d{3} ?\d{2} ?\d{2}$/', $this->faker->mobileNumber()); } diff --git a/test/Faker/Provider/fr_FR/AddressTest.php b/test/Faker/Provider/fr_FR/AddressTest.php index 04c05fec62..1f48f54d5f 100644 --- a/test/Faker/Provider/fr_FR/AddressTest.php +++ b/test/Faker/Provider/fr_FR/AddressTest.php @@ -10,13 +10,13 @@ */ final class AddressTest extends TestCase { - public function testSecondaryAddress() + public function testSecondaryAddress(): void { self::assertEquals('Étage 007', $this->faker->secondaryAddress()); self::assertEquals('Bât. 932', $this->faker->secondaryAddress()); } - public function testRegion() + public function testRegion(): void { self::assertEquals('Occitanie', $this->faker->region()); self::assertEquals('Auvergne-Rhône-Alpes', $this->faker->region()); diff --git a/test/Faker/Provider/fr_FR/ColorTest.php b/test/Faker/Provider/fr_FR/ColorTest.php index ea3d9ea48b..e9b1d34c93 100644 --- a/test/Faker/Provider/fr_FR/ColorTest.php +++ b/test/Faker/Provider/fr_FR/ColorTest.php @@ -10,13 +10,13 @@ */ final class ColorTest extends TestCase { - public function testColorName() + public function testColorName(): void { self::assertEquals('Mandarine', $this->faker->colorName()); self::assertEquals('Acajou', $this->faker->colorName()); } - public function testSafeColorName() + public function testSafeColorName(): void { self::assertEquals('bleu', $this->faker->safeColorName()); self::assertEquals('noir', $this->faker->safeColorName()); diff --git a/test/Faker/Provider/fr_FR/CompanyTest.php b/test/Faker/Provider/fr_FR/CompanyTest.php index 2c2cac270f..2e78e5ca0b 100644 --- a/test/Faker/Provider/fr_FR/CompanyTest.php +++ b/test/Faker/Provider/fr_FR/CompanyTest.php @@ -11,14 +11,14 @@ */ final class CompanyTest extends TestCase { - public function testSiretReturnsAValidSiret() + public function testSiretReturnsAValidSiret(): void { $siret = $this->faker->siret(false); self::assertMatchesRegularExpression("/^\d{14}$/", $siret); self::assertTrue(Luhn::isValid($siret)); } - public function testSiretReturnsAWellFormattedSiret() + public function testSiretReturnsAWellFormattedSiret(): void { $siret = $this->faker->siret(); self::assertMatchesRegularExpression("/^\d{3}\s\d{3}\s\d{3}\s\d{5}$/", $siret); @@ -26,14 +26,14 @@ public function testSiretReturnsAWellFormattedSiret() self::assertTrue(Luhn::isValid($siret)); } - public function testSirenReturnsAValidSiren() + public function testSirenReturnsAValidSiren(): void { $siren = $this->faker->siren(false); self::assertMatchesRegularExpression("/^\d{9}$/", $siren); self::assertTrue(Luhn::isValid($siren)); } - public function testSirenReturnsAWellFormattedSiren() + public function testSirenReturnsAWellFormattedSiren(): void { $siren = $this->faker->siren(); self::assertMatchesRegularExpression("/^\d{3}\s\d{3}\s\d{3}$/", $siren); @@ -41,18 +41,18 @@ public function testSirenReturnsAWellFormattedSiren() self::assertTrue(Luhn::isValid($siren)); } - public function testCatchPhraseReturnsValidCatchPhrase() + public function testCatchPhraseReturnsValidCatchPhrase(): void { self::assertTrue(TestableCompany::isCatchPhraseValid($this->faker->catchPhrase())); } - public function testIsCatchPhraseValidReturnsFalseWhenAWordsAppearsTwice() + public function testIsCatchPhraseValidReturnsFalseWhenAWordsAppearsTwice(): void { $isCatchPhraseValid = TestableCompany::isCatchPhraseValid('La sécurité de rouler en toute sécurité'); self::assertFalse($isCatchPhraseValid); } - public function testIsCatchPhraseValidReturnsTrueWhenNoWordAppearsTwice() + public function testIsCatchPhraseValidReturnsTrueWhenNoWordAppearsTwice(): void { $isCatchPhraseValid = TestableCompany::isCatchPhraseValid('La sécurité de rouler en toute simplicité'); self::assertTrue($isCatchPhraseValid); diff --git a/test/Faker/Provider/fr_FR/PaymentTest.php b/test/Faker/Provider/fr_FR/PaymentTest.php index 8ecdf8fffe..f9f1743933 100644 --- a/test/Faker/Provider/fr_FR/PaymentTest.php +++ b/test/Faker/Provider/fr_FR/PaymentTest.php @@ -11,7 +11,7 @@ */ final class PaymentTest extends TestCase { - public function testFormattedVat() + public function testFormattedVat(): void { $vat = $this->faker->vat(true); self::assertMatchesRegularExpression("/^FR\s\w{2}\s\d{3}\s\d{3}\s\d{3}$/", $vat); @@ -27,7 +27,7 @@ public function testFormattedVat() } } - public function testUnformattedVat() + public function testUnformattedVat(): void { $vat = $this->faker->vat(false); self::assertMatchesRegularExpression("/^FR\w{2}\d{9}$/", $vat); diff --git a/test/Faker/Provider/fr_FR/PersonTest.php b/test/Faker/Provider/fr_FR/PersonTest.php index 680daaa45e..49f82e2ef6 100644 --- a/test/Faker/Provider/fr_FR/PersonTest.php +++ b/test/Faker/Provider/fr_FR/PersonTest.php @@ -10,19 +10,19 @@ */ final class PersonTest extends TestCase { - public function testNIRReturnsTheRightGender() + public function testNIRReturnsTheRightGender(): void { $nir = $this->faker->nir(\Faker\Provider\Person::GENDER_MALE); self::assertStringStartsWith('1', $nir); } - public function testNIRReturnsTheRightPattern() + public function testNIRReturnsTheRightPattern(): void { $nir = $this->faker->nir; self::assertMatchesRegularExpression("/^[12]\d{5}[0-9A-B]\d{8}$/", $nir); } - public function testNIRFormattedReturnsTheRightPattern() + public function testNIRFormattedReturnsTheRightPattern(): void { $nir = $this->faker->nir(null, true); self::assertMatchesRegularExpression("/^[12]\s\d{2}\s\d{2}\s\d{1}[0-9A-B]\s\d{3}\s\d{3}\s\d{2}$/", $nir); diff --git a/test/Faker/Provider/fr_FR/PhoneNumberTest.php b/test/Faker/Provider/fr_FR/PhoneNumberTest.php index 440cfc0918..20db5bb351 100644 --- a/test/Faker/Provider/fr_FR/PhoneNumberTest.php +++ b/test/Faker/Provider/fr_FR/PhoneNumberTest.php @@ -10,43 +10,43 @@ */ final class PhoneNumberTest extends TestCase { - public function testMobileNumber() + public function testMobileNumber(): void { $mobileNumber = $this->faker->mobileNumber(); self::assertMatchesRegularExpression('/^(\+33 |\+33 \(0\)|0)(6|7)(?:(\s{1})?\d{2}){4}$/', $mobileNumber); } - public function testMobileNumber07Format() + public function testMobileNumber07Format(): void { $mobileNumberFormat = $this->faker->phoneNumber07(); self::assertMatchesRegularExpression('/^([3-9]{1})\d(\d{2}){3}$/', $mobileNumberFormat); } - public function testMobileNumber07WithSeparatorFormat() + public function testMobileNumber07WithSeparatorFormat(): void { $mobileNumberFormat = $this->faker->phoneNumber07WithSeparator(); self::assertMatchesRegularExpression('/^([3-9]{1})\d( \d{2}){3}$/', $mobileNumberFormat); } - public function testServiceNumber() + public function testServiceNumber(): void { $serviceNumber = $this->faker->serviceNumber(); self::assertMatchesRegularExpression('/^(\+33 |\+33 \(0\)|0)8(?:(\s{1})?\d{2}){4}$/', $serviceNumber); } - public function testServiceNumberFormat() + public function testServiceNumberFormat(): void { $serviceNumberFormat = $this->faker->phoneNumber08(); self::assertMatchesRegularExpression('/^((0|1|2)\d{1}|9[^46])\d{6}$/', $serviceNumberFormat); } - public function testServiceNumberWithSeparatorFormat() + public function testServiceNumberWithSeparatorFormat(): void { $serviceNumberFormat = $this->faker->phoneNumber08WithSeparator(); self::assertMatchesRegularExpression('/^((0|1|2)\d{1}|9[^46])( \d{2}){3}$/', $serviceNumberFormat); } - public function testE164PhoneNumberFormat() + public function testE164PhoneNumberFormat(): void { for ($i = 0; $i < 10; ++$i) { $number = $this->faker->e164PhoneNumber(); diff --git a/test/Faker/Provider/fr_FR/TextTest.php b/test/Faker/Provider/fr_FR/TextTest.php index c43164114c..45b9c2a0ae 100644 --- a/test/Faker/Provider/fr_FR/TextTest.php +++ b/test/Faker/Provider/fr_FR/TextTest.php @@ -25,7 +25,7 @@ protected function getMethod($name) return $method; } - public function testItShouldAppendEndPunctToTheEndOfString() + public function testItShouldAppendEndPunctToTheEndOfString(): void { self::assertSame( 'Que faisaient-elles maintenant? À.', diff --git a/test/Faker/Provider/hu_HU/PersonTest.php b/test/Faker/Provider/hu_HU/PersonTest.php index db28110b1b..8618cafdff 100644 --- a/test/Faker/Provider/hu_HU/PersonTest.php +++ b/test/Faker/Provider/hu_HU/PersonTest.php @@ -10,7 +10,7 @@ */ final class PersonTest extends TestCase { - public function testValidMariedFemaleLastnames() + public function testValidMariedFemaleLastnames(): void { self::assertEquals('Báró Vassné Zsóka', $this->faker->name('female')); self::assertEquals('Prof. Szőke Bendegúz', $this->faker->name('female')); diff --git a/test/Faker/Provider/id_ID/PersonTest.php b/test/Faker/Provider/id_ID/PersonTest.php index 8519256bc5..164c1ad29a 100644 --- a/test/Faker/Provider/id_ID/PersonTest.php +++ b/test/Faker/Provider/id_ID/PersonTest.php @@ -49,31 +49,31 @@ final class PersonTest extends TestCase '9171', '9201', '9202', '9203', '9204', '9205', '9206', '9207', '9208', '9209', '9210', '9211', '9212', '9271', ]; - public function testIfFirstNameMaleCanReturnData() + public function testIfFirstNameMaleCanReturnData(): void { $firstNameMale = $this->faker->firstNameMale(); self::assertNotEmpty($firstNameMale); } - public function testIfLastNameMaleCanReturnData() + public function testIfLastNameMaleCanReturnData(): void { $lastNameMale = $this->faker->lastNameMale(); self::assertNotEmpty($lastNameMale); } - public function testIfFirstNameFemaleCanReturnData() + public function testIfFirstNameFemaleCanReturnData(): void { $firstNameFemale = $this->faker->firstNameFemale(); self::assertNotEmpty($firstNameFemale); } - public function testIfLastNameFemaleCanReturnData() + public function testIfLastNameFemaleCanReturnData(): void { $lastNameFemale = $this->faker->lastNameFemale(); self::assertNotEmpty($lastNameFemale); } - public function testNikContainsBirthPlace() + public function testNikContainsBirthPlace(): void { $nik = $this->faker->nik(); diff --git a/test/Faker/Provider/it_CH/AddressTest.php b/test/Faker/Provider/it_CH/AddressTest.php index 8e95fcb023..51d534878a 100644 --- a/test/Faker/Provider/it_CH/AddressTest.php +++ b/test/Faker/Provider/it_CH/AddressTest.php @@ -11,7 +11,7 @@ */ final class AddressTest extends TestCase { - public function testCanton() + public function testCanton(): void { $canton = $this->faker->canton(); self::assertIsArray($canton); @@ -25,21 +25,21 @@ public function testCanton() } } - public function testCantonName() + public function testCantonName(): void { $cantonName = $this->faker->cantonName(); self::assertIsString($cantonName); self::assertGreaterThan(2, strlen($cantonName)); } - public function testCantonShort() + public function testCantonShort(): void { $cantonShort = $this->faker->cantonShort(); self::assertIsString($cantonShort); self::assertEquals(2, strlen($cantonShort)); } - public function testAddress() + public function testAddress(): void { $address = $this->faker->address(); self::assertIsString($address); diff --git a/test/Faker/Provider/it_CH/InternetTest.php b/test/Faker/Provider/it_CH/InternetTest.php index 53ff2c4371..8756315c6f 100644 --- a/test/Faker/Provider/it_CH/InternetTest.php +++ b/test/Faker/Provider/it_CH/InternetTest.php @@ -12,7 +12,7 @@ */ final class InternetTest extends TestCase { - public function testEmailIsValid() + public function testEmailIsValid(): void { $email = $this->faker->email(); self::assertNotFalse(filter_var($email, FILTER_VALIDATE_EMAIL)); diff --git a/test/Faker/Provider/it_CH/PersonTest.php b/test/Faker/Provider/it_CH/PersonTest.php index d4c4e71390..3a309e09b9 100644 --- a/test/Faker/Provider/it_CH/PersonTest.php +++ b/test/Faker/Provider/it_CH/PersonTest.php @@ -11,7 +11,7 @@ */ final class PersonTest extends TestCase { - public function testAvs13Number() + public function testAvs13Number(): void { $avs = $this->faker->avs13; self::assertMatchesRegularExpression('/^756\.([0-9]{4})\.([0-9]{4})\.([0-9]{2})$/', $avs); diff --git a/test/Faker/Provider/it_CH/PhoneNumberTest.php b/test/Faker/Provider/it_CH/PhoneNumberTest.php index 3de6b7e8e2..bed8e17833 100644 --- a/test/Faker/Provider/it_CH/PhoneNumberTest.php +++ b/test/Faker/Provider/it_CH/PhoneNumberTest.php @@ -10,12 +10,12 @@ */ final class PhoneNumberTest extends TestCase { - public function testPhoneNumber() + public function testPhoneNumber(): void { self::assertMatchesRegularExpression('/^0\d{2} ?\d{3} ?\d{2} ?\d{2}|\+41 ?(\(0\))?\d{2} ?\d{3} ?\d{2} ?\d{2}$/', $this->faker->phoneNumber()); } - public function testMobileNumber() + public function testMobileNumber(): void { self::assertMatchesRegularExpression('/^07[56789] ?\d{3} ?\d{2} ?\d{2}$/', $this->faker->mobileNumber()); } diff --git a/test/Faker/Provider/it_IT/CompanyTest.php b/test/Faker/Provider/it_IT/CompanyTest.php index 3a69164ec1..2eba849892 100644 --- a/test/Faker/Provider/it_IT/CompanyTest.php +++ b/test/Faker/Provider/it_IT/CompanyTest.php @@ -10,7 +10,7 @@ */ final class CompanyTest extends TestCase { - public function testIfTaxIdCanReturnData() + public function testIfTaxIdCanReturnData(): void { $vat = $this->faker->vat(); self::assertMatchesRegularExpression('/^IT[0-9]{11}$/', $vat); diff --git a/test/Faker/Provider/it_IT/PersonTest.php b/test/Faker/Provider/it_IT/PersonTest.php index 8fdc4a9115..75705b1712 100644 --- a/test/Faker/Provider/it_IT/PersonTest.php +++ b/test/Faker/Provider/it_IT/PersonTest.php @@ -10,7 +10,7 @@ */ final class PersonTest extends TestCase { - public function testIfTaxIdCanReturnData() + public function testIfTaxIdCanReturnData(): void { $taxId = $this->faker->taxId(); self::assertMatchesRegularExpression('/^[a-zA-Z]{6}[0-9]{2}[a-zA-Z][0-9]{2}[a-zA-Z][0-9]{3}[a-zA-Z]$/', $taxId); diff --git a/test/Faker/Provider/ja_JP/InternetTest.php b/test/Faker/Provider/ja_JP/InternetTest.php index d2a448976a..8837fe910a 100644 --- a/test/Faker/Provider/ja_JP/InternetTest.php +++ b/test/Faker/Provider/ja_JP/InternetTest.php @@ -10,12 +10,12 @@ */ final class InternetTest extends TestCase { - public function testUserName() + public function testUserName(): void { self::assertEquals('akira72', $this->faker->userName); } - public function testDomainName() + 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 cd2913b267..d16e9f4b3d 100644 --- a/test/Faker/Provider/ja_JP/PersonTest.php +++ b/test/Faker/Provider/ja_JP/PersonTest.php @@ -10,27 +10,27 @@ */ final class PersonTest extends TestCase { - public function testKanaNameMaleReturns() + public function testKanaNameMaleReturns(): void { self::assertEquals('アオタ ミノル', $this->faker->kanaName('male')); } - public function testKanaNameFemaleReturns() + public function testKanaNameFemaleReturns(): void { self::assertEquals('アオタ ミキ', $this->faker->kanaName('female')); } - public function testFirstKanaNameMaleReturns() + public function testFirstKanaNameMaleReturns(): void { self::assertEquals('ヒデキ', $this->faker->firstKanaName('male')); } - public function testFirstKanaNameFemaleReturns() + public function testFirstKanaNameFemaleReturns(): void { self::assertEquals('マアヤ', $this->faker->firstKanaName('female')); } - public function testLastKanaNameReturnsNakajima() + public function testLastKanaNameReturnsNakajima(): void { self::assertEquals('ナカジマ', $this->faker->lastKanaName); } diff --git a/test/Faker/Provider/ja_JP/PhoneNumberTest.php b/test/Faker/Provider/ja_JP/PhoneNumberTest.php index 9993e9692f..6502f5a7af 100644 --- a/test/Faker/Provider/ja_JP/PhoneNumberTest.php +++ b/test/Faker/Provider/ja_JP/PhoneNumberTest.php @@ -10,7 +10,7 @@ */ final class PhoneNumberTest extends TestCase { - public function testPhoneNumber() + public function testPhoneNumber(): void { for ($i = 0; $i < 10; ++$i) { $phoneNumber = $this->faker->phoneNumber; diff --git a/test/Faker/Provider/ka_GE/TextTest.php b/test/Faker/Provider/ka_GE/TextTest.php index 9a8da29c3a..6da481f69f 100644 --- a/test/Faker/Provider/ka_GE/TextTest.php +++ b/test/Faker/Provider/ka_GE/TextTest.php @@ -25,7 +25,7 @@ protected function getMethod($name) return $method; } - public function testItShouldAppendEndPunctToTheEndOfString() + public function testItShouldAppendEndPunctToTheEndOfString(): void { self::assertSame( 'ჭეშმარიტია. ჩვენც ისე.', diff --git a/test/Faker/Provider/kk_KZ/CompanyTest.php b/test/Faker/Provider/kk_KZ/CompanyTest.php index d84f4984ae..ed06d8d88a 100644 --- a/test/Faker/Provider/kk_KZ/CompanyTest.php +++ b/test/Faker/Provider/kk_KZ/CompanyTest.php @@ -10,7 +10,7 @@ */ final class CompanyTest extends TestCase { - public function testBusinessIdentificationNumberIsValid() + public function testBusinessIdentificationNumberIsValid(): void { $registrationDate = new \DateTime('now'); $businessIdentificationNumber = $this->faker->businessIdentificationNumber($registrationDate); diff --git a/test/Faker/Provider/kk_KZ/PersonTest.php b/test/Faker/Provider/kk_KZ/PersonTest.php index dadde4ec33..7d8e0348ac 100644 --- a/test/Faker/Provider/kk_KZ/PersonTest.php +++ b/test/Faker/Provider/kk_KZ/PersonTest.php @@ -16,7 +16,7 @@ final class PersonTest extends TestCase * 2000-01-01 - 2000-12-31 counts as 21th century * 1900-01-01 - 1900-12-31 counts as 20th century */ - public function testIndividualIdentificationNumberIsValid() + public function testIndividualIdentificationNumberIsValid(): void { // 21st century. $birthDate = DateTime::dateTimeBetween('2000-01-01', '2099-12-31'); diff --git a/test/Faker/Provider/kk_KZ/TextTest.php b/test/Faker/Provider/kk_KZ/TextTest.php index 4257bc6faa..7c636ee10c 100644 --- a/test/Faker/Provider/kk_KZ/TextTest.php +++ b/test/Faker/Provider/kk_KZ/TextTest.php @@ -25,7 +25,7 @@ protected function getMethod($name) return $method; } - public function testItShouldAppendEndPunctToTheEndOfString() + public function testItShouldAppendEndPunctToTheEndOfString(): void { self::assertSame( 'Арыстан баб кесенесі - көне Отырар.', diff --git a/test/Faker/Provider/ko_KR/TextTest.php b/test/Faker/Provider/ko_KR/TextTest.php index b03542e4e2..0130eb373a 100644 --- a/test/Faker/Provider/ko_KR/TextTest.php +++ b/test/Faker/Provider/ko_KR/TextTest.php @@ -25,7 +25,7 @@ protected function getMethod($name) return $method; } - public function testItShouldAppendEndPunctToTheEndOfString() + public function testItShouldAppendEndPunctToTheEndOfString(): void { self::assertSame( '최석(崔晳)으로부터 최후의 편지가.', diff --git a/test/Faker/Provider/lt_LT/AddressTest.php b/test/Faker/Provider/lt_LT/AddressTest.php index ae099195dd..bbaeffc09f 100644 --- a/test/Faker/Provider/lt_LT/AddressTest.php +++ b/test/Faker/Provider/lt_LT/AddressTest.php @@ -10,7 +10,7 @@ */ final class AddressTest extends TestCase { - public function testMunicipality() + public function testMunicipality(): void { self::assertStringEndsWith('savivaldybė', $this->faker->municipality()); } diff --git a/test/Faker/Provider/mn_MN/PersonTest.php b/test/Faker/Provider/mn_MN/PersonTest.php index c187b9fb5c..2c69686bd5 100644 --- a/test/Faker/Provider/mn_MN/PersonTest.php +++ b/test/Faker/Provider/mn_MN/PersonTest.php @@ -10,12 +10,12 @@ */ final class PersonTest extends TestCase { - public function testName() + public function testName(): void { self::assertMatchesRegularExpression('/^[А-Я]{1}\.[\w\W]+$/u', $this->faker->name); } - public function testIdNumber() + public function testIdNumber(): void { self::assertMatchesRegularExpression('/^[А-Я]{2}\d{8}$/u', $this->faker->idNumber); } diff --git a/test/Faker/Provider/ms_MY/PersonTest.php b/test/Faker/Provider/ms_MY/PersonTest.php index 0322dbd9b0..eee1408f25 100644 --- a/test/Faker/Provider/ms_MY/PersonTest.php +++ b/test/Faker/Provider/ms_MY/PersonTest.php @@ -13,7 +13,7 @@ final class PersonTest extends TestCase /** * @see https://en.wikipedia.org/wiki/Malaysian_identity_card#Structure_of_the_National_Registration_Identity_Card_Number_(NRIC) */ - public function testPersonalIdentityCardNumber() + public function testPersonalIdentityCardNumber(): void { $myKadNumber = $this->faker->myKadNumber; diff --git a/test/Faker/Provider/nb_NO/PhoneNumberTest.php b/test/Faker/Provider/nb_NO/PhoneNumberTest.php index 6930395434..faacafbc6d 100644 --- a/test/Faker/Provider/nb_NO/PhoneNumberTest.php +++ b/test/Faker/Provider/nb_NO/PhoneNumberTest.php @@ -10,7 +10,7 @@ */ final class PhoneNumberTest extends TestCase { - public function testMobileNumber() + public function testMobileNumber(): void { for ($i = 0; $i < 10; ++$i) { $number = $this->faker->mobileNumber; diff --git a/test/Faker/Provider/nl_BE/PaymentTest.php b/test/Faker/Provider/nl_BE/PaymentTest.php index 61f6e2bfcb..d3883b8840 100644 --- a/test/Faker/Provider/nl_BE/PaymentTest.php +++ b/test/Faker/Provider/nl_BE/PaymentTest.php @@ -10,7 +10,7 @@ */ final class PaymentTest extends TestCase { - public function testVatIsValid() + public function testVatIsValid(): void { $vat = $this->faker->vat(); $unspacedVat = $this->faker->vat(false); @@ -21,7 +21,7 @@ public function testVatIsValid() $this->validateChecksum($unspacedVat); } - private function validateChecksum($vat) + private function validateChecksum($vat): void { // Remove the "BE " part from the beginning $numbers = trim(substr($vat, 2)); diff --git a/test/Faker/Provider/nl_BE/PersonTest.php b/test/Faker/Provider/nl_BE/PersonTest.php index ab0e124e07..311887ca18 100644 --- a/test/Faker/Provider/nl_BE/PersonTest.php +++ b/test/Faker/Provider/nl_BE/PersonTest.php @@ -13,7 +13,7 @@ */ final class PersonTest extends TestCase { - public function testRrnIsValid() + public function testRrnIsValid(): void { $rrn = $this->faker->rrn(); @@ -29,13 +29,13 @@ public function testRrnIsValid() self::assertLessThan(997, $middle); } - public function testRrnIsMale() + public function testRrnIsMale(): void { $rrn = $this->faker->rrn('male'); self::assertEquals(substr($rrn, 6, 3) % 2, 1); } - public function testRrnIsFemale() + public function testRrnIsFemale(): void { $rrn = $this->faker->rrn('female'); self::assertEquals(substr($rrn, 6, 3) % 2, 0); diff --git a/test/Faker/Provider/nl_NL/CompanyTest.php b/test/Faker/Provider/nl_NL/CompanyTest.php index cc0c2ca979..6aa4d3d79d 100644 --- a/test/Faker/Provider/nl_NL/CompanyTest.php +++ b/test/Faker/Provider/nl_NL/CompanyTest.php @@ -10,7 +10,7 @@ */ final class CompanyTest extends TestCase { - public function testGenerateValidVatNumber() + public function testGenerateValidVatNumber(): void { $vatNo = $this->faker->vat(); @@ -18,7 +18,7 @@ public function testGenerateValidVatNumber() self::assertMatchesRegularExpression('/^NL[0-9]{9}B[0-9]{2}$/', $vatNo); } - public function testGenerateValidBtwNumberAlias() + public function testGenerateValidBtwNumberAlias(): void { $btwNo = $this->faker->btw(); diff --git a/test/Faker/Provider/nl_NL/PersonTest.php b/test/Faker/Provider/nl_NL/PersonTest.php index 06ebe7bad9..e8938b08f0 100644 --- a/test/Faker/Provider/nl_NL/PersonTest.php +++ b/test/Faker/Provider/nl_NL/PersonTest.php @@ -10,7 +10,7 @@ */ final class PersonTest extends TestCase { - public function testGenerateValidIdNumber() + public function testGenerateValidIdNumber(): void { $idNumber = $this->faker->idNumber(); self::assertEquals(9, strlen($idNumber)); diff --git a/test/Faker/Provider/pl_PL/AddressTest.php b/test/Faker/Provider/pl_PL/AddressTest.php index 10f3d0f20d..e69cbb9160 100644 --- a/test/Faker/Provider/pl_PL/AddressTest.php +++ b/test/Faker/Provider/pl_PL/AddressTest.php @@ -10,7 +10,7 @@ */ final class AddressTest extends TestCase { - public function testState() + public function testState(): void { $state = $this->faker->state(); self::assertNotEmpty($state); diff --git a/test/Faker/Provider/pl_PL/LicensePlateTest.php b/test/Faker/Provider/pl_PL/LicensePlateTest.php index 436396abe2..d0b5bf9464 100644 --- a/test/Faker/Provider/pl_PL/LicensePlateTest.php +++ b/test/Faker/Provider/pl_PL/LicensePlateTest.php @@ -12,7 +12,7 @@ final class LicensePlateTest extends TestCase /** * Test the validity of license plate */ - public function testNonSpecialLicensePlates() + public function testNonSpecialLicensePlates(): void { for ($i = 0; $i < 40; ++$i) { $licensePlate = $this->faker->licensePlate; @@ -25,7 +25,7 @@ public function testNonSpecialLicensePlates() /** * Test that special license plates are filtered out */ - public function testExplicitlyNonSpecialLicensePlates() + public function testExplicitlyNonSpecialLicensePlates(): void { for ($i = 0; $i < 40; ++$i) { $licensePlate = $this->faker->licensePlate( @@ -40,7 +40,7 @@ public function testExplicitlyNonSpecialLicensePlates() /** * Test that special license plates are filtered out */ - public function testWithSpecialLicensePlates() + public function testWithSpecialLicensePlates(): void { for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( @@ -55,7 +55,7 @@ public function testWithSpecialLicensePlates() /** * Test that license plate belongs to podkapracikie voivodeship */ - public function testPodkarpackieLicensePlate() + public function testPodkarpackieLicensePlate(): void { for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( @@ -71,7 +71,7 @@ public function testPodkarpackieLicensePlate() /** * Test that license plate belongs to łodzkie voivodeship or to army */ - public function testLodzkieOrArmyLicensePlate() + public function testLodzkieOrArmyLicensePlate(): void { for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( @@ -87,7 +87,7 @@ public function testLodzkieOrArmyLicensePlate() /** * Test that license plate belongs to łodzkie voivodeship but filters out army */ - public function testLodzkieButNotArmyLicensePlate() + public function testLodzkieButNotArmyLicensePlate(): void { for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( @@ -103,7 +103,7 @@ public function testLodzkieButNotArmyLicensePlate() /** * Test that license plate belongs is generated when invorrect voivodeship is given */ - public function testNoCorrectVoivodeshipLicensePlate() + public function testNoCorrectVoivodeshipLicensePlate(): void { for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( @@ -119,7 +119,7 @@ public function testNoCorrectVoivodeshipLicensePlate() /** * Test that correct license plate is generated when no voivodeship is given */ - public function testNoVoivodeshipLicensePlate() + public function testNoVoivodeshipLicensePlate(): void { for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( @@ -135,7 +135,7 @@ public function testNoVoivodeshipLicensePlate() /** * Test that correct license plate is generated when no voivodeship or county is given */ - public function testNoVoivodeshipNoCountyLicensePlate() + public function testNoVoivodeshipNoCountyLicensePlate(): void { for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( @@ -152,7 +152,7 @@ public function testNoVoivodeshipNoCountyLicensePlate() /** * Test that license plate belongs to one of warszawski zachodni or radomski counties or to Border Guard */ - public function testVoivodeshipCountyLicensePlate() + public function testVoivodeshipCountyLicensePlate(): void { for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( @@ -169,7 +169,7 @@ public function testVoivodeshipCountyLicensePlate() /** * Test that correct license plate belonging to the correct voivedeship is generated when non-existing county is given */ - public function testVoivodeshipFakeCountyLicensePlate() + public function testVoivodeshipFakeCountyLicensePlate(): void { for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( @@ -186,7 +186,7 @@ public function testVoivodeshipFakeCountyLicensePlate() /** * Test that correct license plate is generated when non-existing voivodeship is given */ - public function testVoivodeshipFakeVoivodeshipLicensePlate() + public function testVoivodeshipFakeVoivodeshipLicensePlate(): void { for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( @@ -203,7 +203,7 @@ public function testVoivodeshipFakeVoivodeshipLicensePlate() /** * Test that correct license plate is generated when null is given instead of voivodeships list */ - public function testVoivodeshipNullVoivodeshipArrayLicensePlate() + public function testVoivodeshipNullVoivodeshipArrayLicensePlate(): void { for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( @@ -220,7 +220,7 @@ public function testVoivodeshipNullVoivodeshipArrayLicensePlate() /** * Test that correct license plate is generated when null is given in voivodeships array */ - public function testVoivodeshipNullVoivodeshipLicensePlate() + public function testVoivodeshipNullVoivodeshipLicensePlate(): void { for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( @@ -237,7 +237,7 @@ public function testVoivodeshipNullVoivodeshipLicensePlate() /** * Test that special license plate is not generated when 1st argument is false */ - public function testVoivodeship1stArgumentFalse() + public function testVoivodeship1stArgumentFalse(): void { for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( @@ -254,7 +254,7 @@ public function testVoivodeship1stArgumentFalse() /** * Test that special license plate is generated when 1st argument is true */ - public function testVoivodeship1stArgumentTrue() + public function testVoivodeship1stArgumentTrue(): void { for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( diff --git a/test/Faker/Provider/pl_PL/PersonTest.php b/test/Faker/Provider/pl_PL/PersonTest.php index a56f7c663a..f5319c4145 100644 --- a/test/Faker/Provider/pl_PL/PersonTest.php +++ b/test/Faker/Provider/pl_PL/PersonTest.php @@ -10,14 +10,14 @@ */ final class PersonTest extends TestCase { - public function testPeselLenght() + public function testPeselLenght(): void { $pesel = $this->faker->pesel(); self::assertEquals(11, strlen($pesel)); } - public function testPeselDate() + public function testPeselDate(): void { $date = new \DateTime('1990-01-01'); $pesel = $this->faker->pesel($date); @@ -27,7 +27,7 @@ public function testPeselDate() self::assertEquals('01', substr($pesel, 4, 2)); } - public function testPeselDateWithYearAfter2000() + public function testPeselDateWithYearAfter2000(): void { $date = new \DateTime('2001-01-01'); $pesel = $this->faker->pesel($date); @@ -37,7 +37,7 @@ public function testPeselDateWithYearAfter2000() self::assertEquals('01', substr($pesel, 4, 2)); } - public function testPeselDateWithYearAfter2100() + public function testPeselDateWithYearAfter2100(): void { $date = new \DateTime('2101-01-01'); $pesel = $this->faker->pesel($date); @@ -47,7 +47,7 @@ public function testPeselDateWithYearAfter2100() self::assertEquals('01', substr($pesel, 4, 2)); } - public function testPeselDateWithYearAfter2200() + public function testPeselDateWithYearAfter2200(): void { $date = new \DateTime('2201-01-01'); $pesel = $this->faker->pesel($date); @@ -57,7 +57,7 @@ public function testPeselDateWithYearAfter2200() self::assertEquals('01', substr($pesel, 4, 2)); } - public function testPeselDateWithYearBefore1900() + public function testPeselDateWithYearBefore1900(): void { $date = new \DateTime('1801-01-01'); $pesel = $this->faker->pesel($date); @@ -67,7 +67,7 @@ public function testPeselDateWithYearBefore1900() self::assertEquals('01', substr($pesel, 4, 2)); } - public function testPeselSex() + public function testPeselSex(): void { $male = $this->faker->pesel(null, 'M'); $female = $this->faker->pesel(null, 'F'); @@ -76,7 +76,7 @@ public function testPeselSex() self::assertEquals(0, $female[9] % 2); } - public function testPeselCheckSum() + public function testPeselCheckSum(): void { $pesel = $this->faker->pesel(); $weights = [1, 3, 7, 9, 1, 3, 7, 9, 1, 3, 1]; @@ -89,7 +89,7 @@ public function testPeselCheckSum() self::assertEquals(0, $sum % 10); } - public function testTitle() + public function testTitle(): void { self::assertContains($this->faker->titleFemale(), ['mgr', 'inż.', 'dr', 'doc.']); self::assertContains($this->faker->titleMale(), ['mgr', 'inż.', 'dr', 'doc.']); diff --git a/test/Faker/Provider/pt_BR/CompanyTest.php b/test/Faker/Provider/pt_BR/CompanyTest.php index 9d8e04d892..3b8a38bad7 100644 --- a/test/Faker/Provider/pt_BR/CompanyTest.php +++ b/test/Faker/Provider/pt_BR/CompanyTest.php @@ -10,7 +10,7 @@ */ final class CompanyTest extends TestCase { - public function testCnpjFormatIsValid() + public function testCnpjFormatIsValid(): void { $cnpj = $this->faker->cnpj(false); self::assertMatchesRegularExpression('/\d{8}\d{4}\d{2}/', $cnpj); diff --git a/test/Faker/Provider/pt_BR/PersonTest.php b/test/Faker/Provider/pt_BR/PersonTest.php index 2c373d2238..2bce811f36 100644 --- a/test/Faker/Provider/pt_BR/PersonTest.php +++ b/test/Faker/Provider/pt_BR/PersonTest.php @@ -10,7 +10,7 @@ */ final class PersonTest extends TestCase { - public function testCpfFormatIsValid() + public function testCpfFormatIsValid(): void { $cpf = $this->faker->cpf(false); self::assertMatchesRegularExpression('/\d{9}\d{2}/', $cpf); @@ -18,7 +18,7 @@ public function testCpfFormatIsValid() self::assertMatchesRegularExpression('/\d{3}\.\d{3}\.\d{3}-\d{2}/', $cpf); } - public function testRgFormatIsValid() + public function testRgFormatIsValid(): void { $rg = $this->faker->rg(false); self::assertMatchesRegularExpression('/\d{8}\d/', $rg); diff --git a/test/Faker/Provider/pt_BR/TextTest.php b/test/Faker/Provider/pt_BR/TextTest.php index f0b8f60796..1f15f91cfb 100644 --- a/test/Faker/Provider/pt_BR/TextTest.php +++ b/test/Faker/Provider/pt_BR/TextTest.php @@ -25,7 +25,7 @@ protected function getMethod($name) return $method; } - public function testItShouldAppendEndPunctToTheEndOfString() + public function testItShouldAppendEndPunctToTheEndOfString(): void { self::assertSame( 'Uma noite destas.', diff --git a/test/Faker/Provider/pt_PT/AddressTest.php b/test/Faker/Provider/pt_PT/AddressTest.php index 6ea91f6bfa..8a3759e187 100644 --- a/test/Faker/Provider/pt_PT/AddressTest.php +++ b/test/Faker/Provider/pt_PT/AddressTest.php @@ -11,7 +11,7 @@ */ final class AddressTest extends TestCase { - public function testPostCodeIsValid() + public function testPostCodeIsValid(): void { $main = '[1-9]{1}[0-9]{2}[0,1,4,5,9]{1}'; $pattern = "/^($main)|($main-[0-9]{3})+$/"; @@ -19,7 +19,7 @@ public function testPostCodeIsValid() self::assertSame(preg_match($pattern, $postcode), 1, $postcode); } - public function testAddressIsSingleLine() + public function testAddressIsSingleLine(): void { $this->faker->addProvider(new Person($this->faker)); diff --git a/test/Faker/Provider/pt_PT/PersonTest.php b/test/Faker/Provider/pt_PT/PersonTest.php index 2b32e2ef95..3528eaf400 100644 --- a/test/Faker/Provider/pt_PT/PersonTest.php +++ b/test/Faker/Provider/pt_PT/PersonTest.php @@ -10,7 +10,7 @@ */ final class PersonTest extends TestCase { - public function testTaxpayerIdentificationNumberIsValid() + public function testTaxpayerIdentificationNumberIsValid(): void { $tin = $this->faker->taxpayerIdentificationNumber(); self::assertTrue(self::isValidTin($tin), $tin); diff --git a/test/Faker/Provider/pt_PT/PhoneNumberTest.php b/test/Faker/Provider/pt_PT/PhoneNumberTest.php index 3bb7fcd76e..8221aecdd9 100644 --- a/test/Faker/Provider/pt_PT/PhoneNumberTest.php +++ b/test/Faker/Provider/pt_PT/PhoneNumberTest.php @@ -10,12 +10,12 @@ */ final class PhoneNumberTest extends TestCase { - public function testPhoneNumberReturnsPhoneNumberWithOrWithoutPrefix() + public function testPhoneNumberReturnsPhoneNumberWithOrWithoutPrefix(): void { self::assertMatchesRegularExpression('/^(9[1,2,3,6][0-9]{7})|(2[0-9]{8})|(\+351 [2][0-9]{8})|(\+351 9[1,2,3,6][0-9]{7})/', $this->faker->phoneNumber()); } - public function testMobileNumberReturnsMobileNumberWithOrWithoutPrefix() + public function testMobileNumberReturnsMobileNumberWithOrWithoutPrefix(): void { self::assertMatchesRegularExpression('/^(9[1,2,3,6][0-9]{7})/', $this->faker->mobileNumber()); } diff --git a/test/Faker/Provider/ro_RO/PersonTest.php b/test/Faker/Provider/ro_RO/PersonTest.php index 76849e42af..68c938d4cf 100644 --- a/test/Faker/Provider/ro_RO/PersonTest.php +++ b/test/Faker/Provider/ro_RO/PersonTest.php @@ -76,7 +76,7 @@ public function validInputDataProvider() ]; } - public function testAllRandomReturnsValidCnp() + public function testAllRandomReturnsValidCnp(): void { $cnp = $this->faker->cnp; self::assertTrue( @@ -85,7 +85,7 @@ public function testAllRandomReturnsValidCnp() ); } - public function testValidGenderReturnsValidCnp() + public function testValidGenderReturnsValidCnp(): void { $cnp = $this->faker->cnp(Person::GENDER_MALE); self::assertTrue( @@ -105,7 +105,7 @@ public function testValidGenderReturnsValidCnp() * * @dataProvider invalidGenderProvider */ - public function testInvalidGenderThrowsException($value) + public function testInvalidGenderThrowsException($value): void { $this->expectException(\InvalidArgumentException::class); $this->faker->cnp($value); @@ -116,7 +116,7 @@ public function testInvalidGenderThrowsException($value) * * @dataProvider validYearProvider */ - public function testValidYearReturnsValidCnp($value) + public function testValidYearReturnsValidCnp($value): void { $cnp = $this->faker->cnp(null, $value); self::assertTrue( @@ -130,7 +130,7 @@ public function testValidYearReturnsValidCnp($value) * * @dataProvider invalidYearProvider */ - public function testInvalidYearThrowsException($value) + public function testInvalidYearThrowsException($value): void { $this->expectException(\InvalidArgumentException::class); $this->faker->cnp(null, $value); @@ -141,7 +141,7 @@ public function testInvalidYearThrowsException($value) * * @dataProvider validCountyCodeProvider */ - public function testValidCountyCodeReturnsValidCnp($value) + public function testValidCountyCodeReturnsValidCnp($value): void { $cnp = $this->faker->cnp(null, null, $value); self::assertTrue( @@ -155,13 +155,13 @@ public function testValidCountyCodeReturnsValidCnp($value) * * @dataProvider invalidCountyCodeProvider */ - public function testInvalidCountyCodeThrowsException($value) + public function testInvalidCountyCodeThrowsException($value): void { $this->expectException(\InvalidArgumentException::class); $this->faker->cnp(null, null, $value); } - public function testNonResidentReturnsValidCnp() + public function testNonResidentReturnsValidCnp(): void { $cnp = $this->faker->cnp(null, null, null, false); self::assertTrue( @@ -184,7 +184,7 @@ public function testNonResidentReturnsValidCnp() * * @dataProvider validInputDataProvider */ - public function testValidInputDataReturnsValidCnp($gender, $dateOfBirth, $county, $isResident, $expectedCnpStart) + public function testValidInputDataReturnsValidCnp($gender, $dateOfBirth, $county, $isResident, $expectedCnpStart): void { $cnp = $this->faker->cnp($gender, $dateOfBirth, $county, $isResident); self::assertStringStartsWith( diff --git a/test/Faker/Provider/ro_RO/PhoneNumberTest.php b/test/Faker/Provider/ro_RO/PhoneNumberTest.php index 886de91ed5..2de759974d 100644 --- a/test/Faker/Provider/ro_RO/PhoneNumberTest.php +++ b/test/Faker/Provider/ro_RO/PhoneNumberTest.php @@ -10,17 +10,17 @@ */ final class PhoneNumberTest extends TestCase { - public function testPhoneNumberReturnsNormalPhoneNumber() + public function testPhoneNumberReturnsNormalPhoneNumber(): void { self::assertMatchesRegularExpression('/^0(?:[23][13-7]|7\d)\d{7}$/', $this->faker->phoneNumber()); } - public function testTollFreePhoneNumberReturnsTollFreePhoneNumber() + public function testTollFreePhoneNumberReturnsTollFreePhoneNumber(): void { self::assertMatchesRegularExpression('/^08(?:0[01267]|70)\d{6}$/', $this->faker->tollFreePhoneNumber()); } - public function testPremiumRatePhoneNumberReturnsPremiumRatePhoneNumber() + public function testPremiumRatePhoneNumberReturnsPremiumRatePhoneNumber(): void { self::assertMatchesRegularExpression('/^090[036]\d{6}$/', $this->faker->premiumRatePhoneNumber()); } diff --git a/test/Faker/Provider/ru_RU/CompanyTest.php b/test/Faker/Provider/ru_RU/CompanyTest.php index 614f371c23..c9dc9f48c1 100644 --- a/test/Faker/Provider/ru_RU/CompanyTest.php +++ b/test/Faker/Provider/ru_RU/CompanyTest.php @@ -10,14 +10,14 @@ */ final class CompanyTest extends TestCase { - public function testINN() + public function testINN(): void { self::assertMatchesRegularExpression('/^[0-9]{10}$/', $this->faker->inn10); self::assertEquals('77', substr($this->faker->inn10('77'), 0, 2)); self::assertEquals('02', substr($this->faker->inn10(2), 0, 2)); } - public function testKPP() + public function testKPP(): void { self::assertMatchesRegularExpression('/^[0-9]{9}$/', $this->faker->kpp); self::assertEquals('01001', substr($this->faker->kpp, -5, 5)); @@ -25,7 +25,7 @@ public function testKPP() self::assertEquals(substr($inn10, 0, 4), substr($this->faker->kpp($inn10), 0, 4)); } - public function testCatchPhrase() + public function testCatchPhrase(): void { $phrase = $this->faker->catchPhrase; self::assertNotNull($phrase); @@ -50,7 +50,7 @@ public function checksumProvider() /** * @dataProvider checksumProvider */ - public function testInn10Checksum($inn10, $checksum) + public function testInn10Checksum($inn10, $checksum): void { self::assertSame($checksum, $this->faker->inn10Checksum($inn10), $inn10); } @@ -71,7 +71,7 @@ public function inn10ValidatorProvider() /** * @dataProvider inn10ValidatorProvider */ - public function testInn10IsValid($inn10, $isValid) + public function testInn10IsValid($inn10, $isValid): void { self::assertSame($isValid, $this->faker->inn10IsValid($inn10), $inn10); } diff --git a/test/Faker/Provider/ru_RU/PersonTest.php b/test/Faker/Provider/ru_RU/PersonTest.php index 9af11a5dfa..aa34376d4d 100644 --- a/test/Faker/Provider/ru_RU/PersonTest.php +++ b/test/Faker/Provider/ru_RU/PersonTest.php @@ -10,17 +10,17 @@ */ final class PersonTest extends TestCase { - public function testLastNameFemale() + public function testLastNameFemale(): void { self::assertEquals('а', substr($this->faker->lastName('female'), -2, 2)); } - public function testLastNameMale() + public function testLastNameMale(): void { self::assertNotEquals('а', substr($this->faker->lastName('male'), -2, 2)); } - public function testLastNameRandom() + public function testLastNameRandom(): void { self::assertNotNull($this->faker->lastName()); } diff --git a/test/Faker/Provider/ru_RU/TextTest.php b/test/Faker/Provider/ru_RU/TextTest.php index 8e975aeef0..0c05422f72 100644 --- a/test/Faker/Provider/ru_RU/TextTest.php +++ b/test/Faker/Provider/ru_RU/TextTest.php @@ -25,7 +25,7 @@ protected function getMethod($name) return $method; } - public function testItShouldAppendEndPunctToTheEndOfString() + public function testItShouldAppendEndPunctToTheEndOfString(): void { self::assertSame( 'На другой день Чичиков отправился на обед и вечер.', diff --git a/test/Faker/Provider/sv_SE/MunicipalityTest.php b/test/Faker/Provider/sv_SE/MunicipalityTest.php index 339e77d5d5..7ac7f91da2 100644 --- a/test/Faker/Provider/sv_SE/MunicipalityTest.php +++ b/test/Faker/Provider/sv_SE/MunicipalityTest.php @@ -10,7 +10,7 @@ */ final class MunicipalityTest extends TestCase { - public function testGenerate() + public function testGenerate(): void { self::assertNotEmpty($this->faker->municipality()); } diff --git a/test/Faker/Provider/sv_SE/PersonTest.php b/test/Faker/Provider/sv_SE/PersonTest.php index db08d5b1d2..b2182dc541 100644 --- a/test/Faker/Provider/sv_SE/PersonTest.php +++ b/test/Faker/Provider/sv_SE/PersonTest.php @@ -25,7 +25,7 @@ public function provideSeedAndExpectedReturn() /** * @dataProvider provideSeedAndExpectedReturn */ - public function testPersonalIdentityNumberUsesBirthDateIfProvided($seed, $birthdate, $expected) + public function testPersonalIdentityNumberUsesBirthDateIfProvided($seed, $birthdate, $expected): void { $faker = $this->faker; $faker->seed($seed); @@ -33,25 +33,25 @@ public function testPersonalIdentityNumberUsesBirthDateIfProvided($seed, $birthd self::assertEquals($expected, $pin); } - public function testPersonalIdentityNumberGeneratesLuhnCompliantNumbers() + public function testPersonalIdentityNumberGeneratesLuhnCompliantNumbers(): void { $pin = str_replace('-', '', $this->faker->personalIdentityNumber()); self::assertTrue(Luhn::isValid($pin)); } - public function testPersonalIdentityNumberGeneratesOddValuesForMales() + public function testPersonalIdentityNumberGeneratesOddValuesForMales(): void { $pin = $this->faker->personalIdentityNumber(null, 'male'); self::assertEquals(1, $pin[9] % 2); } - public function testPersonalIdentityNumberGeneratesEvenValuesForFemales() + public function testPersonalIdentityNumberGeneratesEvenValuesForFemales(): void { $pin = $this->faker->personalIdentityNumber(null, 'female'); self::assertEquals(0, $pin[9] % 2); } - public function testBirthNumberNot000() + public function testBirthNumberNot000(): void { $faker = $this->faker; $faker->seed(97270); @@ -60,7 +60,7 @@ public function testBirthNumberNot000() self::assertNotEquals('000', substr($pin, 7, 3)); } - public function testBirthNumberGeneratesEvenValuesForFemales() + public function testBirthNumberGeneratesEvenValuesForFemales(): void { $faker = $this->faker; $faker->seed(372920); diff --git a/test/Faker/Provider/tr_TR/CompanyTest.php b/test/Faker/Provider/tr_TR/CompanyTest.php index f9123ddd71..6e34e6833d 100644 --- a/test/Faker/Provider/tr_TR/CompanyTest.php +++ b/test/Faker/Provider/tr_TR/CompanyTest.php @@ -10,7 +10,7 @@ */ final class CompanyTest extends TestCase { - public function testCompany() + public function testCompany(): void { $company = $this->faker->companyField; self::assertNotNull($company); diff --git a/test/Faker/Provider/tr_TR/PaymentTest.php b/test/Faker/Provider/tr_TR/PaymentTest.php index 0c5e327d1c..cafc08dfc4 100644 --- a/test/Faker/Provider/tr_TR/PaymentTest.php +++ b/test/Faker/Provider/tr_TR/PaymentTest.php @@ -9,7 +9,7 @@ */ final class PaymentTest extends TestCase { - public function testBankAccountNumber() + public function testBankAccountNumber(): void { $accNo = $this->faker->bankAccountNumber; self::assertSame(substr($accNo, 0, 2), 'TR'); diff --git a/test/Faker/Provider/tr_TR/PersonTest.php b/test/Faker/Provider/tr_TR/PersonTest.php index ab5aeb9c05..f9760983f4 100644 --- a/test/Faker/Provider/tr_TR/PersonTest.php +++ b/test/Faker/Provider/tr_TR/PersonTest.php @@ -10,7 +10,7 @@ */ final class PersonTest extends TestCase { - public function testTCNo() + public function testTCNo(): void { for ($i = 0; $i < 100; ++$i) { $number = $this->faker->tcNo; @@ -37,7 +37,7 @@ public function tcNoChecksumProvider() * @param string $tcNo * @param string $checksum */ - public function testTcNoChecksum($tcNo, $checksum) + public function testTcNoChecksum($tcNo, $checksum): void { self::assertSame($checksum, $this->faker->tcNoChecksum($tcNo), $tcNo); } @@ -62,7 +62,7 @@ public function tcNoValidatorProvider() * @param string $tcNo * @param bool $isValid */ - public function testIsValid($tcNo, $isValid) + public function testIsValid($tcNo, $isValid): void { self::assertSame($isValid, $this->faker->tcNoisValid($tcNo), $tcNo); } diff --git a/test/Faker/Provider/tr_TR/PhoneNumberTest.php b/test/Faker/Provider/tr_TR/PhoneNumberTest.php index b4439cb9d6..47fbf14af6 100644 --- a/test/Faker/Provider/tr_TR/PhoneNumberTest.php +++ b/test/Faker/Provider/tr_TR/PhoneNumberTest.php @@ -10,7 +10,7 @@ */ final class PhoneNumberTest extends TestCase { - public function testPhoneNumber() + public function testPhoneNumber(): void { for ($i = 0; $i < 100; ++$i) { $number = $this->faker->phoneNumber; @@ -21,7 +21,7 @@ public function testPhoneNumber() } } - public function testE164PhoneNumberFormat() + public function testE164PhoneNumberFormat(): void { for ($i = 0; $i < 10; ++$i) { $number = $this->faker->e164PhoneNumber(); diff --git a/test/Faker/Provider/uk_UA/AddressTest.php b/test/Faker/Provider/uk_UA/AddressTest.php index dcbc7c99f3..fb9e6d256e 100644 --- a/test/Faker/Provider/uk_UA/AddressTest.php +++ b/test/Faker/Provider/uk_UA/AddressTest.php @@ -10,7 +10,7 @@ */ final class AddressTest extends TestCase { - public function testPostCodeIsValid() + public function testPostCodeIsValid(): void { $main = '[0-9]{5}'; $pattern = "/^($main)|($main-[0-9]{3})+$/"; @@ -18,13 +18,13 @@ public function testPostCodeIsValid() self::assertMatchesRegularExpression($pattern, $postcode, 'Post code ' . $postcode . ' is wrong!'); } - public function testEmptySuffixes() + public function testEmptySuffixes(): void { self::assertEmpty($this->faker->citySuffix, 'City suffix should be empty!'); self::assertEmpty($this->faker->streetSuffix, 'Street suffix should be empty!'); } - public function testStreetCyrOnly() + public function testStreetCyrOnly(): void { $pattern = "/[0-9А-ЩЯІЇЄЮа-щяіїєюьIVXCM][0-9А-ЩЯІЇЄЮа-щяіїєюь \'-.]*[А-Яа-я.]/u"; $streetName = $this->faker->streetName; @@ -35,7 +35,7 @@ public function testStreetCyrOnly() ); } - public function testCityNameCyrOnly() + public function testCityNameCyrOnly(): void { $pattern = "/[А-ЩЯІЇЄЮа-щяіїєюь][0-9А-ЩЯІЇЄЮа-щяіїєюь \'-]*[А-Яа-я]/u"; $city = $this->faker->city; @@ -46,7 +46,7 @@ public function testCityNameCyrOnly() ); } - public function testRegionNameCyrOnly() + public function testRegionNameCyrOnly(): void { $pattern = '/[А-ЩЯІЇЄЮ][А-ЩЯІЇЄЮа-щяіїєюь]*а$/u'; $regionName = $this->faker->region; @@ -57,7 +57,7 @@ public function testRegionNameCyrOnly() ); } - public function testCountryCyrOnly() + public function testCountryCyrOnly(): void { $pattern = "/[А-ЩЯІЇЄЮа-щяіїєюьIVXCM][А-ЩЯІЇЄЮа-щяіїєюь \'-]*[А-Яа-я.]/u"; $country = $this->faker->country; diff --git a/test/Faker/Provider/uk_UA/PersonTest.php b/test/Faker/Provider/uk_UA/PersonTest.php index 8c742b8457..3773c984b0 100644 --- a/test/Faker/Provider/uk_UA/PersonTest.php +++ b/test/Faker/Provider/uk_UA/PersonTest.php @@ -10,27 +10,27 @@ */ final class PersonTest extends TestCase { - public function testFirstNameMaleReturns() + public function testFirstNameMaleReturns(): void { self::assertEquals('Максим', $this->faker->firstNameMale()); } - public function testFirstNameFemaleReturns() + public function testFirstNameFemaleReturns(): void { self::assertEquals('Людмила', $this->faker->firstNameFemale()); } - public function testMiddleNameMaleReturns() + public function testMiddleNameMaleReturns(): void { self::assertEquals('Миколайович', $this->faker->middleNameMale()); } - public function testMiddleNameFemaleReturns() + public function testMiddleNameFemaleReturns(): void { self::assertEquals('Миколаївна', $this->faker->middleNameFemale()); } - public function testLastNameReturns() + public function testLastNameReturns(): void { self::assertEquals('Броваренко', $this->faker->lastName()); } diff --git a/test/Faker/Provider/uk_UA/PhoneNumberTest.php b/test/Faker/Provider/uk_UA/PhoneNumberTest.php index c6cac9336b..1bd22271c7 100644 --- a/test/Faker/Provider/uk_UA/PhoneNumberTest.php +++ b/test/Faker/Provider/uk_UA/PhoneNumberTest.php @@ -10,7 +10,7 @@ */ final class PhoneNumberTest extends TestCase { - public function testPhoneNumberFormat() + public function testPhoneNumberFormat(): void { $pattern = "/((\+38)(((\(\d{3}\))\d{7}|(\(\d{4}\))\d{6})|(\d{8})))|0\d{9}/"; $phoneNumber = $this->faker->phoneNumber; @@ -21,7 +21,7 @@ public function testPhoneNumberFormat() ); } - public function testE164PhoneNumberFormat() + public function testE164PhoneNumberFormat(): void { $pattern = '/^\+?380[1-9]\d{8}$/'; $phoneNumber = $this->faker->e164PhoneNumber; diff --git a/test/Faker/Provider/zh_TW/CompanyTest.php b/test/Faker/Provider/zh_TW/CompanyTest.php index 2b4d1d4c10..fe7ce63264 100644 --- a/test/Faker/Provider/zh_TW/CompanyTest.php +++ b/test/Faker/Provider/zh_TW/CompanyTest.php @@ -10,7 +10,7 @@ */ final class CompanyTest extends TestCase { - public function testVAT() + public function testVAT(): void { self::assertEquals(8, floor(log10($this->faker->VAT) + 1)); } diff --git a/test/Faker/Provider/zh_TW/PersonTest.php b/test/Faker/Provider/zh_TW/PersonTest.php index cfdc200667..923ae0990c 100644 --- a/test/Faker/Provider/zh_TW/PersonTest.php +++ b/test/Faker/Provider/zh_TW/PersonTest.php @@ -13,7 +13,7 @@ final class PersonTest extends TestCase /** * @see https://zh.wikipedia.org/wiki/%E4%B8%AD%E8%8F%AF%E6%B0%91%E5%9C%8B%E5%9C%8B%E6%B0%91%E8%BA%AB%E5%88%86%E8%AD%89 */ - public function testPersonalIdentityNumber() + public function testPersonalIdentityNumber(): void { $id = $this->faker->personalIdentityNumber; diff --git a/test/Faker/Provider/zh_TW/TextTest.php b/test/Faker/Provider/zh_TW/TextTest.php index b5f236298e..e839c8cc97 100644 --- a/test/Faker/Provider/zh_TW/TextTest.php +++ b/test/Faker/Provider/zh_TW/TextTest.php @@ -25,7 +25,7 @@ protected function getMethod($name) return $method; } - public function testItShouldExplodeTheStringToArray() + public function testItShouldExplodeTheStringToArray(): void { self::assertSame( ['中', '文', '測', '試', '真', '有', '趣'], @@ -38,7 +38,7 @@ public function testItShouldExplodeTheStringToArray() ); } - public function testItShouldReturnTheStringLength() + public function testItShouldReturnTheStringLength(): void { self::assertContains( $this->getMethod('strlen')->invokeArgs(null, ['中文測試真有趣']), @@ -46,7 +46,7 @@ public function testItShouldReturnTheStringLength() ); } - public function testItShouldReturnTheCharacterIsValidStartOrNot() + public function testItShouldReturnTheCharacterIsValidStartOrNot(): void { self::assertTrue($this->getMethod('validStart')->invokeArgs(null, ['中'])); @@ -59,7 +59,7 @@ public function testItShouldReturnTheCharacterIsValidStartOrNot() self::assertFalse($this->getMethod('validStart')->invokeArgs(null, ['!'])); } - public function testItShouldAppendEndPunctToTheEndOfString() + public function testItShouldAppendEndPunctToTheEndOfString(): void { self::assertSame( '中文測試真有趣。', From ce5a1c6289bbc51c7a4126405b3774f03e099698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 7 Dec 2022 17:31:03 +0100 Subject: [PATCH 13/22] Fix: Configure no_trailing_comma_in_singleline instead of deprecated no_trailing_comma_in_singleline_array fixer (#553) --- .php-cs-fixer.dist.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 83bb1fa7be..d7e95b54aa 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -102,7 +102,11 @@ 'no_spaces_around_offset' => true, 'no_superfluous_elseif' => true, 'no_superfluous_phpdoc_tags' => true, - 'no_trailing_comma_in_singleline_array' => true, + 'no_trailing_comma_in_singleline' => [ + 'elements' => [ + 'array', + ], + ], 'no_unneeded_control_parentheses' => true, 'no_unneeded_curly_braces' => true, 'no_unneeded_final_method' => true, From 9491824167939526a4c184a58522280f858a4165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 7 Dec 2022 17:31:42 +0100 Subject: [PATCH 14/22] Fix: Assemble cache key from branch name (#552) --- .github/workflows/coding-standards.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 81ea1d81f3..38e6da99e5 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -52,9 +52,10 @@ jobs: uses: "actions/cache@v3" with: path: ".php_cs.cache" - key: "composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}" + key: "composer-${{ runner.os }}-${{ matrix.php-version }}-${{ github.ref_name }}" restore-keys: | - composer-${{ runner.os }}-${{ matrix.php-version }}- + composer-${{ runner.os }}-${{ matrix.php-version }}-main + composer-${{ runner.os }}-${{ matrix.php-version }} composer-${{ runner.os }}- composer- From a6761a0e32cb5fb78f81dda6fef3afd9d7306145 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Dec 2022 16:32:07 +0000 Subject: [PATCH 15/22] composer(deps): bump vimeo/psalm in /vendor-bin/psalm (#550) Bumps [vimeo/psalm](https://github.com/vimeo/psalm) from 4.30.0 to 5.1.0. - [Release notes](https://github.com/vimeo/psalm/releases) - [Commits](https://github.com/vimeo/psalm/compare/4.30.0...5.1.0) --- updated-dependencies: - dependency-name: vimeo/psalm dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- vendor-bin/psalm/composer.json | 2 +- vendor-bin/psalm/composer.lock | 743 ++++++++++++++++++++++++--------- 2 files changed, 545 insertions(+), 200 deletions(-) diff --git a/vendor-bin/psalm/composer.json b/vendor-bin/psalm/composer.json index 3f22978855..5d1dda31f6 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": "^4.30.0" + "vimeo/psalm": "^5.1.0" }, "config": { "platform": { diff --git a/vendor-bin/psalm/composer.lock b/vendor-bin/psalm/composer.lock index bd4c905f85..ae14540e94 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": "6440bd3321cecaca3d65a7d334326aab", + "content-hash": "d606595cc2efeff717a214f5a70ec023", "packages": [ { "name": "amphp/amp", @@ -247,30 +247,30 @@ }, { "name": "composer/pcre", - "version": "1.0.1", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560" + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/67a32d7d6f9f560b726ab25a061b38ff3a80c560", - "reference": "67a32d7d6f9f560b726ab25a061b38ff3a80c560", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", "shasum": "" }, "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "phpstan/phpstan": "^1.3", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5" + "symfony/phpunit-bridge": "^5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.x-dev" + "dev-main": "3.x-dev" } }, "autoload": { @@ -298,7 +298,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/1.0.1" + "source": "https://github.com/composer/pcre/tree/3.1.0" }, "funding": [ { @@ -314,7 +314,7 @@ "type": "tidelift" } ], - "time": "2022-01-21T20:24:37+00:00" + "time": "2022-11-17T09:50:14+00:00" }, { "name": "composer/semver", @@ -399,27 +399,27 @@ }, { "name": "composer/xdebug-handler", - "version": "2.0.5", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a" + "reference": "ced299686f41dce890debac69273b47ffe98a40c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/9e36aeed4616366d2b690bdce11f71e9178c579a", - "reference": "9e36aeed4616366d2b690bdce11f71e9178c579a", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", "shasum": "" }, "require": { - "composer/pcre": "^1", - "php": "^5.3.2 || ^7.0 || ^8.0", + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", "psr/log": "^1 || ^2 || ^3" }, "require-dev": { "phpstan/phpstan": "^1.0", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" + "symfony/phpunit-bridge": "^6.0" }, "type": "library", "autoload": { @@ -445,7 +445,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/2.0.5" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" }, "funding": [ { @@ -461,7 +461,7 @@ "type": "tidelift" } ], - "time": "2022-02-24T20:20:32+00:00" + "time": "2022-02-25T21:32:43+00:00" }, { "name": "dnoegel/php-xdg-base-dir", @@ -763,25 +763,25 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "2.1.0", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b" + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b", - "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", "shasum": "" }, "require": { - "php": ">=7.1" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -810,47 +810,44 @@ ], "support": { "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/master" + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" }, - "time": "2020-04-27T09:25:28+00:00" + "time": "2020-06-27T09:03:43+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.4", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpdocumentor/type-resolver": "0.4.*", - "phpunit/phpunit": "^6.4" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "5.x-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -861,42 +858,50 @@ { "name": "Mike van Riel", "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/release/4.x" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" }, - "time": "2019-12-28T18:55:12+00:00" + "time": "2021-10-19T17:43:47+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.0.1", + "version": "1.6.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/48f445a408c131e38cab1c235aa6d2bb7a0bb20d", + "reference": "48f445a408c131e38cab1c235aa6d2bb7a0bb20d", "shasum": "" }, "require": { - "php": "^7.1", + "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" + "ext-tokenizer": "*", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.13.9", + "vimeo/psalm": "^4.25" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-1.x": "1.x-dev" } }, "autoload": { @@ -917,33 +922,28 @@ "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/0.7.2" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.2" }, - "time": "2019-08-22T18:11:29+00:00" + "time": "2022-10-14T12:47:21+00:00" }, { "name": "psr/container", - "version": "1.0.0", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.4.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -956,7 +956,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common Container Interface (PHP FIG PSR-11)", @@ -970,9 +970,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/master" + "source": "https://github.com/php-fig/container/tree/1.1.2" }, - "time": "2017-02-14T16:28:37+00:00" + "time": "2021-11-05T16:50:12+00:00" }, { "name": "psr/log", @@ -1026,29 +1026,29 @@ }, { "name": "sebastian/diff", - "version": "3.0.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1080,7 +1080,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" }, "funding": [ { @@ -1088,47 +1088,50 @@ "type": "github" } ], - "time": "2020-11-30T07:59:04+00:00" + "time": "2020-10-26T13:10:38+00:00" }, { "name": "symfony/console", - "version": "v4.4.49", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "33fa45ffc81fdcc1ca368d4946da859c8cdb58d9" + "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/33fa45ffc81fdcc1ca368d4946da859c8cdb58d9", - "reference": "33fa45ffc81fdcc1ca368d4946da859c8cdb58d9", + "url": "https://api.github.com/repos/symfony/console/zipball/8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", + "reference": "8e9b9c8dfb33af6057c94e1b44846bee700dc5ef", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", + "symfony/polyfill-php73": "^1.9", "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2" + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.1|^6.0" }, "conflict": { "psr/log": ">=3", - "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3|>=5", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", "symfony/lock": "<4.4", - "symfony/process": "<3.3" + "symfony/process": "<4.4" }, "provide": { "psr/log-implementation": "1.0|2.0" }, "require-dev": { "psr/log": "^1|^2", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/event-dispatcher": "^4.3", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^3.4|^4.0|^5.0", - "symfony/var-dumper": "^4.3|^5.0" + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/lock": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -1161,8 +1164,145 @@ ], "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.4.16" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-25T14:09:27+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-01-02T09:53:40+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v5.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "ac09569844a9109a5966b9438fc29113ce77cf51" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/ac09569844a9109a5966b9438fc29113ce77cf51", + "reference": "ac09569844a9109a5966b9438fc29113ce77cf51", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8", + "symfony/polyfill-php80": "^1.16" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/console/tree/v4.4.49" + "source": "https://github.com/symfony/filesystem/tree/v5.4.13" }, "funding": [ { @@ -1178,7 +1318,7 @@ "type": "tidelift" } ], - "time": "2022-11-05T17:10:16+00:00" + "time": "2022-09-21T19:53:16+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1262,6 +1402,171 @@ ], "time": "2022-11-03T14:55:06+00:00" }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, { "name": "symfony/polyfill-mbstring", "version": "v1.27.0", @@ -1509,21 +1814,25 @@ }, { "name": "symfony/service-contracts", - "version": "v1.1.13", + "version": "v2.5.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "afa00c500c2d6aea6e3b2f4862355f507bc5ebb4" + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/afa00c500c2d6aea6e3b2f4862355f507bc5ebb4", - "reference": "afa00c500c2d6aea6e3b2f4862355f507bc5ebb4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", "shasum": "" }, "require": { - "php": ">=7.1.3", - "psr/container": "^1.0" + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" }, "suggest": { "symfony/service-implementation": "" @@ -1531,7 +1840,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.1-dev" + "dev-main": "2.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -1568,7 +1877,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v1.1.13" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" }, "funding": [ { @@ -1584,28 +1893,114 @@ "type": "tidelift" } ], - "time": "2022-05-27T14:01:05+00:00" + "time": "2022-05-30T19:17:29+00:00" + }, + { + "name": "symfony/string", + "version": "v5.4.15", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", + "reference": "571334ce9f687e3e6af72db4d3b2a9431e4fd9ed", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" + }, + "conflict": { + "symfony/translation-contracts": ">=3.0" + }, + "require-dev": { + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/http-client": "^4.4|^5.0|^6.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.4.15" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-10-05T15:16:54+00:00" }, { "name": "vimeo/psalm", - "version": "4.30.0", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69" + "reference": "4defa177c89397c5e14737a80fe4896584130674" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/d0bc6e25d89f649e4f36a534f330f8bb4643dd69", - "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/4defa177c89397c5e14737a80fe4896584130674", + "reference": "4defa177c89397c5e14737a80fe4896584130674", "shasum": "" }, "require": { "amphp/amp": "^2.4.2", "amphp/byte-stream": "^1.5", - "composer/package-versions-deprecated": "^1.8.0", + "composer/package-versions-deprecated": "^1.10.0", "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.1 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^2.0 || ^3.0", "dnoegel/php-xdg-base-dir": "^0.1.1", "ext-ctype": "*", "ext-dom": "*", @@ -1614,35 +2009,34 @@ "ext-mbstring": "*", "ext-simplexml": "*", "ext-tokenizer": "*", - "felixfbecker/advanced-json-rpc": "^3.0.3", - "felixfbecker/language-server-protocol": "^1.5", + "felixfbecker/advanced-json-rpc": "^3.1", + "felixfbecker/language-server-protocol": "^1.5.2", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", "nikic/php-parser": "^4.13", "openlss/lib-array2xml": "^1.0", - "php": "^7.1|^8", - "sebastian/diff": "^3.0 || ^4.0", - "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", - "symfony/polyfill-php80": "^1.25", - "webmozart/path-util": "^2.3" + "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", + "sebastian/diff": "^4.0", + "symfony/console": "^4.1.6 || ^5.0 || ^6.0", + "symfony/filesystem": "^5.4 || ^6.0", + "symfony/polyfill-php80": "^1.25" }, "provide": { "psalm/psalm": "self.version" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "brianium/paratest": "^4.0||^6.0", + "bamarni/composer-bin-plugin": "^1.4", + "brianium/paratest": "^6.0", "ext-curl": "*", + "mockery/mockery": "^1.5", + "nunomaduro/mock-final-classes": "^1.1", "php-parallel-lint/php-parallel-lint": "^1.2", - "phpdocumentor/reflection-docblock": "^5", - "phpmyadmin/sql-parser": "5.1.0||dev-master", - "phpspec/prophecy": ">=1.9.0", - "phpstan/phpdoc-parser": "1.2.* || 1.6.4", - "phpunit/phpunit": "^9.0", - "psalm/plugin-phpunit": "^0.16", - "slevomat/coding-standard": "^7.0", - "squizlabs/php_codesniffer": "^3.5", - "symfony/process": "^4.3 || ^5.0 || ^6.0", - "weirdan/prophecy-shim": "^1.0 || ^2.0" + "phpstan/phpdoc-parser": "^1.6", + "phpunit/phpunit": "^9.5", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18", + "slevomat/coding-standard": "^8.4", + "squizlabs/php_codesniffer": "^3.6", + "symfony/process": "^4.4 || ^5.0 || ^6.0" }, "suggest": { "ext-curl": "In order to send data to shepherd", @@ -1658,17 +2052,14 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev", + "dev-master": "5.x-dev", + "dev-4.x": "4.x-dev", "dev-3.x": "3.x-dev", "dev-2.x": "2.x-dev", "dev-1.x": "1.x-dev" } }, "autoload": { - "files": [ - "src/functions.php", - "src/spl_object_id.php" - ], "psr-4": { "Psalm\\": "src/Psalm/" } @@ -1690,36 +2081,41 @@ ], "support": { "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.30.0" + "source": "https://github.com/vimeo/psalm/tree/5.1.0" }, - "time": "2022-11-06T20:37:08+00:00" + "time": "2022-12-02T01:23:35+00:00" }, { "name": "webmozart/assert", - "version": "1.9.1", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "ext-ctype": "*", + "php": "^7.2 || ^8.0" }, "conflict": { "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<3.9.1" + "vimeo/psalm": "<4.6.1 || 4.6.2" }, "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" + "phpunit/phpunit": "^8.5.13" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -1743,60 +2139,9 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.9.1" - }, - "time": "2020-07-08T17:02:28+00:00" - }, - { - "name": "webmozart/path-util", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/path-util.git", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "webmozart/assert": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\PathUtil\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", - "support": { - "issues": "https://github.com/webmozart/path-util/issues", - "source": "https://github.com/webmozart/path-util/tree/2.3.0" + "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, - "abandoned": "symfony/filesystem", - "time": "2015-12-17T08:42:14+00:00" + "time": "2022-06-03T18:03:27+00:00" } ], "packages-dev": [], From ff62b0f54eae914e13aa301300280bc7de4bfbbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 7 Dec 2022 17:32:33 +0100 Subject: [PATCH 16/22] Fix: Configure indentation for all `*.yml` and `*.yaml` files (#549) * Fix: Configure indentation for all *.yml and *.yaml files * Fix: Indent with 2 spaces --- .editorconfig | 2 +- roave-bc-check.yaml | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.editorconfig b/.editorconfig index ecc01add38..9cabf2509b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,7 +11,7 @@ indent_style = space insert_final_newline = true trim_trailing_whitespace = true -[*.yml] +[*.{yaml, yml}] indent_size = 2 [Makefile] diff --git a/roave-bc-check.yaml b/roave-bc-check.yaml index 3d83bf0412..d515cae370 100644 --- a/roave-bc-check.yaml +++ b/roave-bc-check.yaml @@ -1,18 +1,18 @@ 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: 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: 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 \$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\] 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#' + 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: 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: 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 \$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\] 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#' From c734fd3771d26352f95f092f4c5803e75c25b55d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 7 Dec 2022 18:44:51 +0100 Subject: [PATCH 17/22] Fix: Run 'make baseline' (#557) --- psalm.baseline.xml | 52 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/psalm.baseline.xml b/psalm.baseline.xml index 7d5b26835d..2a60af42df 100644 --- a/psalm.baseline.xml +++ b/psalm.baseline.xml @@ -1,5 +1,5 @@ - + 0 @@ -139,6 +139,9 @@ + + $array + Closure @@ -148,6 +151,22 @@ false + + + $element->ownerDocument + $element->ownerDocument + $element->ownerDocument + $element->ownerDocument + $element->ownerDocument + $element->ownerDocument + $element->ownerDocument + $element->ownerDocument + $element->ownerDocument + $element->ownerDocument + $element->ownerDocument + $root->ownerDocument + + $imei @@ -169,7 +188,7 @@ - $checksumArr[$checksum % 11] + $weights[$i] @@ -182,11 +201,40 @@ static::split($text) + + + $multipliers[$i - 1] + + + + + $weights[$i] + $weights[$i] + + + + + $weights[$i] + + + + $high[$i] + $low[$i] + $result[$i] + $weights[$i + 3] + $weights[$i] + $weights[$i] + DateTime + + + $multipliers[$i] + + static::lastName() From 51ed7d2cddaf5806ed8e21111482692254a724be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 7 Dec 2022 18:53:01 +0100 Subject: [PATCH 18/22] Fix: Remove platform configuration (#560) --- composer.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/composer.json b/composer.json index 392fb3c662..afdecc773f 100644 --- a/composer.json +++ b/composer.json @@ -50,10 +50,7 @@ "bamarni/composer-bin-plugin": true, "composer/package-versions-deprecated": true }, - "sort-packages": true, - "platform": { - "php": "7.4.32" - } + "sort-packages": true }, "extra": { "branch-alias": { From 88564c7857ace79fed425629d87d70395986e875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 7 Dec 2022 18:53:33 +0100 Subject: [PATCH 19/22] Enhancement: Configure `trailing_comma_in_multiline` fixer to include `arguments` in `elements` option (#555) * Enhancement: Configure trailing_comma_in_multiline fixer to include arguments in elements option * Fix: Run 'make cs' --- .php-cs-fixer.dist.php | 1 + src/Faker/Calculator/Isbn.php | 2 +- src/Faker/Container/Container.php | 14 ++++----- src/Faker/Container/ContainerBuilder.php | 4 +-- src/Faker/Core/Blood.php | 2 +- src/Faker/Core/Color.php | 8 ++--- src/Faker/Core/DateTime.php | 6 ++-- src/Faker/Core/Uuid.php | 2 +- src/Faker/Core/Version.php | 2 +- src/Faker/Generator.php | 6 ++-- src/Faker/ORM/Doctrine/EntityPopulator.php | 2 +- src/Faker/ORM/Doctrine/Populator.php | 2 +- src/Faker/ORM/Spot/Populator.php | 2 +- src/Faker/Provider/Color.php | 2 +- src/Faker/Provider/DateTime.php | 8 ++--- src/Faker/Provider/Image.php | 12 ++++---- src/Faker/Provider/Uuid.php | 2 +- src/Faker/Provider/ar_SA/Person.php | 2 +- src/Faker/Provider/bg_BG/Payment.php | 2 +- src/Faker/Provider/de_DE/PhoneNumber.php | 2 +- src/Faker/Provider/el_GR/PhoneNumber.php | 16 +++++----- src/Faker/Provider/en_GB/Company.php | 8 ++--- src/Faker/Provider/en_ZA/Company.php | 2 +- test/Faker/Core/UuidTest.php | 2 +- test/Faker/Extension/ContainerBuilderTest.php | 4 +-- test/Faker/Extension/ContainerTest.php | 2 +- test/Faker/GeneratorTest.php | 4 +-- test/Faker/Provider/BaseTest.php | 2 +- test/Faker/Provider/ImageTest.php | 24 +++++++-------- test/Faker/Provider/el_GR/PhoneNumberTest.php | 12 ++++---- test/Faker/Provider/el_GR/TextTest.php | 12 ++++---- test/Faker/Provider/en_NZ/PhoneNumberTest.php | 2 +- test/Faker/Provider/en_ZA/PhoneNumberTest.php | 2 +- test/Faker/Provider/fr_FR/TextTest.php | 12 ++++---- test/Faker/Provider/ka_GE/TextTest.php | 12 ++++---- test/Faker/Provider/kk_KZ/CompanyTest.php | 2 +- test/Faker/Provider/kk_KZ/TextTest.php | 12 ++++---- test/Faker/Provider/ko_KR/TextTest.php | 12 ++++---- .../Faker/Provider/pl_PL/LicensePlateTest.php | 30 +++++++++---------- test/Faker/Provider/pt_BR/TextTest.php | 12 ++++---- test/Faker/Provider/ro_RO/PersonTest.php | 16 +++++----- test/Faker/Provider/ru_RU/CompanyTest.php | 2 +- test/Faker/Provider/ru_RU/TextTest.php | 12 ++++---- test/Faker/Provider/uk_UA/AddressTest.php | 8 ++--- test/Faker/Provider/uk_UA/PhoneNumberTest.php | 4 +-- test/Faker/Provider/zh_TW/TextTest.php | 12 ++++---- 46 files changed, 161 insertions(+), 160 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index d7e95b54aa..5b3ec3cb7f 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -192,6 +192,7 @@ 'ternary_to_null_coalescing' => true, 'trailing_comma_in_multiline' => [ 'elements' => [ + 'arguments', 'arrays', ], ], diff --git a/src/Faker/Calculator/Isbn.php b/src/Faker/Calculator/Isbn.php index f098233be8..df2f59d721 100644 --- a/src/Faker/Calculator/Isbn.php +++ b/src/Faker/Calculator/Isbn.php @@ -36,7 +36,7 @@ public static function checksum(string $input): string $digits, static function (&$digit, $position): void { $digit = (10 - $position) * $digit; - } + }, ); $result = (11 - array_sum($digits) % 11) % 11; diff --git a/src/Faker/Container/Container.php b/src/Faker/Container/Container.php index ddc5a27f67..2dd2d974d7 100644 --- a/src/Faker/Container/Container.php +++ b/src/Faker/Container/Container.php @@ -46,7 +46,7 @@ public function get($id): Extension if (!is_string($id)) { throw new \InvalidArgumentException(sprintf( 'First argument of %s::get() must be string', - self::class + self::class, )); } @@ -57,7 +57,7 @@ public function get($id): Extension if (!$this->has($id)) { throw new NotInContainerException(sprintf( 'There is not service with id "%s" in the container.', - $id + $id, )); } @@ -69,7 +69,7 @@ public function get($id): Extension throw new \RuntimeException(sprintf( 'Service resolved for identifier "%s" does not implement the %s" interface.', $id, - Extension::class + Extension::class, )); } @@ -90,7 +90,7 @@ private function getService($id, $definition) throw new ContainerException( sprintf('Error while invoking callable for "%s"', $id), 0, - $e + $e, ); } } elseif (is_object($definition)) { @@ -106,12 +106,12 @@ private function getService($id, $definition) throw new ContainerException(sprintf( 'Could not instantiate class "%s". Class was not found.', - $id + $id, )); } else { throw new ContainerException(sprintf( 'Invalid type for definition with id "%s"', - $id + $id, )); } } @@ -128,7 +128,7 @@ public function has($id): bool if (!is_string($id)) { throw new \InvalidArgumentException(sprintf( 'First argument of %s::get() must be string', - self::class + self::class, )); } diff --git a/src/Faker/Container/ContainerBuilder.php b/src/Faker/Container/ContainerBuilder.php index 008bc5d6c2..3fb335fff5 100644 --- a/src/Faker/Container/ContainerBuilder.php +++ b/src/Faker/Container/ContainerBuilder.php @@ -34,7 +34,7 @@ public function add($value, string $name = null): self if (!is_string($value) && !is_callable($value) && !is_object($value)) { throw new \InvalidArgumentException(sprintf( 'First argument to "%s::add()" must be a string, callable or object.', - self::class + self::class, )); } @@ -46,7 +46,7 @@ public function add($value, string $name = null): self } else { throw new \InvalidArgumentException(sprintf( 'Second argument to "%s::add()" is required not passing a string or object as first argument', - self::class + self::class, )); } } diff --git a/src/Faker/Core/Blood.php b/src/Faker/Core/Blood.php index 48a67ff625..50a5806c6b 100644 --- a/src/Faker/Core/Blood.php +++ b/src/Faker/Core/Blood.php @@ -36,7 +36,7 @@ public function bloodGroup(): string return sprintf( '%s%s', $this->bloodType(), - $this->bloodRh() + $this->bloodRh(), ); } } diff --git a/src/Faker/Core/Color.php b/src/Faker/Core/Color.php index d4d5d26801..6e4e350e6d 100644 --- a/src/Faker/Core/Color.php +++ b/src/Faker/Core/Color.php @@ -78,7 +78,7 @@ public function safeHexColor(): string $color[1], $color[1], $color[2], - $color[2] + $color[2], ); } @@ -113,7 +113,7 @@ public function rgbCssColor(): string { return sprintf( 'rgb(%s)', - $this->rgbColor() + $this->rgbColor(), ); } @@ -127,7 +127,7 @@ public function rgbaCssColor(): string return sprintf( 'rgba(%s,%s)', $this->rgbColor(), - $number->randomFloat(1, 0, 1) + $number->randomFloat(1, 0, 1), ); } @@ -158,7 +158,7 @@ public function hslColor(): string '%s,%s,%s', $number->numberBetween(0, 360), $number->numberBetween(0, 100), - $number->numberBetween(0, 100) + $number->numberBetween(0, 100), ); } diff --git a/src/Faker/Core/DateTime.php b/src/Faker/Core/DateTime.php index 1487cfdb1f..f3d7877654 100644 --- a/src/Faker/Core/DateTime.php +++ b/src/Faker/Core/DateTime.php @@ -89,7 +89,7 @@ public function dateTime($until = 'now', string $timezone = null): \DateTime { return $this->setTimezone( $this->getTimestampDateTime($this->unixTime($until)), - $timezone + $timezone, ); } @@ -99,7 +99,7 @@ public function dateTimeAD($until = 'now', string $timezone = null): \DateTime return $this->setTimezone( $this->getTimestampDateTime($this->generator->numberBetween($min, $this->getTimestamp($until))), - $timezone + $timezone, ); } @@ -116,7 +116,7 @@ public function dateTimeBetween($from = '-30 years', $until = 'now', string $tim return $this->setTimezone( $this->getTimestampDateTime($timestamp), - $timezone + $timezone, ); } diff --git a/src/Faker/Core/Uuid.php b/src/Faker/Core/Uuid.php index 7311e287f5..5e3b633a26 100644 --- a/src/Faker/Core/Uuid.php +++ b/src/Faker/Core/Uuid.php @@ -50,7 +50,7 @@ public function uuid3(): string $byte[12], $byte[13], $byte[14], - $byte[15] + $byte[15], ); } } diff --git a/src/Faker/Core/Version.php b/src/Faker/Core/Version.php index 66dcdfe83b..ce484e6ad8 100644 --- a/src/Faker/Core/Version.php +++ b/src/Faker/Core/Version.php @@ -26,7 +26,7 @@ public function semver(bool $preRelease = false, bool $build = false): string mt_rand(0, 99), mt_rand(0, 99), $preRelease && mt_rand(0, 1) ? '-' . $this->semverPreReleaseIdentifier() : '', - $build && mt_rand(0, 1) ? '+' . $this->semverBuildIdentifier() : '' + $build && mt_rand(0, 1) ? '+' . $this->semverBuildIdentifier() : '', ); } diff --git a/src/Faker/Generator.php b/src/Faker/Generator.php index e804f326be..3ae32cb6b8 100644 --- a/src/Faker/Generator.php +++ b/src/Faker/Generator.php @@ -584,7 +584,7 @@ public function ext(string $id): Extension\Extension if (!$this->container->has($id)) { throw new Extension\ExtensionNotFound(sprintf( 'No Faker extension with id "%s" was loaded.', - $id + $id, )); } @@ -893,7 +893,7 @@ public function randomFloat($nbMaxDecimals = null, $min = 0, $max = null): float return $this->ext(Extension\NumberExtension::class)->randomFloat( $nbMaxDecimals !== null ? (int) $nbMaxDecimals : null, (float) $min, - $max !== null ? (float) $max : null + $max !== null ? (float) $max : null, ); } @@ -911,7 +911,7 @@ public function randomNumber($nbDigits = null, $strict = false): int { return $this->ext(Extension\NumberExtension::class)->randomNumber( $nbDigits !== null ? (int) $nbDigits : null, - (bool) $strict + (bool) $strict, ); } diff --git a/src/Faker/ORM/Doctrine/EntityPopulator.php b/src/Faker/ORM/Doctrine/EntityPopulator.php index 92efbcce80..7364c7229e 100644 --- a/src/Faker/ORM/Doctrine/EntityPopulator.php +++ b/src/Faker/ORM/Doctrine/EntityPopulator.php @@ -205,7 +205,7 @@ private function fillColumns($obj, $insertedEntities): void 'Failed to generate a value for %s::%s: %s', get_class($obj), $field, - $ex->getMessage() + $ex->getMessage(), )); } // Try a standard setter if it's available, otherwise fall back on reflection diff --git a/src/Faker/ORM/Doctrine/Populator.php b/src/Faker/ORM/Doctrine/Populator.php index 40527ec059..bf946f7023 100644 --- a/src/Faker/ORM/Doctrine/Populator.php +++ b/src/Faker/ORM/Doctrine/Populator.php @@ -111,7 +111,7 @@ public function execute($entityManager = null) $insertedEntities[$class][] = $this->entities[$class]->execute( $entityManager, $insertedEntities, - $generateId + $generateId, ); if (count($insertedEntities) % $this->batchSize === 0) { diff --git a/src/Faker/ORM/Spot/Populator.php b/src/Faker/ORM/Spot/Populator.php index 1d13db54f6..8e36607d5b 100644 --- a/src/Faker/ORM/Spot/Populator.php +++ b/src/Faker/ORM/Spot/Populator.php @@ -79,7 +79,7 @@ public function execute($locator = null) foreach ($this->quantities as $entityName => $number) { for ($i = 0; $i < $number; ++$i) { $insertedEntities[$entityName][] = $this->entities[$entityName]->execute( - $insertedEntities + $insertedEntities, ); } } diff --git a/src/Faker/Provider/Color.php b/src/Faker/Provider/Color.php index 6446916dd2..d14e70551e 100644 --- a/src/Faker/Provider/Color.php +++ b/src/Faker/Provider/Color.php @@ -138,7 +138,7 @@ public static function hslColor() '%s,%s,%s', self::numberBetween(0, 360), self::numberBetween(0, 100), - self::numberBetween(0, 100) + self::numberBetween(0, 100), ); } diff --git a/src/Faker/Provider/DateTime.php b/src/Faker/Provider/DateTime.php index 00f4641aae..1d57ff45bd 100644 --- a/src/Faker/Provider/DateTime.php +++ b/src/Faker/Provider/DateTime.php @@ -57,7 +57,7 @@ public static function dateTime($max = 'now', $timezone = null) { return static::setTimezone( new \DateTime('@' . static::unixTime($max)), - $timezone + $timezone, ); } @@ -80,7 +80,7 @@ public static function dateTimeAD($max = 'now', $timezone = null) return static::setTimezone( new \DateTime('@' . self::numberBetween($min, static::getMaxTimestamp($max))), - $timezone + $timezone, ); } @@ -156,7 +156,7 @@ public static function dateTimeBetween($startDate = '-30 years', $endDate = 'now return static::setTimezone( new \DateTime('@' . $timestamp), - $timezone + $timezone, ); } @@ -189,7 +189,7 @@ public static function dateTimeInInterval($date = '-30 years', $interval = '+5 d return static::dateTimeBetween( $begin, $end, - $timezone + $timezone, ); } diff --git a/src/Faker/Provider/Image.php b/src/Faker/Provider/Image.php index 0c3ad68c13..53f28dfcfa 100644 --- a/src/Faker/Provider/Image.php +++ b/src/Faker/Provider/Image.php @@ -55,7 +55,7 @@ public static function imageUrl( trigger_deprecation( 'fakerphp/faker', '1.20', - 'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead' + 'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead', ); // Validate image format @@ -65,7 +65,7 @@ public static function imageUrl( throw new \InvalidArgumentException(sprintf( 'Invalid image format "%s". Allowable formats are: %s', $format, - implode(', ', $imageFormats) + implode(', ', $imageFormats), )); } @@ -92,7 +92,7 @@ public static function imageUrl( self::BASE_URL, $size, $backgroundColor, - count($imageParts) > 0 ? '?text=' . urlencode(implode(' ', $imageParts)) : '' + count($imageParts) > 0 ? '?text=' . urlencode(implode(' ', $imageParts)) : '', ); } @@ -119,7 +119,7 @@ public static function image( trigger_deprecation( 'fakerphp/faker', '1.20', - 'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead' + 'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead', ); $dir = null === $dir ? sys_get_temp_dir() : $dir; // GNU/Linux / OS X / Windows compatible @@ -172,7 +172,7 @@ public static function getFormats(): array trigger_deprecation( 'fakerphp/faker', '1.20', - 'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead' + 'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead', ); return array_keys(static::getFormatConstants()); @@ -183,7 +183,7 @@ public static function getFormatConstants(): array trigger_deprecation( 'fakerphp/faker', '1.20', - 'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead' + 'Provider is deprecated and will no longer be available in Faker 2. Please use a custom provider instead', ); return [ diff --git a/src/Faker/Provider/Uuid.php b/src/Faker/Provider/Uuid.php index 1cd15cab3f..bcfcb05d9a 100644 --- a/src/Faker/Provider/Uuid.php +++ b/src/Faker/Provider/Uuid.php @@ -53,7 +53,7 @@ public static function uuid() $byte[12], $byte[13], $byte[14], - $byte[15] + $byte[15], ); } } diff --git a/src/Faker/Provider/ar_SA/Person.php b/src/Faker/Provider/ar_SA/Person.php index c7bd16ec9a..505c8640c4 100644 --- a/src/Faker/Provider/ar_SA/Person.php +++ b/src/Faker/Provider/ar_SA/Person.php @@ -93,7 +93,7 @@ public static function prefix() public static function idNumber() { $partialValue = static::numerify( - static::randomElement([1, 2]) . str_repeat('#', 8) + static::randomElement([1, 2]) . str_repeat('#', 8), ); return Luhn::generateLuhnNumber($partialValue); diff --git a/src/Faker/Provider/bg_BG/Payment.php b/src/Faker/Provider/bg_BG/Payment.php index 9a772c8ac5..d7ed58b894 100644 --- a/src/Faker/Provider/bg_BG/Payment.php +++ b/src/Faker/Provider/bg_BG/Payment.php @@ -40,7 +40,7 @@ public static function vat($spacedNationalPrefix = true) '%s%d%d', $prefix, self::randomNumber(5, true), // workaround for mt_getrandmax() limitation - self::randomNumber(self::randomElement([4, 5]), true) + self::randomNumber(self::randomElement([4, 5]), true), ); } } diff --git a/src/Faker/Provider/de_DE/PhoneNumber.php b/src/Faker/Provider/de_DE/PhoneNumber.php index 5387d6d10e..610ae8e2ab 100644 --- a/src/Faker/Provider/de_DE/PhoneNumber.php +++ b/src/Faker/Provider/de_DE/PhoneNumber.php @@ -121,7 +121,7 @@ public static function mobileCode() public function mobileNumber() { return ltrim(static::numerify($this->generator->parse( - static::randomElement(static::$mobileFormats) + static::randomElement(static::$mobileFormats), ))); } } diff --git a/src/Faker/Provider/el_GR/PhoneNumber.php b/src/Faker/Provider/el_GR/PhoneNumber.php index 6fe5000ef7..5303248706 100644 --- a/src/Faker/Provider/el_GR/PhoneNumber.php +++ b/src/Faker/Provider/el_GR/PhoneNumber.php @@ -158,7 +158,7 @@ public static function internationalCodePrefix() public static function areaCode() { return static::numerify( - str_pad(static::randomElement(static::$areaCodes), 4, '#') + str_pad(static::randomElement(static::$areaCodes), 4, '#'), ); } @@ -182,7 +182,7 @@ public static function areaCode() public function fixedLineNumber() { return ltrim(static::numerify($this->generator->parse( - static::randomElement(static::$fixedLineFormats) + static::randomElement(static::$fixedLineFormats), ))); } @@ -211,7 +211,7 @@ public static function mobileCode() public function mobileNumber() { return ltrim(static::numerify($this->generator->parse( - static::randomElement(static::$mobileFormats) + static::randomElement(static::$mobileFormats), ))); } @@ -224,7 +224,7 @@ public static function mobilePhoneNumber() strtr(static::randomElement(static::$mobileFormats), [ '{{internationalCodePrefix}}' => static::internationalCodePrefix(), '{{mobileCode}}' => static::mobileCode(), - ]) + ]), ); } @@ -241,7 +241,7 @@ public static function mobilePhoneNumber() public function personalNumber() { return ltrim(static::numerify($this->generator->parse( - static::randomElement(static::$personalFormats) + static::randomElement(static::$personalFormats), ))); } @@ -260,7 +260,7 @@ public static function tollFreeNumber() return ltrim(static::numerify( strtr(static::randomElement(static::$tollFreeFormats), [ '{{internationalCodePrefix}}' => static::internationalCodePrefix(), - ]) + ]), )); } @@ -289,7 +289,7 @@ public static function sharedCostCode() public function sharedCostNumber() { return ltrim(static::numerify($this->generator->parse( - static::randomElement(static::$sharedCostFormats) + static::randomElement(static::$sharedCostFormats), ))); } @@ -318,7 +318,7 @@ public static function premiumRateCode() public function premiumRateNumber() { return ltrim(static::numerify($this->generator->parse( - static::randomElement(static::$premiumRateFormats) + static::randomElement(static::$premiumRateFormats), ))); } } diff --git a/src/Faker/Provider/en_GB/Company.php b/src/Faker/Provider/en_GB/Company.php index acf56e5bdd..17fe07da0b 100644 --- a/src/Faker/Provider/en_GB/Company.php +++ b/src/Faker/Provider/en_GB/Company.php @@ -53,7 +53,7 @@ private static function generateStandardVatNumber(): string static::VAT_PREFIX, $firstBlock, $secondBlock, - static::calculateModulus97($firstBlock . $secondBlock) + static::calculateModulus97($firstBlock . $secondBlock), ); } @@ -66,7 +66,7 @@ private static function generateHealthAuthorityVatNumber(): string return sprintf( '%sHA%d', static::VAT_PREFIX, - static::numberBetween(500, 999) + static::numberBetween(500, 999), ); } @@ -79,7 +79,7 @@ private static function generateBranchTraderVatNumber(): string return sprintf( '%s %d', static::generateStandardVatNumber(), - static::randomNumber(3, true) + static::randomNumber(3, true), ); } @@ -92,7 +92,7 @@ private static function generateGovernmentVatNumber(): string return sprintf( '%sGD%s', static::VAT_PREFIX, - str_pad((string) static::numberBetween(0, 499), 3, '0', STR_PAD_LEFT) + str_pad((string) static::numberBetween(0, 499), 3, '0', STR_PAD_LEFT), ); } diff --git a/src/Faker/Provider/en_ZA/Company.php b/src/Faker/Provider/en_ZA/Company.php index 86a54321ad..6480c696f8 100644 --- a/src/Faker/Provider/en_ZA/Company.php +++ b/src/Faker/Provider/en_ZA/Company.php @@ -20,7 +20,7 @@ public function companyNumber() '%s/%s/%s', \Faker\Provider\DateTime::dateTimeBetween('-50 years', 'now')->format('Y'), static::randomNumber(6, true), - static::randomElement(static::$legalEntities) + static::randomElement(static::$legalEntities), ); } } diff --git a/test/Faker/Core/UuidTest.php b/test/Faker/Core/UuidTest.php index 0d2666063d..a0bedce026 100644 --- a/test/Faker/Core/UuidTest.php +++ b/test/Faker/Core/UuidTest.php @@ -30,7 +30,7 @@ protected function isUuid(string $uuid) { return is_string($uuid) && (bool) preg_match( '/^[a-f0-9]{8,8}-(?:[a-f0-9]{4,4}-){3,3}[a-f0-9]{12,12}$/i', - $uuid + $uuid, ); } } diff --git a/test/Faker/Extension/ContainerBuilderTest.php b/test/Faker/Extension/ContainerBuilderTest.php index bdfc1937ed..6f4bfc0c3a 100644 --- a/test/Faker/Extension/ContainerBuilderTest.php +++ b/test/Faker/Extension/ContainerBuilderTest.php @@ -27,7 +27,7 @@ public function testAddRejectsInvalidValue($value): void $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage(sprintf( 'First argument to "%s::add()" must be a string, callable or object.', - ContainerBuilder::class + ContainerBuilder::class, )); $containerBuilder->add($value); @@ -77,7 +77,7 @@ public static function create(): Extension $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::class, )); $containerBuilder->add($value); diff --git a/test/Faker/Extension/ContainerTest.php b/test/Faker/Extension/ContainerTest.php index 069fa2b55a..f1158d4aef 100644 --- a/test/Faker/Extension/ContainerTest.php +++ b/test/Faker/Extension/ContainerTest.php @@ -58,7 +58,7 @@ public function testGetThrowsRuntimeExceptionWhenServiceResolvedForIdentifierIsN $this->expectExceptionMessage(sprintf( 'Service resolved for identifier "%s" does not implement the %s" interface.', $id, - Extension::class + Extension::class, )); $container->get($id); diff --git a/test/Faker/GeneratorTest.php b/test/Faker/GeneratorTest.php index 2036b7cf5b..644a734819 100644 --- a/test/Faker/GeneratorTest.php +++ b/test/Faker/GeneratorTest.php @@ -312,7 +312,7 @@ public function word(): string $uniqueGenerator = $generator->unique( false, - $maxRetries + $maxRetries, ); $uniqueGenerator->word(); @@ -320,7 +320,7 @@ public function word(): string $this->expectException(\OverflowException::class); $this->expectExceptionMessage(sprintf( 'Maximum retries of %d reached without finding a unique value', - $maxRetries + $maxRetries, )); $uniqueGenerator->word(); diff --git a/test/Faker/Provider/BaseTest.php b/test/Faker/Provider/BaseTest.php index fba14868c7..0cf06b768d 100644 --- a/test/Faker/Provider/BaseTest.php +++ b/test/Faker/Provider/BaseTest.php @@ -426,7 +426,7 @@ public function testOptionalPercentageAndWeight(): void self::assertEquals( round(array_sum($valuesOld) / 10000, 2), - round(array_sum($valuesNew) / 10000, 2) + round(array_sum($valuesNew) / 10000, 2), ); } diff --git a/test/Faker/Provider/ImageTest.php b/test/Faker/Provider/ImageTest.php index 7530c83946..ff5e7f1c8a 100644 --- a/test/Faker/Provider/ImageTest.php +++ b/test/Faker/Provider/ImageTest.php @@ -14,7 +14,7 @@ public function testImageUrlUses640x680AsTheDefaultSize(): void { self::assertMatchesRegularExpression( '#^https://via.placeholder.com/640x480.png/#', - Image::imageUrl() + Image::imageUrl(), ); } @@ -22,7 +22,7 @@ public function testImageUrlAcceptsCustomWidthAndHeight(): void { self::assertMatchesRegularExpression( '#^https://via.placeholder.com/800x400.png/#', - Image::imageUrl(800, 400) + Image::imageUrl(800, 400), ); } @@ -30,7 +30,7 @@ public function testImageUrlAcceptsCustomCategory(): void { self::assertMatchesRegularExpression( '#^https://via.placeholder.com/800x400.png/[\w]{6}\?text=nature\+.*#', - Image::imageUrl(800, 400, 'nature') + Image::imageUrl(800, 400, 'nature'), ); } @@ -38,7 +38,7 @@ public function testImageUrlAcceptsCustomText(): void { self::assertMatchesRegularExpression( '#^https://via.placeholder.com/800x400.png/[\w]{6}\?text=nature\+Faker#', - Image::imageUrl(800, 400, 'nature', false, 'Faker') + Image::imageUrl(800, 400, 'nature', false, 'Faker'), ); } @@ -50,12 +50,12 @@ public function testImageUrlReturnsLinkToRegularImageWhenGrayIsFalse(): void 'nature', false, 'Faker', - false + false, ); self::assertMatchesRegularExpression( '#^https://via.placeholder.com/800x400.png/[\w]{6}\?text=nature\+Faker#', - $imageUrl + $imageUrl, ); } @@ -67,12 +67,12 @@ public function testImageUrlReturnsLinkToRegularImageWhenGrayIsTrue(): void 'nature', false, 'Faker', - true + true, ); self::assertMatchesRegularExpression( '#^https://via.placeholder.com/800x400.png/CCCCCC\?text=nature\+Faker#', - $imageUrl + $imageUrl, ); } @@ -95,7 +95,7 @@ public function testImageUrlThrowsExceptionOnInvalidImageFormat(): void false, 'Faker', true, - 'foo' + 'foo', ); } @@ -109,12 +109,12 @@ public function testImageUrlAcceptsDifferentImageFormats(): void false, 'Faker', true, - $format + $format, ); self::assertMatchesRegularExpression( "#^https://via.placeholder.com/800x400.{$format}/CCCCCC\?text=nature\+Faker#", - $imageUrl + $imageUrl, ); } } @@ -145,7 +145,7 @@ public function testDownloadWithDifferentImageFormats(): void false, 'Faker', true, - $format + $format, ); self::assertFileExists($file); diff --git a/test/Faker/Provider/el_GR/PhoneNumberTest.php b/test/Faker/Provider/el_GR/PhoneNumberTest.php index 2403fdd510..3854a63b20 100644 --- a/test/Faker/Provider/el_GR/PhoneNumberTest.php +++ b/test/Faker/Provider/el_GR/PhoneNumberTest.php @@ -16,7 +16,7 @@ public function testFixedLineNumber(): void self::assertNotSame(' ', $fixedLineNumber[0]); self::assertMatchesRegularExpression( '/^(\+30)?2(?:1\d\d|2(?:2[1-46-9]|[36][1-8]|4[1-7]|5[1-4]|7[1-5]|[89][1-9])|3(?:1\d|2[1-57]|[35][1-3]|4[13]|7[1-7]|8[124-6]|9[1-79])|4(?:1\d|2[1-8]|3[1-4]|4[13-5]|6[1-578]|9[1-5])|5(?:1\d|[29][1-4]|3[1-5]|4[124]|5[1-6])|6(?:1\d|[269][1-6]|3[1245]|4[1-7]|5[13-9]|7[14]|8[1-5])|7(?:1\d|2[1-5]|3[1-6]|4[1-7]|5[1-57]|6[135]|9[125-7])|8(?:1\d|2[1-5]|[34][1-4]|9[1-57]))\d{6}$/', - str_replace(' ', '', $fixedLineNumber) + str_replace(' ', '', $fixedLineNumber), ); } @@ -26,7 +26,7 @@ public function testMobileNumber(): void self::assertNotSame(' ', $mobileNumber[0]); self::assertMatchesRegularExpression( '/^(\+30)?68[57-9]\d{7}|(?:69|94)\d{8}$/', - str_replace(' ', '', $mobileNumber) + str_replace(' ', '', $mobileNumber), ); } @@ -36,7 +36,7 @@ public function testPersonalNumber(): void self::assertNotSame(' ', $personalNumber[0]); self::assertMatchesRegularExpression( '/^(\+30)?70\d{8}$/', - str_replace(' ', '', $personalNumber) + str_replace(' ', '', $personalNumber), ); } @@ -46,7 +46,7 @@ public function testTollFreeNumber(): void self::assertNotSame(' ', $tollFreeNumber[0]); self::assertMatchesRegularExpression( '/^(\+30)?800\d{7}$/', - str_replace(' ', '', $tollFreeNumber) + str_replace(' ', '', $tollFreeNumber), ); } @@ -56,7 +56,7 @@ public function testSharedCostNumber(): void self::assertNotSame(' ', $sharedCostNumber[0]); self::assertMatchesRegularExpression( '/^(\+30)?8(?:0[16]|12|[27]5|50)\d{7}$/', - str_replace(' ', '', $sharedCostNumber) + str_replace(' ', '', $sharedCostNumber), ); } @@ -66,7 +66,7 @@ public function testPremiumRateNumber(): void self::assertNotSame(' ', $premiumRateNumber[0]); self::assertMatchesRegularExpression( '/^(\+30)?90[19]\d{7}$/', - str_replace(' ', '', $premiumRateNumber) + str_replace(' ', '', $premiumRateNumber), ); } diff --git a/test/Faker/Provider/el_GR/TextTest.php b/test/Faker/Provider/el_GR/TextTest.php index 666912593e..041f9732c5 100644 --- a/test/Faker/Provider/el_GR/TextTest.php +++ b/test/Faker/Provider/el_GR/TextTest.php @@ -29,32 +29,32 @@ public function testItShouldAppendEndPunctToTheEndOfString(): void { self::assertSame( 'Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ ']), ); self::assertSame( 'Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ—']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ—']), ); self::assertSame( 'Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ,']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ,']), ); self::assertSame( 'Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ!.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ! ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ! ']), ); self::assertSame( 'Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ; ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ; ']), ); self::assertSame( 'Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ: ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Και δεν άκουσες το κλοπακλόπ, κλοπακλόπ, κλοπακλόπ: ']), ); } } diff --git a/test/Faker/Provider/en_NZ/PhoneNumberTest.php b/test/Faker/Provider/en_NZ/PhoneNumberTest.php index a65c24d9f4..2504fdd1a8 100644 --- a/test/Faker/Provider/en_NZ/PhoneNumberTest.php +++ b/test/Faker/Provider/en_NZ/PhoneNumberTest.php @@ -21,7 +21,7 @@ public function phoneNumberFormat(): void $number = $this->faker->phoneNumber; self::assertMatchesRegularExpression( '/(^\([0]\d{1}\))(\d{7}$)|(^\([0][2]\d{1}\))(\d{6,8}$)|([0][8][0][0])([\s])(\d{5,8}$)/', - $number + $number, ); } diff --git a/test/Faker/Provider/en_ZA/PhoneNumberTest.php b/test/Faker/Provider/en_ZA/PhoneNumberTest.php index 95561ebc12..541db76f82 100644 --- a/test/Faker/Provider/en_ZA/PhoneNumberTest.php +++ b/test/Faker/Provider/en_ZA/PhoneNumberTest.php @@ -55,7 +55,7 @@ public function testCellPhoneNumber(): void self::assertMatchesRegularExpression( '/^(\+27|27)?(\()?0?([6][0-4]|[7][1-9]|[8][1-9])(\))?( |-|\.|_)?(\d{3})( |-|\.|_)?(\d{4})/', - $number + $number, ); } } diff --git a/test/Faker/Provider/fr_FR/TextTest.php b/test/Faker/Provider/fr_FR/TextTest.php index 45b9c2a0ae..4eb128278e 100644 --- a/test/Faker/Provider/fr_FR/TextTest.php +++ b/test/Faker/Provider/fr_FR/TextTest.php @@ -29,32 +29,32 @@ public function testItShouldAppendEndPunctToTheEndOfString(): void { self::assertSame( 'Que faisaient-elles maintenant? À.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Que faisaient-elles maintenant? À ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Que faisaient-elles maintenant? À ']), ); self::assertSame( 'Que faisaient-elles maintenant? À.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Que faisaient-elles maintenant? À— ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Que faisaient-elles maintenant? À— ']), ); self::assertSame( 'Que faisaient-elles maintenant? À.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Que faisaient-elles maintenant? À,']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Que faisaient-elles maintenant? À,']), ); self::assertSame( 'Que faisaient-elles maintenant? À!.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Que faisaient-elles maintenant? À! ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Que faisaient-elles maintenant? À! ']), ); self::assertSame( 'Que faisaient-elles maintenant? À.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Que faisaient-elles maintenant? À: ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Que faisaient-elles maintenant? À: ']), ); self::assertSame( 'Que faisaient-elles maintenant? À.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Que faisaient-elles maintenant? À; ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Que faisaient-elles maintenant? À; ']), ); } } diff --git a/test/Faker/Provider/ka_GE/TextTest.php b/test/Faker/Provider/ka_GE/TextTest.php index 6da481f69f..2f8690461b 100644 --- a/test/Faker/Provider/ka_GE/TextTest.php +++ b/test/Faker/Provider/ka_GE/TextTest.php @@ -29,32 +29,32 @@ public function testItShouldAppendEndPunctToTheEndOfString(): void { self::assertSame( 'ჭეშმარიტია. ჩვენც ისე.', - $this->getMethod('appendEnd')->invokeArgs(null, ['ჭეშმარიტია. ჩვენც ისე ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['ჭეშმარიტია. ჩვენც ისე ']), ); self::assertSame( 'ჭეშმარიტია. ჩვენც ისე.', - $this->getMethod('appendEnd')->invokeArgs(null, ['ჭეშმარიტია. ჩვენც ისე— ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['ჭეშმარიტია. ჩვენც ისე— ']), ); self::assertSame( 'ჭეშმარიტია. ჩვენც ისე.', - $this->getMethod('appendEnd')->invokeArgs(null, ['ჭეშმარიტია. ჩვენც ისე, ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['ჭეშმარიტია. ჩვენც ისე, ']), ); self::assertSame( 'ჭეშმარიტია. ჩვენც ისე!.', - $this->getMethod('appendEnd')->invokeArgs(null, ['ჭეშმარიტია. ჩვენც ისე! ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['ჭეშმარიტია. ჩვენც ისე! ']), ); self::assertSame( 'ჭეშმარიტია. ჩვენც ისე.', - $this->getMethod('appendEnd')->invokeArgs(null, ['ჭეშმარიტია. ჩვენც ისე; ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['ჭეშმარიტია. ჩვენც ისე; ']), ); self::assertSame( 'ჭეშმარიტია. ჩვენც ისე.', - $this->getMethod('appendEnd')->invokeArgs(null, ['ჭეშმარიტია. ჩვენც ისე: ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['ჭეშმარიტია. ჩვენც ისე: ']), ); } } diff --git a/test/Faker/Provider/kk_KZ/CompanyTest.php b/test/Faker/Provider/kk_KZ/CompanyTest.php index ed06d8d88a..211305d456 100644 --- a/test/Faker/Provider/kk_KZ/CompanyTest.php +++ b/test/Faker/Provider/kk_KZ/CompanyTest.php @@ -18,7 +18,7 @@ public function testBusinessIdentificationNumberIsValid(): void self::assertMatchesRegularExpression( '/^(' . $registrationDateAsString . ')([4-6]{1})([0-3]{1})(\\d{6})$/', - $businessIdentificationNumber + $businessIdentificationNumber, ); } diff --git a/test/Faker/Provider/kk_KZ/TextTest.php b/test/Faker/Provider/kk_KZ/TextTest.php index 7c636ee10c..b5b9dab717 100644 --- a/test/Faker/Provider/kk_KZ/TextTest.php +++ b/test/Faker/Provider/kk_KZ/TextTest.php @@ -29,32 +29,32 @@ public function testItShouldAppendEndPunctToTheEndOfString(): void { self::assertSame( 'Арыстан баб кесенесі - көне Отырар.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Арыстан баб кесенесі - көне Отырар ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Арыстан баб кесенесі - көне Отырар ']), ); self::assertSame( 'Арыстан баб кесенесі - көне Отырар.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Арыстан баб кесенесі - көне Отырар— ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Арыстан баб кесенесі - көне Отырар— ']), ); self::assertSame( 'Арыстан баб кесенесі - көне Отырар.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Арыстан баб кесенесі - көне Отырар, ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Арыстан баб кесенесі - көне Отырар, ']), ); self::assertSame( 'Арыстан баб кесенесі - көне Отырар!.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Арыстан баб кесенесі - көне Отырар! ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Арыстан баб кесенесі - көне Отырар! ']), ); self::assertSame( 'Арыстан баб кесенесі - көне Отырар.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Арыстан баб кесенесі - көне Отырар: ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Арыстан баб кесенесі - көне Отырар: ']), ); self::assertSame( 'Арыстан баб кесенесі - көне Отырар.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Арыстан баб кесенесі - көне Отырар; ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Арыстан баб кесенесі - көне Отырар; ']), ); } } diff --git a/test/Faker/Provider/ko_KR/TextTest.php b/test/Faker/Provider/ko_KR/TextTest.php index 0130eb373a..61bfa2abec 100644 --- a/test/Faker/Provider/ko_KR/TextTest.php +++ b/test/Faker/Provider/ko_KR/TextTest.php @@ -29,32 +29,32 @@ public function testItShouldAppendEndPunctToTheEndOfString(): void { self::assertSame( '최석(崔晳)으로부터 최후의 편지가.', - $this->getMethod('appendEnd')->invokeArgs(null, ['최석(崔晳)으로부터 최후의 편지가 ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['최석(崔晳)으로부터 최후의 편지가 ']), ); self::assertSame( '최석(崔晳)으로부터 최후의 편지가.', - $this->getMethod('appendEnd')->invokeArgs(null, ['최석(崔晳)으로부터 최후의 편지가—']) + $this->getMethod('appendEnd')->invokeArgs(null, ['최석(崔晳)으로부터 최후의 편지가—']), ); self::assertSame( '최석(崔晳)으로부터 최후의 편지가.', - $this->getMethod('appendEnd')->invokeArgs(null, ['최석(崔晳)으로부터 최후의 편지가,']) + $this->getMethod('appendEnd')->invokeArgs(null, ['최석(崔晳)으로부터 최후의 편지가,']), ); self::assertSame( '최석(崔晳)으로부터 최후의 편지가!.', - $this->getMethod('appendEnd')->invokeArgs(null, ['최석(崔晳)으로부터 최후의 편지가! ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['최석(崔晳)으로부터 최후의 편지가! ']), ); self::assertSame( '최석(崔晳)으로부터 최후의 편지가.', - $this->getMethod('appendEnd')->invokeArgs(null, ['최석(崔晳)으로부터 최후의 편지가: ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['최석(崔晳)으로부터 최후의 편지가: ']), ); self::assertSame( '최석(崔晳)으로부터 최후의 편지가.', - $this->getMethod('appendEnd')->invokeArgs(null, ['최석(崔晳)으로부터 최후의 편지가; ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['최석(崔晳)으로부터 최후의 편지가; ']), ); } } diff --git a/test/Faker/Provider/pl_PL/LicensePlateTest.php b/test/Faker/Provider/pl_PL/LicensePlateTest.php index d0b5bf9464..8abe4d4c7a 100644 --- a/test/Faker/Provider/pl_PL/LicensePlateTest.php +++ b/test/Faker/Provider/pl_PL/LicensePlateTest.php @@ -29,7 +29,7 @@ public function testExplicitlyNonSpecialLicensePlates(): void { for ($i = 0; $i < 40; ++$i) { $licensePlate = $this->faker->licensePlate( - false + false, ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); @@ -44,7 +44,7 @@ public function testWithSpecialLicensePlates(): void { for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( - true + true, ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); @@ -60,7 +60,7 @@ public function testPodkarpackieLicensePlate(): void for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( false, - ['podkarpackie'] + ['podkarpackie'], ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); @@ -76,7 +76,7 @@ public function testLodzkieOrArmyLicensePlate(): void for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( true, - ['łódzkie', 'army'] + ['łódzkie', 'army'], ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); @@ -92,7 +92,7 @@ public function testLodzkieButNotArmyLicensePlate(): void for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( false, - ['łódzkie', 'army'] + ['łódzkie', 'army'], ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); @@ -108,7 +108,7 @@ public function testNoCorrectVoivodeshipLicensePlate(): void for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( true, - ['fake voivodeship', 'fake voivodeship2'] + ['fake voivodeship', 'fake voivodeship2'], ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); @@ -124,7 +124,7 @@ public function testNoVoivodeshipLicensePlate(): void for ($i = 0; $i < 5; ++$i) { $licensePlate = $this->faker->licensePlate( true, - [] + [], ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); @@ -141,7 +141,7 @@ public function testNoVoivodeshipNoCountyLicensePlate(): void $licensePlate = $this->faker->licensePlate( true, [], - [] + [], ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); @@ -158,7 +158,7 @@ public function testVoivodeshipCountyLicensePlate(): void $licensePlate = $this->faker->licensePlate( true, ['mazowieckie', 'services'], - ['Straż Graniczna', 'warszawski zachodni', 'radomski'] + ['Straż Graniczna', 'warszawski zachodni', 'radomski'], ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); @@ -175,7 +175,7 @@ public function testVoivodeshipFakeCountyLicensePlate(): void $licensePlate = $this->faker->licensePlate( true, ['mazowieckie', 'services'], - ['fake county'] + ['fake county'], ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); @@ -192,7 +192,7 @@ public function testVoivodeshipFakeVoivodeshipLicensePlate(): void $licensePlate = $this->faker->licensePlate( true, ['fake voivodeship'], - ['Straż Graniczna', 'warszawski zachodni', 'radomski'] + ['Straż Graniczna', 'warszawski zachodni', 'radomski'], ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); @@ -209,7 +209,7 @@ public function testVoivodeshipNullVoivodeshipArrayLicensePlate(): void $licensePlate = $this->faker->licensePlate( true, null, - ['Straż Graniczna', 'warszawski zachodni', 'radomski'] + ['Straż Graniczna', 'warszawski zachodni', 'radomski'], ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); @@ -226,7 +226,7 @@ public function testVoivodeshipNullVoivodeshipLicensePlate(): void $licensePlate = $this->faker->licensePlate( true, [null], - ['Straż Graniczna', 'warszawski zachodni', 'radomski'] + ['Straż Graniczna', 'warszawski zachodni', 'radomski'], ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); @@ -243,7 +243,7 @@ public function testVoivodeship1stArgumentFalse(): void $licensePlate = $this->faker->licensePlate( false, ['mazowieckie', 'services'], - null + null, ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); @@ -260,7 +260,7 @@ public function testVoivodeship1stArgumentTrue(): void $licensePlate = $this->faker->licensePlate( true, ['services'], - null + null, ); self::assertNotEmpty($licensePlate); self::assertIsString($licensePlate); diff --git a/test/Faker/Provider/pt_BR/TextTest.php b/test/Faker/Provider/pt_BR/TextTest.php index 1f15f91cfb..42fb91e422 100644 --- a/test/Faker/Provider/pt_BR/TextTest.php +++ b/test/Faker/Provider/pt_BR/TextTest.php @@ -29,32 +29,32 @@ public function testItShouldAppendEndPunctToTheEndOfString(): void { self::assertSame( 'Uma noite destas.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Uma noite destas, ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Uma noite destas, ']), ); self::assertSame( 'Uma noite destas.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Uma noite destas— ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Uma noite destas— ']), ); self::assertSame( 'Uma noite destas.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Uma noite destas,']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Uma noite destas,']), ); self::assertSame( 'Uma noite destas!.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Uma noite destas! ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Uma noite destas! ']), ); self::assertSame( 'Uma noite destas.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Uma noite destas: ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Uma noite destas: ']), ); self::assertSame( 'Uma noite destas.', - $this->getMethod('appendEnd')->invokeArgs(null, ['Uma noite destas; ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['Uma noite destas; ']), ); } } diff --git a/test/Faker/Provider/ro_RO/PersonTest.php b/test/Faker/Provider/ro_RO/PersonTest.php index 68c938d4cf..681b93a2d1 100644 --- a/test/Faker/Provider/ro_RO/PersonTest.php +++ b/test/Faker/Provider/ro_RO/PersonTest.php @@ -81,7 +81,7 @@ public function testAllRandomReturnsValidCnp(): void $cnp = $this->faker->cnp; self::assertTrue( $this->isValidCnp($cnp), - sprintf("Invalid CNP '%' generated", $cnp) + sprintf("Invalid CNP '%' generated", $cnp), ); } @@ -90,13 +90,13 @@ public function testValidGenderReturnsValidCnp(): void $cnp = $this->faker->cnp(Person::GENDER_MALE); self::assertTrue( $this->isValidMaleCnp($cnp), - sprintf("Invalid CNP '%' generated for '%s' gender", $cnp, Person::GENDER_MALE) + sprintf("Invalid CNP '%' generated for '%s' gender", $cnp, Person::GENDER_MALE), ); $cnp = $this->faker->cnp(Person::GENDER_FEMALE); self::assertTrue( $this->isValidFemaleCnp($cnp), - sprintf("Invalid CNP '%' generated for '%s' gender", $cnp, Person::GENDER_FEMALE) + sprintf("Invalid CNP '%' generated for '%s' gender", $cnp, Person::GENDER_FEMALE), ); } @@ -121,7 +121,7 @@ public function testValidYearReturnsValidCnp($value): void $cnp = $this->faker->cnp(null, $value); self::assertTrue( $this->isValidCnp($cnp), - sprintf("Invalid CNP '%' generated for valid year '%s'", $cnp, $value) + sprintf("Invalid CNP '%' generated for valid year '%s'", $cnp, $value), ); } @@ -146,7 +146,7 @@ public function testValidCountyCodeReturnsValidCnp($value): void $cnp = $this->faker->cnp(null, null, $value); self::assertTrue( $this->isValidCnp($cnp), - sprintf("Invalid CNP '%' generated for valid year '%s'", $cnp, $value) + sprintf("Invalid CNP '%' generated for valid year '%s'", $cnp, $value), ); } @@ -166,12 +166,12 @@ public function testNonResidentReturnsValidCnp(): void $cnp = $this->faker->cnp(null, null, null, false); self::assertTrue( $this->isValidCnp($cnp), - sprintf("Invalid CNP '%' generated for non resident", $cnp) + sprintf("Invalid CNP '%' generated for non resident", $cnp), ); self::assertStringStartsWith( '9', $cnp, - sprintf("Invalid CNP '%' generated for non resident (should start with 9)", $cnp) + sprintf("Invalid CNP '%' generated for non resident (should start with 9)", $cnp), ); } @@ -190,7 +190,7 @@ public function testValidInputDataReturnsValidCnp($gender, $dateOfBirth, $county self::assertStringStartsWith( $expectedCnpStart, $cnp, - sprintf("Invalid CNP '%' generated for non valid data", $cnp) + sprintf("Invalid CNP '%' generated for non valid data", $cnp), ); } diff --git a/test/Faker/Provider/ru_RU/CompanyTest.php b/test/Faker/Provider/ru_RU/CompanyTest.php index c9dc9f48c1..49bb74495e 100644 --- a/test/Faker/Provider/ru_RU/CompanyTest.php +++ b/test/Faker/Provider/ru_RU/CompanyTest.php @@ -32,7 +32,7 @@ public function testCatchPhrase(): void self::assertGreaterThanOrEqual( 3, count(explode(' ', $this->faker->catchPhrase)), - "'$phrase' - should be contain 3 word" + "'$phrase' - should be contain 3 word", ); } diff --git a/test/Faker/Provider/ru_RU/TextTest.php b/test/Faker/Provider/ru_RU/TextTest.php index 0c05422f72..4c661a3973 100644 --- a/test/Faker/Provider/ru_RU/TextTest.php +++ b/test/Faker/Provider/ru_RU/TextTest.php @@ -29,32 +29,32 @@ public function testItShouldAppendEndPunctToTheEndOfString(): void { self::assertSame( 'На другой день Чичиков отправился на обед и вечер.', - $this->getMethod('appendEnd')->invokeArgs(null, ['На другой день Чичиков отправился на обед и вечер ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['На другой день Чичиков отправился на обед и вечер ']), ); self::assertSame( 'На другой день Чичиков отправился на обед и вечер.', - $this->getMethod('appendEnd')->invokeArgs(null, ['На другой день Чичиков отправился на обед и вечер—']) + $this->getMethod('appendEnd')->invokeArgs(null, ['На другой день Чичиков отправился на обед и вечер—']), ); self::assertSame( 'На другой день Чичиков отправился на обед и вечер.', - $this->getMethod('appendEnd')->invokeArgs(null, ['На другой день Чичиков отправился на обед и вечер,']) + $this->getMethod('appendEnd')->invokeArgs(null, ['На другой день Чичиков отправился на обед и вечер,']), ); self::assertSame( 'На другой день Чичиков отправился на обед и вечер!.', - $this->getMethod('appendEnd')->invokeArgs(null, ['На другой день Чичиков отправился на обед и вечер! ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['На другой день Чичиков отправился на обед и вечер! ']), ); self::assertSame( 'На другой день Чичиков отправился на обед и вечер.', - $this->getMethod('appendEnd')->invokeArgs(null, ['На другой день Чичиков отправился на обед и вечер; ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['На другой день Чичиков отправился на обед и вечер; ']), ); self::assertSame( 'На другой день Чичиков отправился на обед и вечер.', - $this->getMethod('appendEnd')->invokeArgs(null, ['На другой день Чичиков отправился на обед и вечер: ']) + $this->getMethod('appendEnd')->invokeArgs(null, ['На другой день Чичиков отправился на обед и вечер: ']), ); } } diff --git a/test/Faker/Provider/uk_UA/AddressTest.php b/test/Faker/Provider/uk_UA/AddressTest.php index fb9e6d256e..146ac71aa7 100644 --- a/test/Faker/Provider/uk_UA/AddressTest.php +++ b/test/Faker/Provider/uk_UA/AddressTest.php @@ -31,7 +31,7 @@ public function testStreetCyrOnly(): void self::assertSame( preg_match($pattern, $streetName), 1, - 'Street name ' . $streetName . ' is wrong!' + 'Street name ' . $streetName . ' is wrong!', ); } @@ -42,7 +42,7 @@ public function testCityNameCyrOnly(): void self::assertSame( preg_match($pattern, $city), 1, - 'City name ' . $city . ' is wrong!' + 'City name ' . $city . ' is wrong!', ); } @@ -53,7 +53,7 @@ public function testRegionNameCyrOnly(): void self::assertSame( preg_match($pattern, $regionName), 1, - 'Region name ' . $regionName . ' is wrong!' + 'Region name ' . $regionName . ' is wrong!', ); } @@ -64,7 +64,7 @@ public function testCountryCyrOnly(): void self::assertSame( preg_match($pattern, $country), 1, - 'Country name ' . $country . ' is wrong!' + 'Country name ' . $country . ' is wrong!', ); } diff --git a/test/Faker/Provider/uk_UA/PhoneNumberTest.php b/test/Faker/Provider/uk_UA/PhoneNumberTest.php index 1bd22271c7..15e1dfac59 100644 --- a/test/Faker/Provider/uk_UA/PhoneNumberTest.php +++ b/test/Faker/Provider/uk_UA/PhoneNumberTest.php @@ -17,7 +17,7 @@ public function testPhoneNumberFormat(): void self::assertSame( preg_match($pattern, $phoneNumber), 1, - 'Phone number format ' . $phoneNumber . ' is wrong!' + 'Phone number format ' . $phoneNumber . ' is wrong!', ); } @@ -28,7 +28,7 @@ public function testE164PhoneNumberFormat(): void self::assertSame( preg_match($pattern, $phoneNumber), 1, - 'Phone number format ' . $phoneNumber . ' is wrong!' + 'Phone number format ' . $phoneNumber . ' is wrong!', ); } diff --git a/test/Faker/Provider/zh_TW/TextTest.php b/test/Faker/Provider/zh_TW/TextTest.php index e839c8cc97..53ef81cbd4 100644 --- a/test/Faker/Provider/zh_TW/TextTest.php +++ b/test/Faker/Provider/zh_TW/TextTest.php @@ -29,12 +29,12 @@ public function testItShouldExplodeTheStringToArray(): void { self::assertSame( ['中', '文', '測', '試', '真', '有', '趣'], - $this->getMethod('explode')->invokeArgs(null, ['中文測試真有趣']) + $this->getMethod('explode')->invokeArgs(null, ['中文測試真有趣']), ); self::assertSame( ['標', '點', ',', '符', '號', '!'], - $this->getMethod('explode')->invokeArgs(null, ['標點,符號!']) + $this->getMethod('explode')->invokeArgs(null, ['標點,符號!']), ); } @@ -42,7 +42,7 @@ public function testItShouldReturnTheStringLength(): void { self::assertContains( $this->getMethod('strlen')->invokeArgs(null, ['中文測試真有趣']), - [7, 21] + [7, 21], ); } @@ -63,17 +63,17 @@ public function testItShouldAppendEndPunctToTheEndOfString(): void { self::assertSame( '中文測試真有趣。', - $this->getMethod('appendEnd')->invokeArgs(null, ['中文測試真有趣']) + $this->getMethod('appendEnd')->invokeArgs(null, ['中文測試真有趣']), ); self::assertSame( '中文測試真有趣。', - $this->getMethod('appendEnd')->invokeArgs(null, ['中文測試真有趣,']) + $this->getMethod('appendEnd')->invokeArgs(null, ['中文測試真有趣,']), ); self::assertSame( '中文測試真有趣!', - $this->getMethod('appendEnd')->invokeArgs(null, ['中文測試真有趣!']) + $this->getMethod('appendEnd')->invokeArgs(null, ['中文測試真有趣!']), ); } } From 7e2cd057025ac14f05f9fad9721e5409d708a580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 7 Dec 2022 18:59:14 +0100 Subject: [PATCH 20/22] Fix: Command for generating the baseline for vimeo/psalm (#559) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f9f5d44b91..344effaec7 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ static: vendor ## Runs static analyzers .PHONY: baseline baseline: vendor ## Generate baseline files vendor/bin/phpstan --generate-baseline - vendor/bin/psalm --update-baseline + vendor/bin/psalm --set-baseline=psalm.baseline.xml .PHONY: clean clean: ## Cleans up build and vendor files From 5fbf8d25deec1b10de1d58f61458572a971db251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 7 Dec 2022 19:52:49 +0100 Subject: [PATCH 21/22] Fix: Use Xdebug instead of pcov for collecting code coverage (#561) --- .github/workflows/code-coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index ede5bbdadf..bd2f4d24cd 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -25,7 +25,7 @@ jobs: - name: "Install PHP with extensions" uses: "shivammathur/setup-php@v2" with: - coverage: "pcov" + coverage: "xdebug" extensions: "intl" php-version: "${{ matrix.php-version }}" From 3e36dc50af55bc48f8e5828926183c7c51d6da89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 7 Dec 2022 19:53:13 +0100 Subject: [PATCH 22/22] Enhancement: Update `phpstan/phpstan` (#556) * Enhancement: Update phpstan/phpstan * Fix: Run 'make baseline' --- phpstan-baseline.neon | 226 +++++++++++++++++++++++++------ vendor-bin/phpstan/composer.json | 6 +- vendor-bin/phpstan/composer.lock | 69 +++++----- 3 files changed, 221 insertions(+), 80 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index fd3a5acbca..c7d09ed526 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -5,6 +5,21 @@ parameters: count: 1 path: src/Faker/Calculator/Iban.php + - + message: "#^Parameter \\#2 \\$callback of function preg_replace_callback expects callable\\(array\\\\)\\: string, array\\{'self', 'alphaToNumberCallba…'\\} given\\.$#" + count: 1 + path: src/Faker/Calculator/Iban.php + + - + message: "#^Static method Faker\\\\Calculator\\\\Iban\\:\\:alphaToNumberCallback\\(\\) is unused\\.$#" + count: 1 + path: src/Faker/Calculator/Iban.php + + - + message: "#^Binary operation \"\\*\" between int and string results in an error\\.$#" + count: 1 + path: src/Faker/Calculator/Isbn.php + - message: "#^Binary operation \"\\*\" between string and 2 results in an error\\.$#" count: 1 @@ -65,16 +80,6 @@ parameters: count: 1 path: src/Faker/ORM/CakePHP/Populator.php - - - message: "#^Access to an undefined property Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadata\\:\\:\\$fieldMappings\\.$#" - count: 2 - path: src/Faker/ORM/Doctrine/ColumnTypeGuesser.php - - - - message: "#^Access to an undefined property Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadata\\:\\:\\$fieldMappings\\.$#" - count: 1 - path: src/Faker/ORM/Doctrine/EntityPopulator.php - - message: "#^Access to an undefined property Doctrine\\\\Persistence\\\\Mapping\\\\ClassMetadata\\:\\:\\$reflFields\\.$#" count: 2 @@ -141,17 +146,17 @@ parameters: path: src/Faker/ORM/Mandango/EntityPopulator.php - - message: "#^Parameter \\$mandango of method Faker\\\\ORM\\\\Mandango\\\\EntityPopulator\\:\\:execute\\(\\) has invalid typehint type Mandango\\\\Mandango\\.$#" + message: "#^Parameter \\$mandango of method Faker\\\\ORM\\\\Mandango\\\\EntityPopulator\\:\\:execute\\(\\) has invalid type Mandango\\\\Mandango\\.$#" count: 1 path: src/Faker/ORM/Mandango/EntityPopulator.php - - message: "#^Parameter \\$mandango of method Faker\\\\ORM\\\\Mandango\\\\EntityPopulator\\:\\:guessColumnFormatters\\(\\) has invalid typehint type Mandango\\\\Mandango\\.$#" + message: "#^Parameter \\$mandango of method Faker\\\\ORM\\\\Mandango\\\\EntityPopulator\\:\\:guessColumnFormatters\\(\\) has invalid type Mandango\\\\Mandango\\.$#" count: 1 path: src/Faker/ORM/Mandango/EntityPopulator.php - - message: "#^Parameter \\$mandango of method Faker\\\\ORM\\\\Mandango\\\\Populator\\:\\:__construct\\(\\) has invalid typehint type Mandango\\\\Mandango\\.$#" + message: "#^Parameter \\$mandango of method Faker\\\\ORM\\\\Mandango\\\\Populator\\:\\:__construct\\(\\) has invalid type Mandango\\\\Mandango\\.$#" count: 1 path: src/Faker/ORM/Mandango/Populator.php @@ -296,7 +301,7 @@ parameters: path: src/Faker/ORM/Propel/ColumnTypeGuesser.php - - message: "#^Parameter \\$column of method Faker\\\\ORM\\\\Propel\\\\ColumnTypeGuesser\\:\\:guessFormat\\(\\) has invalid typehint type ColumnMap\\.$#" + message: "#^Parameter \\$column of method Faker\\\\ORM\\\\Propel\\\\ColumnTypeGuesser\\:\\:guessFormat\\(\\) has invalid type ColumnMap\\.$#" count: 1 path: src/Faker/ORM/Propel/ColumnTypeGuesser.php @@ -311,7 +316,7 @@ parameters: path: src/Faker/ORM/Propel/EntityPopulator.php - - message: "#^Parameter \\$columnMap of method Faker\\\\ORM\\\\Propel\\\\EntityPopulator\\:\\:isColumnBehavior\\(\\) has invalid typehint type ColumnMap\\.$#" + message: "#^Parameter \\$columnMap of method Faker\\\\ORM\\\\Propel\\\\EntityPopulator\\:\\:isColumnBehavior\\(\\) has invalid type ColumnMap\\.$#" count: 1 path: src/Faker/ORM/Propel/EntityPopulator.php @@ -341,7 +346,7 @@ parameters: path: src/Faker/ORM/Propel/Populator.php - - message: "#^Parameter \\$con of method Faker\\\\ORM\\\\Propel\\\\Populator\\:\\:execute\\(\\) has invalid typehint type Faker\\\\ORM\\\\Propel\\\\PropelPDO\\.$#" + message: "#^Parameter \\$con of method Faker\\\\ORM\\\\Propel\\\\Populator\\:\\:execute\\(\\) has invalid type Faker\\\\ORM\\\\Propel\\\\PropelPDO\\.$#" count: 1 path: src/Faker/ORM/Propel/Populator.php @@ -491,7 +496,7 @@ parameters: path: src/Faker/ORM/Propel2/ColumnTypeGuesser.php - - message: "#^Parameter \\$column of method Faker\\\\ORM\\\\Propel2\\\\ColumnTypeGuesser\\:\\:guessFormat\\(\\) has invalid typehint type Propel\\\\Runtime\\\\Map\\\\ColumnMap\\.$#" + message: "#^Parameter \\$column of method Faker\\\\ORM\\\\Propel2\\\\ColumnTypeGuesser\\:\\:guessFormat\\(\\) has invalid type Propel\\\\Runtime\\\\Map\\\\ColumnMap\\.$#" count: 1 path: src/Faker/ORM/Propel2/ColumnTypeGuesser.php @@ -506,7 +511,7 @@ parameters: path: src/Faker/ORM/Propel2/EntityPopulator.php - - message: "#^Parameter \\$columnMap of method Faker\\\\ORM\\\\Propel2\\\\EntityPopulator\\:\\:isColumnBehavior\\(\\) has invalid typehint type Propel\\\\Runtime\\\\Map\\\\ColumnMap\\.$#" + message: "#^Parameter \\$columnMap of method Faker\\\\ORM\\\\Propel2\\\\EntityPopulator\\:\\:isColumnBehavior\\(\\) has invalid type Propel\\\\Runtime\\\\Map\\\\ColumnMap\\.$#" count: 1 path: src/Faker/ORM/Propel2/EntityPopulator.php @@ -536,7 +541,7 @@ parameters: path: src/Faker/ORM/Propel2/Populator.php - - message: "#^Parameter \\$con of method Faker\\\\ORM\\\\Propel2\\\\Populator\\:\\:execute\\(\\) has invalid typehint type Faker\\\\ORM\\\\Propel2\\\\PropelPDO\\.$#" + message: "#^Parameter \\$con of method Faker\\\\ORM\\\\Propel2\\\\Populator\\:\\:execute\\(\\) has invalid type Faker\\\\ORM\\\\Propel2\\\\PropelPDO\\.$#" count: 1 path: src/Faker/ORM/Propel2/Populator.php @@ -586,12 +591,12 @@ parameters: path: src/Faker/ORM/Spot/EntityPopulator.php - - message: "#^Parameter \\$locator of method Faker\\\\ORM\\\\Spot\\\\EntityPopulator\\:\\:__construct\\(\\) has invalid typehint type Spot\\\\Locator\\.$#" + message: "#^Parameter \\$locator of method Faker\\\\ORM\\\\Spot\\\\EntityPopulator\\:\\:__construct\\(\\) has invalid type Spot\\\\Locator\\.$#" count: 1 path: src/Faker/ORM/Spot/EntityPopulator.php - - message: "#^Parameter \\$mapper of method Faker\\\\ORM\\\\Spot\\\\EntityPopulator\\:\\:__construct\\(\\) has invalid typehint type Spot\\\\Mapper\\.$#" + message: "#^Parameter \\$mapper of method Faker\\\\ORM\\\\Spot\\\\EntityPopulator\\:\\:__construct\\(\\) has invalid type Spot\\\\Mapper\\.$#" count: 1 path: src/Faker/ORM/Spot/EntityPopulator.php @@ -606,12 +611,12 @@ parameters: path: src/Faker/ORM/Spot/EntityPopulator.php - - message: "#^Parameter \\$locator of method Faker\\\\ORM\\\\Spot\\\\Populator\\:\\:__construct\\(\\) has invalid typehint type Spot\\\\Locator\\.$#" + message: "#^Parameter \\$locator of method Faker\\\\ORM\\\\Spot\\\\Populator\\:\\:__construct\\(\\) has invalid type Spot\\\\Locator\\.$#" count: 1 path: src/Faker/ORM/Spot/Populator.php - - message: "#^Parameter \\$locator of method Faker\\\\ORM\\\\Spot\\\\Populator\\:\\:execute\\(\\) has invalid typehint type Spot\\\\Locator\\.$#" + message: "#^Parameter \\$locator of method Faker\\\\ORM\\\\Spot\\\\Populator\\:\\:execute\\(\\) has invalid type Spot\\\\Locator\\.$#" count: 1 path: src/Faker/ORM/Spot/Populator.php @@ -621,11 +626,10 @@ parameters: path: src/Faker/Provider/Base.php - - message: - """ - #^Instantiation of deprecated class Faker\\\\DefaultGenerator\\: - Use ChanceGenerator instead$# - """ + message: """ + #^Instantiation of deprecated class Faker\\\\DefaultGenerator\\: + Use ChanceGenerator instead$# + """ count: 1 path: src/Faker/Provider/Base.php @@ -640,7 +644,7 @@ parameters: path: src/Faker/Provider/Base.php - - message: "#^Parameter \\$validator of method Faker\\\\Provider\\\\Base\\:\\:valid\\(\\) has invalid typehint type Faker\\\\Provider\\\\Closure\\.$#" + message: "#^Parameter \\$validator of method Faker\\\\Provider\\\\Base\\:\\:valid\\(\\) has invalid type Faker\\\\Provider\\\\Closure\\.$#" count: 1 path: src/Faker/Provider/Base.php @@ -659,6 +663,21 @@ parameters: count: 1 path: src/Faker/Provider/Base.php + - + message: "#^Method Faker\\\\Provider\\\\DateTime\\:\\:resolveTimezone\\(\\) never returns null so it can be removed from the return type\\.$#" + count: 1 + path: src/Faker/Provider/DateTime.php + + - + message: "#^Unsafe call to private method Faker\\\\Provider\\\\DateTime\\:\\:resolveTimezone\\(\\) through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/DateTime.php + + - + message: "#^Unsafe call to private method Faker\\\\Provider\\\\DateTime\\:\\:setTimezone\\(\\) through static\\:\\:\\.$#" + count: 3 + path: src/Faker/Provider/DateTime.php + - message: "#^Method Faker\\\\Provider\\\\File\\:\\:file\\(\\) should return string but returns false\\.$#" count: 1 @@ -684,11 +703,31 @@ parameters: count: 1 path: src/Faker/Provider/PhoneNumber.php + - + message: "#^Unsafe access to private property Faker\\\\Provider\\\\ar_EG\\\\Person\\:\\:\\$prefix through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/ar_EG/Person.php + + - + message: "#^Unsafe access to private property Faker\\\\Provider\\\\ar_JO\\\\Person\\:\\:\\$prefix through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/ar_JO/Person.php + - message: "#^Access to an undefined static property static\\(Faker\\\\Provider\\\\ar_SA\\\\Address\\)\\:\\:\\$cityPrefix\\.$#" count: 1 path: src/Faker/Provider/ar_SA/Address.php + - + message: "#^Unsafe access to private property Faker\\\\Provider\\\\ar_SA\\\\Person\\:\\:\\$prefix through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/ar_SA/Person.php + + - + message: "#^Unsafe access to private property Faker\\\\Provider\\\\cs_CZ\\\\Address\\:\\:\\$regions through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/cs_CZ/Address.php + - message: "#^Binary operation \"\\*\" between 2\\|3\\|4\\|5\\|6\\|7\\|8 and string results in an error\\.$#" count: 1 @@ -704,6 +743,36 @@ parameters: count: 2 path: src/Faker/Provider/cs_CZ/Person.php + - + message: "#^Unsafe call to private method Faker\\\\Provider\\\\en_GB\\\\Company\\:\\:generateBranchTraderVatNumber\\(\\) through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/en_GB/Company.php + + - + message: "#^Unsafe call to private method Faker\\\\Provider\\\\en_GB\\\\Company\\:\\:generateGovernmentVatNumber\\(\\) through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/en_GB/Company.php + + - + message: "#^Unsafe call to private method Faker\\\\Provider\\\\en_GB\\\\Company\\:\\:generateHealthAuthorityVatNumber\\(\\) through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/en_GB/Company.php + + - + message: "#^Unsafe call to private method Faker\\\\Provider\\\\en_GB\\\\Company\\:\\:generateStandardVatNumber\\(\\) through static\\:\\:\\.$#" + count: 2 + path: src/Faker/Provider/en_GB/Company.php + + - + message: "#^Unsafe access to private property Faker\\\\Provider\\\\en_NG\\\\Address\\:\\:\\$county through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/en_NG/Address.php + + - + message: "#^Unsafe access to private property Faker\\\\Provider\\\\en_NG\\\\Address\\:\\:\\$regions through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/en_NG/Address.php + - message: "#^Parameter \\#1 \\$input of function str_pad expects string, int given\\.$#" count: 1 @@ -715,22 +784,62 @@ parameters: path: src/Faker/Provider/en_ZA/Person.php - - message: "#^Binary operation \"\\*\" between string and int\\<2, max\\> results in an error\\.$#" + message: "#^Unsafe access to private property Faker\\\\Provider\\\\es_AR\\\\Person\\:\\:\\$suffix through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/es_AR/Person.php + + - + message: "#^Unsafe access to private property Faker\\\\Provider\\\\es_ES\\\\Person\\:\\:\\$suffix through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/es_ES/Person.php + + - + message: "#^Unsafe access to private property Faker\\\\Provider\\\\es_VE\\\\Person\\:\\:\\$nationalityId through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/es_VE/Person.php + + - + message: "#^Unsafe access to private property Faker\\\\Provider\\\\es_VE\\\\Person\\:\\:\\$suffix through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/es_VE/Person.php + + - + message: "#^Binary operation \"\\*\" between string and int\\<2, 10\\> results in an error\\.$#" count: 1 path: src/Faker/Provider/fa_IR/Person.php - - message: "#^Method Faker\\\\Provider\\\\fa_IR\\\\Person\\:\\:createAreaCode\\(\\) never returns int so it can be removed from the return typehint\\.$#" + message: "#^Method Faker\\\\Provider\\\\fa_IR\\\\Person\\:\\:createAreaCode\\(\\) never returns int so it can be removed from the return type\\.$#" count: 1 path: src/Faker/Provider/fa_IR/Person.php - - message: "#^Return typehint of method Faker\\\\Provider\\\\hu_HU\\\\Address\\:\\:localCoordinates\\(\\) has invalid type Faker\\\\Provider\\\\hu_HU\\\\latitude\\.$#" + message: "#^Unsafe access to private property Faker\\\\Provider\\\\fr_FR\\\\Address\\:\\:\\$departments through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/fr_FR/Address.php + + - + message: "#^Unsafe access to private property Faker\\\\Provider\\\\fr_FR\\\\Address\\:\\:\\$regions through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/fr_FR/Address.php + + - + message: "#^Method Faker\\\\Provider\\\\hu_HU\\\\Address\\:\\:localCoordinates\\(\\) has invalid return type Faker\\\\Provider\\\\hu_HU\\\\latitude\\.$#" count: 1 path: src/Faker/Provider/hu_HU/Address.php - - message: "#^Binary operation \"\\+\" between string and 40 results in an error\\.$#" + message: "#^Unsafe access to private property Faker\\\\Provider\\\\hu_HU\\\\Person\\:\\:\\$suffix through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/hu_HU/Person.php + + - + message: "#^Unsafe access to private property Faker\\\\Provider\\\\hy_AM\\\\Person\\:\\:\\$suffix through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/hy_AM/Person.php + + - + message: "#^Unsafe access to private property Faker\\\\Provider\\\\id_ID\\\\Person\\:\\:\\$suffix through static\\:\\:\\.$#" count: 1 path: src/Faker/Provider/id_ID/Person.php @@ -739,20 +848,35 @@ parameters: count: 1 path: src/Faker/Provider/is_IS/Person.php + - + message: "#^Unsafe access to private property Faker\\\\Provider\\\\it_IT\\\\Person\\:\\:\\$suffix through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/it_IT/Person.php + - message: "#^Call to an undefined static method static\\(Faker\\\\Provider\\\\ja_JP\\\\Text\\)\\:\\:split\\(\\)\\.$#" count: 1 path: src/Faker/Provider/ja_JP/Text.php - - message: "#^Variable \\$companyName might not be defined\\.$#" - count: 2 - path: src/Faker/Provider/nl_NL/Company.php + message: "#^Unsafe access to private property Faker\\\\Provider\\\\lt_LT\\\\Address\\:\\:\\$municipality through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/lt_LT/Address.php - - message: "#^Binary operation \"\\+\" between string and int\\<\\-80, 80\\> results in an error\\.$#" + message: "#^Unsafe access to private property Faker\\\\Provider\\\\ne_NP\\\\Person\\:\\:\\$middleNameFemale through static\\:\\:\\.$#" count: 1 - path: src/Faker/Provider/pl_PL/Person.php + path: src/Faker/Provider/ne_NP/Person.php + + - + message: "#^Unsafe access to private property Faker\\\\Provider\\\\ne_NP\\\\Person\\:\\:\\$middleNameMale through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/ne_NP/Person.php + + - + message: "#^Variable \\$companyName might not be defined\\.$#" + count: 2 + path: src/Faker/Provider/nl_NL/Company.php - message: "#^Call to method format\\(\\) on an unknown class Faker\\\\Provider\\\\pl_PL\\\\DateTime\\.$#" @@ -760,17 +884,27 @@ parameters: path: src/Faker/Provider/pl_PL/Person.php - - message: "#^Parameter \\$birthdate of method Faker\\\\Provider\\\\pl_PL\\\\Person\\:\\:pesel\\(\\) has invalid typehint type Faker\\\\Provider\\\\pl_PL\\\\DateTime\\.$#" + message: "#^Parameter \\$birthdate of method Faker\\\\Provider\\\\pl_PL\\\\Person\\:\\:pesel\\(\\) has invalid type Faker\\\\Provider\\\\pl_PL\\\\DateTime\\.$#" count: 1 path: src/Faker/Provider/pl_PL/Person.php - - message: "#^Binary operation \"\\*\" between string and int results in an error\\.$#" + message: "#^Binary operation \"\\*\" between string and int\\<2, max\\> results in an error\\.$#" count: 1 path: src/Faker/Provider/pt_BR/check_digit.php - - message: "#^Binary operation \"\\*\" between string and int results in an error\\.$#" + message: "#^Unsafe access to private property Faker\\\\Provider\\\\pt_PT\\\\Address\\:\\:\\$cities through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/pt_PT/Address.php + + - + message: "#^Left side of \\|\\| is always true\\.$#" + count: 1 + path: src/Faker/Provider/pt_PT/Person.php + + - + message: "#^Right side of \\|\\| is always false\\.$#" count: 1 path: src/Faker/Provider/pt_PT/Person.php @@ -784,11 +918,21 @@ parameters: count: 1 path: src/Faker/Provider/ru_RU/Company.php + - + message: "#^Unsafe access to private property Faker\\\\Provider\\\\sk_SK\\\\Person\\:\\:\\$suffix through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/sk_SK/Person.php + - message: "#^Static call to instance method Faker\\\\Provider\\\\sl_SI\\\\Person\\:\\:lastName\\(\\)\\.$#" count: 2 path: src/Faker/Provider/sl_SI/Person.php + - + message: "#^Unsafe access to private property Faker\\\\Provider\\\\sv_SE\\\\Municipality\\:\\:\\$municipalities through static\\:\\:\\.$#" + count: 1 + path: src/Faker/Provider/sv_SE/Municipality.php + - message: "#^Parameter \\#1 \\$input of function str_pad expects string, int given\\.$#" count: 1 diff --git a/vendor-bin/phpstan/composer.json b/vendor-bin/phpstan/composer.json index 79431630dd..eb5383db74 100644 --- a/vendor-bin/phpstan/composer.json +++ b/vendor-bin/phpstan/composer.json @@ -1,9 +1,9 @@ { "require": { "php": "^7.4 || ^8.0", - "phpstan/extension-installer": "^1.1.0", - "phpstan/phpstan": "^0.12.100", - "phpstan/phpstan-deprecation-rules": "^0.12.6" + "phpstan/extension-installer": "^1.2.0", + "phpstan/phpstan": "^1.9.2", + "phpstan/phpstan-deprecation-rules": "^1.0.0" }, "config": { "platform": { diff --git a/vendor-bin/phpstan/composer.lock b/vendor-bin/phpstan/composer.lock index 6cb5008177..49dd3cb76e 100644 --- a/vendor-bin/phpstan/composer.lock +++ b/vendor-bin/phpstan/composer.lock @@ -4,32 +4,31 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7b6c08f79ca08061f5282b0ca46daf3c", + "content-hash": "dd263903d451909e9b09e1824c167f0a", "packages": [ { "name": "phpstan/extension-installer", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/phpstan/extension-installer.git", - "reference": "66c7adc9dfa38b6b5838a9fb728b68a7d8348051" + "reference": "f06dbb052ddc394e7896fcd1cfcd533f9f6ace40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/66c7adc9dfa38b6b5838a9fb728b68a7d8348051", - "reference": "66c7adc9dfa38b6b5838a9fb728b68a7d8348051", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f06dbb052ddc394e7896fcd1cfcd533f9f6ace40", + "reference": "f06dbb052ddc394e7896fcd1cfcd533f9f6ace40", "shasum": "" }, "require": { - "composer-plugin-api": "^1.1 || ^2.0", - "php": "^7.1 || ^8.0", - "phpstan/phpstan": ">=0.11.6" + "composer-plugin-api": "^2.0", + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.8.0" }, "require-dev": { - "composer/composer": "^1.8", - "phing/phing": "^2.16.3", + "composer/composer": "^2.0", "php-parallel-lint/php-parallel-lint": "^1.2.0", - "phpstan/phpstan-strict-rules": "^0.11 || ^0.12" + "phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0" }, "type": "composer-plugin", "extra": { @@ -47,26 +46,26 @@ "description": "Composer plugin for automatic installation of PHPStan extensions", "support": { "issues": "https://github.com/phpstan/extension-installer/issues", - "source": "https://github.com/phpstan/extension-installer/tree/1.1.0" + "source": "https://github.com/phpstan/extension-installer/tree/1.2.0" }, - "time": "2020-12-13T13:06:13+00:00" + "time": "2022-10-17T12:59:16+00:00" }, { "name": "phpstan/phpstan", - "version": "0.12.100", + "version": "1.9.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "48236ddf823547081b2b153d1cd2994b784328c3" + "reference": "d6fdf01c53978b6429f1393ba4afeca39cc68afa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/48236ddf823547081b2b153d1cd2994b784328c3", - "reference": "48236ddf823547081b2b153d1cd2994b784328c3", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d6fdf01c53978b6429f1393ba4afeca39cc68afa", + "reference": "d6fdf01c53978b6429f1393ba4afeca39cc68afa", "shasum": "" }, "require": { - "php": "^7.1|^8.0" + "php": "^7.2|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -76,11 +75,6 @@ "phpstan.phar" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.12-dev" - } - }, "autoload": { "files": [ "bootstrap.php" @@ -91,9 +85,13 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.100" + "source": "https://github.com/phpstan/phpstan/tree/1.9.2" }, "funding": [ { @@ -109,36 +107,35 @@ "type": "tidelift" } ], - "time": "2022-11-01T09:52:08+00:00" + "time": "2022-11-10T09:56:11+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", - "version": "0.12.6", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-deprecation-rules.git", - "reference": "46dbd43c2db973d2876d6653e53f5c2cc3a01fbb" + "reference": "e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/46dbd43c2db973d2876d6653e53f5c2cc3a01fbb", - "reference": "46dbd43c2db973d2876d6653e53f5c2cc3a01fbb", + "url": "https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682", + "reference": "e5ccafb0dd8d835dd65d8d7a1a0d2b1b75414682", "shasum": "" }, "require": { "php": "^7.1 || ^8.0", - "phpstan/phpstan": "^0.12.60" + "phpstan/phpstan": "^1.0" }, "require-dev": { - "phing/phing": "^2.16.3", "php-parallel-lint/php-parallel-lint": "^1.2", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.5.20" + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5" }, "type": "phpstan-extension", "extra": { "branch-alias": { - "dev-master": "0.12-dev" + "dev-master": "1.0-dev" }, "phpstan": { "includes": [ @@ -158,9 +155,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/0.12.6" + "source": "https://github.com/phpstan/phpstan-deprecation-rules/tree/1.0.0" }, - "time": "2020-12-13T10:20:54+00:00" + "time": "2021-09-23T11:02:21+00:00" } ], "packages-dev": [],