Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cs: Apply the new PHP-CS-Fixer rules #1017

Merged
merged 1 commit into from
Oct 6, 2023
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
2 changes: 1 addition & 1 deletion requirement-checker/src/RequirementCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function evaluateRequirements()
{
return array_reduce(
$this->requirements,
function (bool $checkPassed, Requirement $requirement): bool {
static function (bool $checkPassed, Requirement $requirement): bool {
return $checkPassed && $requirement->isFulfilled();
},
true
Expand Down
3 changes: 1 addition & 2 deletions requirement-checker/tests/CheckerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

namespace KevinGH\RequirementChecker;

use Generator;
use PHPUnit\Framework\TestCase;
use function preg_replace;
use const PHP_VERSION;
Expand Down Expand Up @@ -60,7 +59,7 @@ public function test_it_can_check_requirements(
self::assertSame($expectedResult, $actualResult);
}

public function provideRequirements(): Generator
public function provideRequirements(): iterable
{
$phpVersion = PHP_VERSION;
$remainingVerbosities = ['verbosity=verbose' => IO::VERBOSITY_VERBOSE, 'verbosity=normal' => IO::VERBOSITY_NORMAL, 'verbosity=quiet' => IO::VERBOSITY_QUIET];
Expand Down
5 changes: 2 additions & 3 deletions requirement-checker/tests/IOTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

namespace KevinGH\RequirementChecker;

use Generator;
use PHPUnit\Framework\TestCase;
use function function_exists;
use function getenv;
Expand Down Expand Up @@ -67,7 +66,7 @@ public function test_it_uses_the_shell_verbosity_environment_variable_over_the_o
self::assertSame($verbosity, $io->getVerbosity());
}

public function provideOptions(): Generator
public function provideOptions(): iterable
{
yield [
['cli.php', '--foo'],
Expand Down Expand Up @@ -160,7 +159,7 @@ public function provideOptions(): Generator
];
}

public function provideOptionsWithShellVerbosity(): Generator
public function provideOptionsWithShellVerbosity(): iterable
{
yield [
['cli.php', '--foo'],
Expand Down
7 changes: 3 additions & 4 deletions requirement-checker/tests/PrinterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

namespace KevinGH\RequirementChecker;

use Generator;
use PHPUnit\Framework\TestCase;
use function ob_get_clean;
use function ob_start;
Expand Down Expand Up @@ -82,7 +81,7 @@ public function test_it_can_print_a_block(
self::assertSame($expected, $actual);
}

public function provideTitles(): Generator
public function provideTitles(): iterable
{
yield [
IO::VERBOSITY_NORMAL,
Expand Down Expand Up @@ -171,7 +170,7 @@ public function provideTitles(): Generator
];
}

public function provideErrorRequirements(): Generator
public function provideErrorRequirements(): iterable
{
yield [
new Requirement(
Expand Down Expand Up @@ -216,7 +215,7 @@ public function provideErrorRequirements(): Generator
];
}

public function provideBlocks(): Generator
public function provideBlocks(): iterable
{
yield [
IO::VERBOSITY_NORMAL,
Expand Down
Loading