Skip to content

Commit

Permalink
add fixture with date time diff
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jan 3, 2025
1 parent 1e37da5 commit 7f94900
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

declare(strict_types=1);

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

final class SkipDateTimeMix
{
public function markDate(
\DateTimeInterface $date
): bool
{
return true;
}

static public function run(): void
{
$skipDateTimeMix = new SkipDateTimeMix();
$skipDateTimeMix->markDate(
new \DateTimeImmutable('15:30')
);
}
}
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/SkipDateTimeMix.php'], []];
yield [[__DIR__ . '/Fixture/SkipNonPublicClassMethod.php'], []];

// skip first class callables as anything can be passed there
Expand Down

0 comments on commit 7f94900

Please sign in to comment.