Skip to content

Commit

Permalink
add test fixture to skip default parameter value
Browse files Browse the repository at this point in the history
  • Loading branch information
scollovati committed Jan 10, 2025
1 parent dc19a23 commit 4bfbe3e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

declare(strict_types=1);

namespace Rector\TypePerfect\Tests\Rules\NarrowPublicClassMethodParamTypeRule\Fixture;

final class SkipDefault
{
public function dontSetParamValue(
string $Id
): bool
{
return true;
}

static public function run(): void
{
$skipDefault = new SkipDefault();
$skipDefault->dontSetParamValue();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function testRule(array $filePaths, array $expectedErrorsWithLines): void

public static function provideData(): Iterator
{
yield [[__DIR__ . '/Fixture/SkipDefault.php'], []];
yield [[__DIR__ . '/Fixture/SkipResource.php'], []];
yield [[__DIR__ . '/Fixture/SkipDateTimeMix.php'], []];
yield [[__DIR__ . '/Fixture/SkipNonPublicClassMethod.php'], []];
Expand Down

0 comments on commit 4bfbe3e

Please sign in to comment.