Skip to content

Commit

Permalink
[tests] add missing return types
Browse files Browse the repository at this point in the history
  • Loading branch information
jrushlow committed Apr 2, 2024
1 parent 5fba2ee commit dd34699
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tests/Maker/FunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class FunctionalTest extends TestCase
* Smoke test to make sure the DI autowiring works and all makers
* are registered and have the correct arguments.
*/
public function testWiring()
public function testWiring(): void
{
$kernel = new MakerTestKernel('dev', true);

Expand Down
1 change: 1 addition & 0 deletions tests/Maker/MakeEntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ public function getTestDetails(): \Generator
];
}

/** @param array<string, mixed> $data */
private function runEntityTest(MakerTestRunner $runner, array $data = []): void
{
$runner->renderTemplateFile(
Expand Down
4 changes: 2 additions & 2 deletions tests/Maker/MakeFormTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected function getMakerClass(): string
return MakeForm::class;
}

public function getTestDetails()
public function getTestDetails(): \Generator
{
yield 'it_generates_basic_form' => [$this->createMakerTest()
->run(function (MakerTestRunner $runner) {
Expand Down Expand Up @@ -204,7 +204,7 @@ public function getTestDetails()
];
}

private function runFormTest(MakerTestRunner $runner, string $filename)
private function runFormTest(MakerTestRunner $runner, string $filename): void
{
$runner->copy(
'make-form/tests/'.$filename,
Expand Down
6 changes: 3 additions & 3 deletions tests/Maker/MakeMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private function createMakeMessageTest(): MakerTestDetails
});
}

public function getTestDetails()
public function getTestDetails(): \Generator
{
yield 'it_generates_basic_message' => [$this->createMakeMessageTest()
->run(function (MakerTestRunner $runner) {
Expand Down Expand Up @@ -94,7 +94,7 @@ public function getTestDetails()
];
}

private function runMessageTest(MakerTestRunner $runner, string $filename)
private function runMessageTest(MakerTestRunner $runner, string $filename): void
{
$runner->copy(
'make-message/tests/'.$filename,
Expand All @@ -104,7 +104,7 @@ private function runMessageTest(MakerTestRunner $runner, string $filename)
$runner->runTests();
}

private function configureTransports(MakerTestRunner $runner)
private function configureTransports(MakerTestRunner $runner): void
{
$runner->writeFile(
'config/packages/messenger.yaml',
Expand Down
2 changes: 1 addition & 1 deletion tests/Maker/MakeMessengerMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected function getMakerClass(): string
return MakeMessengerMiddleware::class;
}

public function getTestDetails()
public function getTestDetails(): \Generator
{
yield 'it_generates_messenger_middleware' => [$this->createMakerTest()
->run(function (MakerTestRunner $runner) {
Expand Down
2 changes: 1 addition & 1 deletion tests/Maker/MakeSerializerEncoderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected function getMakerClass(): string
return MakeSerializerEncoder::class;
}

public function getTestDetails()
public function getTestDetails(): \Generator
{
yield 'it_makes_serializer_encoder' => [$this->createMakerTest()
// serializer-pack 1.1 requires symfony/property-info >= 5.4
Expand Down
2 changes: 1 addition & 1 deletion tests/Maker/MakeTwigExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected function getMakerClass(): string
return MakeTwigExtension::class;
}

public function getTestDetails()
public function getTestDetails(): \Generator
{
yield 'it_makes_twig_extension' => [$this->createMakerTest()
->run(function (MakerTestRunner $runner) {
Expand Down
2 changes: 1 addition & 1 deletion tests/Maker/MakeUnitTestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected function getMakerClass(): string
return MakeUnitTest::class;
}

public function getTestDetails()
public function getTestDetails(): \Generator
{
yield 'it_makes_unit_test' => [$this->createMakerTest()
->run(function (MakerTestRunner $runner) {
Expand Down
2 changes: 1 addition & 1 deletion tests/Maker/MakeValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected function getMakerClass(): string
return MakeValidator::class;
}

public function getTestDetails()
public function getTestDetails(): \Generator
{
yield 'it_makes_validator' => [$this->createMakerTest()
->run(function (MakerTestRunner $runner) {
Expand Down
2 changes: 1 addition & 1 deletion tests/Maker/MakeVoterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected function getMakerClass(): string
return MakeVoter::class;
}

public function getTestDetails()
public function getTestDetails(): \Generator
{
yield 'it_makes_voter' => [$this->createMakerTest()
->run(function (MakerTestRunner $runner) {
Expand Down

0 comments on commit dd34699

Please sign in to comment.