Skip to content

Commit f31ff6b

Browse files
Narrow existing return types on private/internal/final/test methods
1 parent 78d5a24 commit f31ff6b

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

GatewayApiTransportFactory.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,13 @@
1414
use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
1515
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
1616
use Symfony\Component\Notifier\Transport\Dsn;
17-
use Symfony\Component\Notifier\Transport\TransportInterface;
1817

1918
/**
2019
* @author Piergiuseppe Longo <[email protected]>
2120
*/
2221
final class GatewayApiTransportFactory extends AbstractTransportFactory
2322
{
24-
/**
25-
* @return GatewayApiTransport
26-
*/
27-
public function create(Dsn $dsn): TransportInterface
23+
public function create(Dsn $dsn): GatewayApiTransport
2824
{
2925
$scheme = $dsn->getScheme();
3026

Tests/GatewayApiTransportFactoryTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,14 @@
44

55
use Symfony\Component\Notifier\Bridge\GatewayApi\GatewayApiTransportFactory;
66
use Symfony\Component\Notifier\Test\TransportFactoryTestCase;
7-
use Symfony\Component\Notifier\Transport\TransportFactoryInterface;
87

98
/**
109
* @author Piergiuseppe Longo <[email protected]>
1110
* @author Oskar Stark <[email protected]>
1211
*/
1312
final class GatewayApiTransportFactoryTest extends TransportFactoryTestCase
1413
{
15-
/**
16-
* @return GatewayApiTransportFactory
17-
*/
18-
public function createFactory(): TransportFactoryInterface
14+
public function createFactory(): GatewayApiTransportFactory
1915
{
2016
return new GatewayApiTransportFactory();
2117
}

Tests/GatewayApiTransportTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use Symfony\Component\Notifier\Message\SentMessage;
1010
use Symfony\Component\Notifier\Message\SmsMessage;
1111
use Symfony\Component\Notifier\Test\TransportTestCase;
12-
use Symfony\Component\Notifier\Transport\TransportInterface;
1312
use Symfony\Contracts\HttpClient\HttpClientInterface;
1413
use Symfony\Contracts\HttpClient\ResponseInterface;
1514

@@ -19,10 +18,7 @@
1918
*/
2019
final class GatewayApiTransportTest extends TransportTestCase
2120
{
22-
/**
23-
* @return GatewayApiTransport
24-
*/
25-
public function createTransport(HttpClientInterface $client = null): TransportInterface
21+
public function createTransport(HttpClientInterface $client = null): GatewayApiTransport
2622
{
2723
return new GatewayApiTransport('authtoken', 'Symfony', $client ?? $this->createMock(HttpClientInterface::class));
2824
}

0 commit comments

Comments
 (0)