Skip to content

Commit 0c03464

Browse files
committed
Fix PHPStan reports
1 parent 4b622f1 commit 0c03464

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎tests/Unit/Adapter/ClockAdapterFactoryTest.php‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
use Generator;
77
use Orisai\Clock\Adapter\ClockAdapterFactory;
88
use Orisai\Clock\Adapter\PsrToOrisaiClockAdapter;
9+
use Orisai\Clock\Adapter\SymfonyToOrisaiClockAdapter;
910
use Orisai\Clock\FrozenClock;
1011
use Orisai\Clock\SystemClock;
1112
use PHPUnit\Framework\TestCase;
1213
use Psr\Clock\ClockInterface;
1314
use Symfony\Component\Clock\ClockInterface as SymfonyClock;
1415
use Symfony\Component\Clock\NativeClock;
15-
use function class_exists;
16+
use function interface_exists;
1617

1718
final class ClockAdapterFactoryTest extends TestCase
1819
{
@@ -54,10 +55,10 @@ public function now(): DateTimeImmutable
5455
SystemClock::class,
5556
];
5657

57-
if (class_exists(SymfonyClock::class)) {
58+
if (interface_exists(SymfonyClock::class)) {
5859
yield [
5960
new NativeClock(),
60-
NativeClock::class,
61+
SymfonyToOrisaiClockAdapter::class,
6162
];
6263
}
6364
}

‎tests/Unit/FrozenClockTest.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ public function provideTimestampVariants(): Generator
6363
];
6464

6565
yield [
66-
DateTimeImmutable::createFromFormat('U', '1'),
66+
new DateTimeImmutable('@1'),
6767
1,
6868
];
6969

7070
yield [
71-
DateTime::createFromFormat('U', '1'),
71+
new DateTime('@1'),
7272
1,
7373
];
7474
}

0 commit comments

Comments
 (0)