Skip to content

Commit

Permalink
cs: Apply the new PHP-CS-Fixer rules
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed Oct 6, 2023
1 parent c67a64a commit cdeb29a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
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

0 comments on commit cdeb29a

Please sign in to comment.