-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip DateTime vs DateTimeImmutable vs DateTimeInterface conflicts (#54)
* add fixture with date time diff * skip date time vs date time immutable vs date time interface conflicts without any value
- Loading branch information
1 parent
1e37da5
commit 9e6a241
Showing
3 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
tests/Rules/NarrowPublicClassMethodParamTypeRule/Fixture/SkipDateTimeMix.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters