Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Fix: Rename methods #329

Merged
merged 1 commit into from
Oct 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,17 @@ parameters:
path: src/DataProvider/BooleanProvider.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\BooleanProvider\\:\\:provide\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\BooleanProvider\\:\\:provideDataForValues\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: src/DataProvider/BooleanProvider.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\BooleanProvider\\:\\:provideWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\BooleanProvider\\:\\:provideDataForValuesWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: src/DataProvider/BooleanProvider.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\BooleanProvider\\:\\:provideWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\BooleanProvider\\:\\:provideDataForValuesWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: src/DataProvider/BooleanProvider.php

Expand Down Expand Up @@ -216,17 +216,17 @@ parameters:
path: src/DataProvider/NullProvider.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\NullProvider\\:\\:provide\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\NullProvider\\:\\:provideDataForValues\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: src/DataProvider/NullProvider.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\NullProvider\\:\\:provideWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\NullProvider\\:\\:provideDataForValuesWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: src/DataProvider/NullProvider.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\NullProvider\\:\\:provideWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\NullProvider\\:\\:provideDataForValuesWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: src/DataProvider/NullProvider.php

Expand Down Expand Up @@ -331,17 +331,17 @@ parameters:
path: src/DataProvider/StringProvider.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\StringProvider\\:\\:provide\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\StringProvider\\:\\:provideDataForValues\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: src/DataProvider/StringProvider.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\StringProvider\\:\\:provideWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\StringProvider\\:\\:provideDataForValuesWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: src/DataProvider/StringProvider.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\StringProvider\\:\\:provideWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\DataProvider\\\\StringProvider\\:\\:provideDataForValuesWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: src/DataProvider/StringProvider.php

Expand Down Expand Up @@ -431,17 +431,17 @@ parameters:
path: test/AutoReview/SrcCodeTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\AutoReview\\\\SrcCodeTest\\:\\:provide\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\AutoReview\\\\SrcCodeTest\\:\\:provideDataForValues\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/AutoReview/SrcCodeTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\AutoReview\\\\SrcCodeTest\\:\\:provideWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\AutoReview\\\\SrcCodeTest\\:\\:provideDataForValuesWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/AutoReview/SrcCodeTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\AutoReview\\\\SrcCodeTest\\:\\:provideWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\AutoReview\\\\SrcCodeTest\\:\\:provideDataForValuesWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/AutoReview/SrcCodeTest.php

Expand Down Expand Up @@ -531,17 +531,17 @@ parameters:
path: test/AutoReview/TestCodeTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\AutoReview\\\\TestCodeTest\\:\\:provide\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\AutoReview\\\\TestCodeTest\\:\\:provideDataForValues\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/AutoReview/TestCodeTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\AutoReview\\\\TestCodeTest\\:\\:provideWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\AutoReview\\\\TestCodeTest\\:\\:provideDataForValuesWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/AutoReview/TestCodeTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\AutoReview\\\\TestCodeTest\\:\\:provideWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\AutoReview\\\\TestCodeTest\\:\\:provideDataForValuesWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/AutoReview/TestCodeTest.php

Expand Down Expand Up @@ -631,17 +631,17 @@ parameters:
path: test/Unit/Exception/EmptyValuesTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\EmptyValuesTest\\:\\:provide\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\EmptyValuesTest\\:\\:provideDataForValues\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/Unit/Exception/EmptyValuesTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\EmptyValuesTest\\:\\:provideWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\EmptyValuesTest\\:\\:provideDataForValuesWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/Unit/Exception/EmptyValuesTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\EmptyValuesTest\\:\\:provideWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\EmptyValuesTest\\:\\:provideDataForValuesWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/Unit/Exception/EmptyValuesTest.php

Expand Down Expand Up @@ -731,17 +731,17 @@ parameters:
path: test/Unit/Exception/InvalidExcludeClassNameTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\InvalidExcludeClassNameTest\\:\\:provide\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\InvalidExcludeClassNameTest\\:\\:provideDataForValues\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/Unit/Exception/InvalidExcludeClassNameTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\InvalidExcludeClassNameTest\\:\\:provideWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\InvalidExcludeClassNameTest\\:\\:provideDataForValuesWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/Unit/Exception/InvalidExcludeClassNameTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\InvalidExcludeClassNameTest\\:\\:provideWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\InvalidExcludeClassNameTest\\:\\:provideDataForValuesWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/Unit/Exception/InvalidExcludeClassNameTest.php

Expand Down Expand Up @@ -831,17 +831,17 @@ parameters:
path: test/Unit/Exception/NonExistentDirectoryTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\NonExistentDirectoryTest\\:\\:provide\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\NonExistentDirectoryTest\\:\\:provideDataForValues\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/Unit/Exception/NonExistentDirectoryTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\NonExistentDirectoryTest\\:\\:provideWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\NonExistentDirectoryTest\\:\\:provideDataForValuesWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/Unit/Exception/NonExistentDirectoryTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\NonExistentDirectoryTest\\:\\:provideWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\NonExistentDirectoryTest\\:\\:provideDataForValuesWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/Unit/Exception/NonExistentDirectoryTest.php

