Skip to content

Commit

Permalink
refactor: add closure void return type in tests (#1180)
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed Dec 29, 2024
1 parent a9d8cfe commit acdb3f6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/BootloadManager/BootloadManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ public function testWithoutInvokerStrategy(): void
SampleBootWithMethodBoot::class,
SampleBoot::class,
], [
static function(Container $container, SampleBoot $boot) {
static function(Container $container, SampleBoot $boot): void {
$container->bind('efg', $boot);
}
], [
static function(Container $container, SampleBoot $boot) {
static function(Container $container, SampleBoot $boot): void {
$container->bind('ghi', $boot);
}
]);
Expand Down
4 changes: 2 additions & 2 deletions tests/BootloadManager/BootloadersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ public function testSchemaLoading(): void
SampleBootWithMethodBoot::class,
SampleBoot::class,
], [
static function(Container $container, SampleBoot $boot) {
static function(Container $container, SampleBoot $boot): void {
$container->bind('efg', $boot);
}
], [
static function(Container $container, SampleBoot $boot) {
static function(Container $container, SampleBoot $boot): void {
$container->bind('ghi', $boot);
}
]);
Expand Down
8 changes: 4 additions & 4 deletions tests/KernelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,19 @@ public function testBootingCallbacks()
{
$kernel = TestCore::create(['root' => __DIR__]);

$kernel->booting(static function (TestCore $core) {
$kernel->booting(static function (TestCore $core): void {
$core->getContainer()->bind('abc', 'foo');
});

$kernel->booting(static function (TestCore $core) {
$kernel->booting(static function (TestCore $core): void {
$core->getContainer()->bind('bcd', 'foo');
});

$kernel->booted( static function (TestCore $core) {
$kernel->booted( static function (TestCore $core): void {
$core->getContainer()->bind('cde', 'foo');
});

$kernel->booted( static function (TestCore $core) {
$kernel->booted( static function (TestCore $core): void {
$core->getContainer()->bind('def', 'foo');
});

Expand Down

0 comments on commit acdb3f6

Please sign in to comment.