Skip to content

Commit

Permalink
refactor: Add ArrowFunction return type #1183
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed Jan 1, 2025
1 parent e945b12 commit c2b4575
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/TransportResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function testCanRegisterTransport(): void
public function testCanResolveRegisteredTransport(): void
{
$transportFactory = m::mock(TransportFactoryInterface::class);
$arg = fn(Transport\Dsn $dsn) => $dsn->getHost() === 'localhost' and $dsn->getScheme() === 'smtp';
$arg = static fn(Transport\Dsn $dsn): bool => $dsn->getHost() === 'localhost' and $dsn->getScheme() === 'smtp';

$transportFactory->shouldReceive('supports')->once()->withArgs($arg)->andReturn(true);
$transportFactory->shouldReceive('create')->once()->withArgs($arg)
Expand All @@ -44,7 +44,7 @@ public function testCanResolveRegisteredTransport(): void
public function testCanResolveRegisteredDefaultTransport(): void
{
$transportFactory = m::mock(TransportFactoryInterface::class);
$arg = fn(Transport\Dsn $dsn) => $dsn->getHost() === 'localhost' and $dsn->getScheme() === 'smtp';
$arg = static fn(Transport\Dsn $dsn): bool => $dsn->getHost() === 'localhost' and $dsn->getScheme() === 'smtp';

$transportFactory->shouldReceive('supports')->once()->withArgs($arg)->andReturn(true);
$transportFactory->shouldReceive('create')->once()->withArgs($arg)
Expand Down

0 comments on commit c2b4575

Please sign in to comment.