Expand Down Expand Up @@ -931,17 +931,17 @@ parameters:
path: test/Unit/Exception/NonExistentExcludeClassTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\NonExistentExcludeClassTest\\:\\:provide\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\NonExistentExcludeClassTest\\:\\:provideDataForValues\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/Unit/Exception/NonExistentExcludeClassTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\NonExistentExcludeClassTest\\:\\:provideWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\NonExistentExcludeClassTest\\:\\:provideDataForValuesWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/Unit/Exception/NonExistentExcludeClassTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\NonExistentExcludeClassTest\\:\\:provideWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\Exception\\\\NonExistentExcludeClassTest\\:\\:provideDataForValuesWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/Unit/Exception/NonExistentExcludeClassTest.php

Expand Down Expand Up @@ -1031,17 +1031,17 @@ parameters:
path: test/Unit/HelperTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\HelperTest\\:\\:provide\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\HelperTest\\:\\:provideDataForValues\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/Unit/HelperTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\HelperTest\\:\\:provideWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\HelperTest\\:\\:provideDataForValuesWhere\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/Unit/HelperTest.php

-
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\HelperTest\\:\\:provideWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
message: "#^Method Ergebnis\\\\Test\\\\Util\\\\Test\\\\Unit\\\\HelperTest\\:\\:provideDataForValuesWhereNot\\(\\) is protected, but since the containing class is final, it can be private\\.$#"
count: 1
path: test/Unit/HelperTest.php

Expand Down
6 changes: 3 additions & 3 deletions src/DataProvider/BooleanProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ final class BooleanProvider
*/
public static function arbitrary(): \Generator
{
yield from self::provide(self::values());
yield from self::provideDataForValues(self::values());
}

/**
* @return \Generator<string, array{0: bool}>
*/
public static function false(): \Generator
{
yield from self::provideWhere(self::values(), static function (bool $value): bool {
yield from self::provideDataForValuesWhere(self::values(), static function (bool $value): bool {
return false === $value;
});
}
Expand All @@ -42,7 +42,7 @@ public static function false(): \Generator
*/
public static function true(): \Generator
{
yield from self::provideWhere(self::values(), static function (bool $value): bool {
yield from self::provideDataForValuesWhere(self::values(), static function (bool $value): bool {
return true === $value;
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/DataProvider/NullProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class NullProvider
*/
public static function null(): \Generator
{
yield from self::provide([
yield from self::provideDataForValues([
'null' => null,
]);
}
Expand Down
8 changes: 4 additions & 4 deletions src/DataProvider/StringProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class StringProvider
*/
public static function arbitrary(): \Generator
{
yield from self::provideWhereNot(self::values(), static function (string $value): bool {
yield from self::provideDataForValuesWhereNot(self::values(), static function (string $value): bool {
return '' === \trim($value);
});
}
Expand All @@ -34,7 +34,7 @@ public static function arbitrary(): \Generator
*/
public static function blank(): \Generator
{
yield from self::provideWhere(self::values(), static function (string $value): bool {
yield from self::provideDataForValuesWhere(self::values(), static function (string $value): bool {
return '' === \trim($value)
&& '' !== $value;
});
Expand All @@ -45,7 +45,7 @@ public static function blank(): \Generator
*/
public static function empty(): \Generator
{
yield from self::provideWhere(self::values(), static function (string $value): bool {
yield from self::provideDataForValuesWhere(self::values(), static function (string $value): bool {
return '' === $value;
});
}
Expand All @@ -55,7 +55,7 @@ public static function empty(): \Generator
*/
public static function untrimmed(): \Generator
{
yield from self::provideWhere(self::values(), static function (string $value): bool {
yield from self::provideDataForValuesWhere(self::values(), static function (string $value): bool {
return \trim($value) !== $value
&& '' !== \trim($value);
});
Expand Down
10 changes: 5 additions & 5 deletions src/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ final protected static function assertTraitSatisfiesSpecification(callable $spec
*
* @return \Generator<string, array{0: mixed}>
*/
final protected static function provide(array $values): \Generator
final protected static function provideDataForValues(array $values): \Generator
{
if ([] === $values) {
throw Exception\EmptyValues::create();
Expand All @@ -473,7 +473,7 @@ final protected static function provide(array $values): \Generator
*
* @return \Generator<string, array{0: mixed}>
*/
final protected static function provideWhere(array $values, \Closure $test): \Generator
final protected static function provideDataForValuesWhere(array $values, \Closure $test): \Generator
{
if ([] === $values) {
throw Exception\EmptyValues::create();
Expand All @@ -487,7 +487,7 @@ final protected static function provideWhere(array $values, \Closure $test): \Ge
throw Exception\EmptyValues::filtered();
}

yield from self::provide($filtered);
yield from self::provideDataForValues($filtered);
}

/**
Expand All @@ -498,7 +498,7 @@ final protected static function provideWhere(array $values, \Closure $test): \Ge
*
* @return \Generator<string, array{0: mixed}>
*/
final protected static function provideWhereNot(array $values, \Closure $test): \Generator
final protected static function provideDataForValuesWhereNot(array $values, \Closure $test): \Generator
{
if ([] === $values) {
throw Exception\EmptyValues::create();
Expand All @@ -512,6 +512,6 @@ final protected static function provideWhereNot(array $values, \Closure $test):
throw Exception\EmptyValues::filtered();
}

yield from self::provide($filtered);
yield from self::provideDataForValues($filtered);
}
}
Loading