diff --git a/composer.json b/composer.json index f37aba6b..026a460e 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "require-dev": { "ergebnis/composer-normalize": "^2.9.0", "ergebnis/license": "^1.1.0", - "ergebnis/php-cs-fixer-config": "^2.3.0", + "ergebnis/php-cs-fixer-config": "^2.4.0", "ergebnis/phpstan-rules": "~0.15.2", "infection/infection": "~0.15.3", "phpstan/extension-installer": "^1.0.5", diff --git a/composer.lock b/composer.lock index 8f7e887d..ca811f8d 100644 --- a/composer.lock +++ b/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": "bfaad684b87020c38987f5f7ca4f9771", + "content-hash": "24f320a53a6b94ae21530d97e66fb800", "packages": [ { "name": "ergebnis/classy", @@ -1004,16 +1004,16 @@ }, { "name": "ergebnis/php-cs-fixer-config", - "version": "2.3.0", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/ergebnis/php-cs-fixer-config.git", - "reference": "0bcde3f7cd0c4f01f6135f80ddd9cadcbf341879" + "reference": "309a510f93528844a9b231d442c1fd4acc87173d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/php-cs-fixer-config/zipball/0bcde3f7cd0c4f01f6135f80ddd9cadcbf341879", - "reference": "0bcde3f7cd0c4f01f6135f80ddd9cadcbf341879", + "url": "https://api.github.com/repos/ergebnis/php-cs-fixer-config/zipball/309a510f93528844a9b231d442c1fd4acc87173d", + "reference": "309a510f93528844a9b231d442c1fd4acc87173d", "shasum": "" }, "require": { @@ -1029,14 +1029,14 @@ "infection/infection": "~0.15.3", "jangregor/phpstan-prophecy": "~0.8.0", "phpstan/extension-installer": "^1.0.5", - "phpstan/phpstan": "~0.12.48", + "phpstan/phpstan": "~0.12.50", "phpstan/phpstan-deprecation-rules": "~0.12.5", "phpstan/phpstan-phpunit": "~0.12.16", "phpstan/phpstan-strict-rules": "~0.12.5", "phpunit/phpunit": "^8.5.8", "psalm/plugin-phpunit": "~0.12.2", "symfony/filesystem": "^4.4.0", - "vimeo/psalm": "^3.16" + "vimeo/psalm": "^3.18" }, "type": "library", "autoload": { @@ -1062,7 +1062,7 @@ "type": "github" } ], - "time": "2020-10-08T18:03:06+00:00" + "time": "2020-10-21T11:06:57+00:00" }, { "name": "ergebnis/phpstan-rules", @@ -1745,20 +1745,20 @@ }, { "name": "paragonie/random_compat", - "version": "v9.99.99", + "version": "v9.99.100", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95" + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", - "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", "shasum": "" }, "require": { - "php": "^7" + "php": ">= 7" }, "require-dev": { "phpunit/phpunit": "4.*|5.*", @@ -1786,7 +1786,7 @@ "pseudorandom", "random" ], - "time": "2018-07-02T15:55:56+00:00" + "time": "2020-10-15T08:29:30+00:00" }, { "name": "phar-io/manifest", @@ -1892,23 +1892,23 @@ }, { "name": "php-cs-fixer/diff", - "version": "v1.3.0", + "version": "v1.3.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756" + "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756", - "reference": "78bb099e9c16361126c86ce82ec4405ebab8e756", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", + "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^5.6 || ^7.0 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", "symfony/process": "^3.3" }, "type": "library", @@ -1922,14 +1922,14 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, { "name": "SpacePossum" } @@ -1939,7 +1939,7 @@ "keywords": [ "diff" ], - "time": "2018-02-15T16:58:55+00:00" + "time": "2020-10-14T08:39:05+00:00" }, { "name": "phpdocumentor/reflection-common", diff --git a/src/Exception/InvalidExcludeClassName.php b/src/Exception/InvalidExcludeClassName.php index 34d21542..fe4bc8dd 100644 --- a/src/Exception/InvalidExcludeClassName.php +++ b/src/Exception/InvalidExcludeClassName.php @@ -20,8 +20,6 @@ final class InvalidExcludeClassName extends \InvalidArgumentException { /** * @param mixed $className - * - * @return self */ public static function fromClassName($className): self { diff --git a/src/Helper.php b/src/Helper.php index 1a41eda0..3f645f70 100644 --- a/src/Helper.php +++ b/src/Helper.php @@ -26,10 +26,6 @@ trait Helper * Useful for generating fake data in tests. * * @see https://github.com/fzaninotto/Faker - * - * @param string $locale - * - * @return Generator */ final protected static function faker(string $locale = 'en_US'): Generator { @@ -58,7 +54,6 @@ final protected static function faker(string $locale = 'en_US'): Generator * * @psalm-param array $excludeClassNames * - * @param string $directory * @param array $excludeClassNames * * @throws Exception\NonExistentDirectory @@ -90,9 +85,6 @@ static function (string $className): bool { * @phpstam-param array $excludeClassyNames * @psalm-param array $excludeClassyNames * - * @param string $directory - * @param string $namespace - * @param string $testNamespace * @param array $excludeClassyNames * * @throws Exception\NonExistentDirectory @@ -198,10 +190,7 @@ final protected static function assertClassesHaveTests(string $directory, string * * @psalm-param array $excludeClassyNames * - * @param callable $specification - * @param string $directory * @param array $excludeClassyNames - * @param string $message * * @throws Exception\NonExistentDirectory * @throws Exception\InvalidExcludeClassName @@ -243,8 +232,6 @@ final protected static function assertClassyConstructsSatisfySpecification(calla /** * Asserts that a class exists. - * - * @param string $className */ final protected static function assertClassExists(string $className): void { @@ -262,9 +249,6 @@ final protected static function assertClassExists(string $className): void * * @psalm-param class-string $parentClassName * @psalm-param class-string $className - * - * @param string $parentClassName - * @param string $className */ final protected static function assertClassExtends(string $parentClassName, string $className): void { @@ -289,9 +273,6 @@ final protected static function assertClassExtends(string $parentClassName, stri * * @psalm-param class-string $interfaceName * @psalm-param class-string $className - * - * @param string $interfaceName - * @param string $className */ final protected static function assertClassImplementsInterface(string $interfaceName, string $className): void { @@ -314,8 +295,6 @@ final protected static function assertClassImplementsInterface(string $interface * @phpstan-param class-string $className * * @psalm-param class-string $className - * - * @param string $className */ final protected static function assertClassIsAbstract(string $className): void { @@ -338,8 +317,6 @@ final protected static function assertClassIsAbstract(string $className): void * @phpstan-param class-string $className * * @psalm-param class-string $className - * - * @param string $className */ final protected static function assertClassIsFinal(string $className): void { @@ -363,10 +340,6 @@ final protected static function assertClassIsFinal(string $className): void * * @psalm-param callable(class-string):bool $specification * @psalm-param class-string $className - * - * @param callable $specification - * @param string $className - * @param string $message */ final protected static function assertClassSatisfiesSpecification(callable $specification, string $className, string $message = ''): void { @@ -386,9 +359,6 @@ final protected static function assertClassSatisfiesSpecification(callable $spec * * @psalm-param class-string $traitName * @psalm-param class-string $className - * - * @param string $traitName - * @param string $className */ final protected static function assertClassUsesTrait(string $traitName, string $className): void { @@ -404,8 +374,6 @@ final protected static function assertClassUsesTrait(string $traitName, string $ /** * Asserts that an interface exists. - * - * @param string $interfaceName */ final protected static function assertInterfaceExists(string $interfaceName): void { @@ -423,9 +391,6 @@ final protected static function assertInterfaceExists(string $interfaceName): vo * * @psalm-param class-string $parentInterfaceName * @psalm-param class-string $interfaceName - * - * @param string $parentInterfaceName - * @param string $interfaceName */ final protected static function assertInterfaceExtends(string $parentInterfaceName, string $interfaceName): void { @@ -451,10 +416,6 @@ final protected static function assertInterfaceExtends(string $parentInterfaceNa * * @psalm-param callable(class-string):bool $specification * @psalm-param class-string $interfaceName - * - * @param callable $specification - * @param string $interfaceName - * @param string $message */ final protected static function assertInterfaceSatisfiesSpecification(callable $specification, string $interfaceName, string $message = ''): void { @@ -468,8 +429,6 @@ final protected static function assertInterfaceSatisfiesSpecification(callable $ /** * Asserts that a trait exists. - * - * @param string $traitName */ final protected static function assertTraitExists(string $traitName): void { @@ -488,10 +447,6 @@ final protected static function assertTraitExists(string $traitName): void * * @psalm-param callable(class-string):bool $specification * @psalm-param class-string $traitName - * - * @param callable $specification - * @param string $traitName - * @param string $message */ final protected static function assertTraitSatisfiesSpecification(callable $specification, string $traitName, string $message = ''): void { @@ -525,7 +480,6 @@ final protected static function provideDataForValues(array $values): \Generator /** * @param array $values - * @param \Closure $test * * @throws Exception\EmptyValues * @@ -550,7 +504,6 @@ final protected static function provideDataForValuesWhere(array $values, \Closur /** * @param array $values - * @param \Closure $test * * @throws Exception\EmptyValues * diff --git a/test/Unit/DataProvider/AbstractProviderTestCase.php b/test/Unit/DataProvider/AbstractProviderTestCase.php index 2eabfdfe..e1548087 100644 --- a/test/Unit/DataProvider/AbstractProviderTestCase.php +++ b/test/Unit/DataProvider/AbstractProviderTestCase.php @@ -104,17 +104,11 @@ final protected static function assertProvidesDataSetsForValuesSatisfyingSpecifi )); } - /** - * @param array $actual - */ final protected static function assertDataSetsAreNotEmpty(array $actual): void { self::assertNotEmpty($actual, 'Failed asserting that provided data sets are not empty.'); } - /** - * @param array $values - */ private static function assertExpectedValuesAreNotEmpty(array $values): void { self::assertNotEmpty($values, 'Failed asserting that expected values are not empty.'); diff --git a/test/Unit/DataProvider/FloatProviderTest.php b/test/Unit/DataProvider/FloatProviderTest.php index cc603d19..e2bdd653 100644 --- a/test/Unit/DataProvider/FloatProviderTest.php +++ b/test/Unit/DataProvider/FloatProviderTest.php @@ -54,8 +54,6 @@ public function testArbitraryReturnsGeneratorThatProvidesFloatValues(): void /** * @dataProvider \Ergebnis\Test\Util\DataProvider\FloatProvider::lessThanZero() - * - * @param float $value */ public function testLessThanZeroProvidesFloatLessThanZero(float $value): void { @@ -78,8 +76,6 @@ public function testLessThanZeroReturnsGeneratorThatProvidesFloatLessThanZero(): /** * @dataProvider \Ergebnis\Test\Util\DataProvider\FloatProvider::zero() - * - * @param float $value */ public function testZeroProvidesZero(float $value): void { @@ -99,8 +95,6 @@ public function testZeroReturnsGeneratorThatProvidesZero(): void /** * @dataProvider \Ergebnis\Test\Util\DataProvider\FloatProvider::greaterThanZero() - * - * @param float $value */ public function testGreaterThanZeroProvidesFloatGreaterThanZero(float $value): void { @@ -123,8 +117,6 @@ public function testGreaterThanZeroReturnsGeneratorThatProvidesFloatGreaterThanZ /** * @dataProvider \Ergebnis\Test\Util\DataProvider\FloatProvider::lessThanOne() - * - * @param float $value */ public function testLessThanOneProvidesFloatLessThanOne(float $value): void { @@ -159,8 +151,6 @@ public function testOneReturnsGeneratorThatProvidesOne(): void /** * @dataProvider \Ergebnis\Test\Util\DataProvider\FloatProvider::greaterThanOne() - * - * @param float $value */ public function testGreaterThanOneProvidesFloatGreaterThanOne(float $value): void { diff --git a/test/Unit/DataProvider/IntProviderTest.php b/test/Unit/DataProvider/IntProviderTest.php index 10191b78..6ec200d6 100644 --- a/test/Unit/DataProvider/IntProviderTest.php +++ b/test/Unit/DataProvider/IntProviderTest.php @@ -54,8 +54,6 @@ public function testArbitraryReturnsGeneratorThatProvidesIntValues(): void /** * @dataProvider \Ergebnis\Test\Util\DataProvider\IntProvider::lessThanZero() - * - * @param int $value */ public function testLessThanZeroProvidesIntLessThanZero(int $value): void { @@ -78,8 +76,6 @@ public function testLessThanZeroReturnsGeneratorThatProvidesIntLessThanZero(): v /** * @dataProvider \Ergebnis\Test\Util\DataProvider\IntProvider::zero() - * - * @param int $value */ public function testZeroProvidesZero(int $value): void { @@ -99,8 +95,6 @@ public function testZeroReturnsGeneratorThatProvidesZero(): void /** * @dataProvider \Ergebnis\Test\Util\DataProvider\IntProvider::greaterThanZero() - * - * @param int $value */ public function testGreaterThanZeroProvidesIntGreaterThanZero(int $value): void { @@ -123,8 +117,6 @@ public function testGreaterThanZeroReturnsGeneratorThatProvidesIntGreaterThanZer /** * @dataProvider \Ergebnis\Test\Util\DataProvider\IntProvider::lessThanOne() - * - * @param int $value */ public function testLessThanOneProvidesIntLessThanOne(int $value): void { @@ -159,8 +151,6 @@ public function testOneReturnsGeneratorThatProvidesOne(): void /** * @dataProvider \Ergebnis\Test\Util\DataProvider\IntProvider::greaterThanOne() - * - * @param int $value */ public function testGreaterThanOneProvidesIntGreaterThanOne(int $value): void { diff --git a/test/Unit/DataProvider/StringProviderTest.php b/test/Unit/DataProvider/StringProviderTest.php index fb5a9abb..6308169d 100644 --- a/test/Unit/DataProvider/StringProviderTest.php +++ b/test/Unit/DataProvider/StringProviderTest.php @@ -60,8 +60,6 @@ public function testArbitraryReturnsGeneratorThatProvidesStringsThatAreNeitherEm /** * @dataProvider \Ergebnis\Test\Util\DataProvider\StringProvider::blank() - * - * @param string $value */ public function testBlankProvidesBlankString(string $value): void { @@ -85,8 +83,6 @@ public function testBlankReturnsGeneratorThatProvidesStringsThatAreNeitherEmptyN /** * @dataProvider \Ergebnis\Test\Util\DataProvider\StringProvider::empty() - * - * @param string $value */ public function testEmptyProvidesEmptyString(string $value): void { @@ -106,8 +102,6 @@ public function testEmptyReturnsGeneratorThatProvidesAnEmptyString(): void /** * @dataProvider \Ergebnis\Test\Util\DataProvider\StringProvider::untrimmed() - * - * @param string $value */ public function testUntrimmedProvidesUntrimmedString(string $value): void { diff --git a/test/Unit/HelperTest.php b/test/Unit/HelperTest.php index 28b26b06..38de1040 100644 --- a/test/Unit/HelperTest.php +++ b/test/Unit/HelperTest.php @@ -69,8 +69,6 @@ public function testFakerWithoutLocaleReturnsFakerWithDefaultLocale(): void /** * @dataProvider providerLocale - * - * @param string $locale */ public function testFakerWithLocaleReturnsFakerWithSpecifiedLocale(string $locale): void { @@ -81,8 +79,6 @@ public function testFakerWithLocaleReturnsFakerWithSpecifiedLocale(string $local /** * @dataProvider providerLocale - * - * @param string $locale */ public function testFakerReturnsSameFaker(string $locale): void { @@ -346,9 +342,6 @@ public function testAssertClassesHaveTestsSucceedsWhenFoundClassesHaveTests(): v /** * @dataProvider providerNamespaceAndTestNamespace - * - * @param string $namespace - * @param string $testNamespace */ public function testAssertClassesHaveTestsWorksWithAndWithoutTrailingSlash(string $namespace, string $testNamespace): void { @@ -624,8 +617,6 @@ static function (string $classyName): bool { /** * @dataProvider providerNotClass - * - * @param string $className */ public function testAssertClassExistsFailsWhenClassIsNotClass(string $className): void { @@ -665,8 +656,6 @@ public function testAssertClassExistsSucceedsWhenClassExists(): void /** * @dataProvider providerNotClass - * - * @param string $parentClassName */ public function testAssertClassExtendsFailsWhenParentClassIsNotClass(string $parentClassName): void { @@ -686,8 +675,6 @@ public function testAssertClassExtendsFailsWhenParentClassIsNotClass(string $par /** * @dataProvider providerNotClass - * - * @param string $className */ public function testAssertClassExtendsFailsWhenClassIsNotClass(string $className): void { @@ -736,8 +723,6 @@ public function testAssertClassExtendsSucceedsWhenClassExtendsParentClass(): voi /** * @dataProvider providerNotInterface - * - * @param string $interfaceName */ public function testAssertClassImplementsInterfaceFailsWhenInterfaceIsNotInterface(string $interfaceName): void { @@ -757,8 +742,6 @@ public function testAssertClassImplementsInterfaceFailsWhenInterfaceIsNotInterfa /** * @dataProvider providerNotClass - * - * @param string $className */ public function testAssertClassImplementsInterfaceFailsWhenClassIsNotClass(string $className): void { @@ -807,8 +790,6 @@ public function testAssertClassImplementsInterfaceSucceedsWhenClassImplementsInt /** * @dataProvider providerNotClass - * - * @param string $className */ public function testAssertClassIsAbstractFailsWhenClassIsNotClass(string $className): void { @@ -843,8 +824,6 @@ public function testAssertClassIsAbstractSucceedsWhenClassIsAbstract(): void /** * @dataProvider providerNotClass - * - * @param string $className */ public function testAssertClassIsFinalFailsWhenClassIsNotClass(string $className): void { @@ -879,8 +858,6 @@ public function testAssertClassIsFinalSucceedsWhenClassIsFinal(): void /** * @dataProvider providerNotClass - * - * @param string $className */ public function testAssertClassSatisfiesSpecificationFailsWhenClassIsNotAClass(string $className): void { @@ -950,8 +927,6 @@ static function (): bool { /** * @dataProvider providerNotTrait - * - * @param string $traitName */ public function testAssertClassUsesTraitFailsWhenTraitIsNotTrait(string $traitName): void { @@ -971,8 +946,6 @@ public function testAssertClassUsesTraitFailsWhenTraitIsNotTrait(string $traitNa /** * @dataProvider providerNotClass - * - * @param string $className */ public function testAssertClassUsesTraitFailsWhenClassIsNotClass(string $className): void { @@ -1021,8 +994,6 @@ public function testAssertClassUsesTraitSucceedsWhenClassUsesTrait(): void /** * @dataProvider providerNotInterface - * - * @param string $interfaceName */ public function testAssertInterfaceExistsFailsWhenInterfaceIsNotInterface(string $interfaceName): void { @@ -1062,8 +1033,6 @@ public function testAssertInterfaceExistsSucceedsWhenInterfaceExists(): void /** * @dataProvider providerNotInterface - * - * @param string $parentInterfaceName */ public function testInterfaceExtendsFailsWhenParentInterfaceIsNotInterface(string $parentInterfaceName): void { @@ -1083,8 +1052,6 @@ public function testInterfaceExtendsFailsWhenParentInterfaceIsNotInterface(strin /** * @dataProvider providerNotInterface - * - * @param string $interfaceName */ public function testAssertInterfaceExtendsFailsWhenInterfaceIsNotInterface(string $interfaceName): void { @@ -1133,8 +1100,6 @@ public function testAssertInterfaceExtendsSucceedsWhenInterfaceExtendsParentInte /** * @dataProvider providerNotInterface - * - * @param string $interfaceName */ public function testAssertInterfaceSatisfiesSpecificationFailsWhenInterfaceIsNotInterface(string $interfaceName): void { @@ -1204,8 +1169,6 @@ static function (): bool { /** * @dataProvider providerNotTrait - * - * @param string $traitName */ public function testAssertTraitExistsFailsWhenTraitIsNotTrait(string $traitName): void { @@ -1245,8 +1208,6 @@ public function testAssertTraitExistsSucceedsWhenTraitExists(): void /** * @dataProvider providerNotTrait - * - * @param string $traitName */ public function testAssertTraitSatisfiesSpecificationFailsWhenTraitIsNotATrait(string $traitName): void {