Skip to content

Commit 52ebf0d

Browse files
Add types to public and protected properties
1 parent e416f03 commit 52ebf0d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Test/TransportFactoryTestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ abstract class TransportFactoryTestCase extends TestCase
3131
protected const USER = 'u$er';
3232
protected const PASSWORD = 'pa$s';
3333

34-
protected $dispatcher;
35-
protected $client;
36-
protected $logger;
34+
protected EventDispatcherInterface $dispatcher;
35+
protected HttpClientInterface $client;
36+
protected LoggerInterface $logger;
3737

3838
abstract public function getFactory(): TransportFactoryInterface;
3939

Transport/AbstractHttpTransport.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
*/
2525
abstract class AbstractHttpTransport extends AbstractTransport
2626
{
27-
protected $host;
28-
protected $port;
29-
protected $client;
27+
protected ?string $host = null;
28+
protected ?int $port = null;
29+
protected ?HttpClientInterface $client;
3030

3131
public function __construct(HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
3232
{

Transport/AbstractTransportFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
*/
2222
abstract class AbstractTransportFactory implements TransportFactoryInterface
2323
{
24-
protected $dispatcher;
25-
protected $client;
26-
protected $logger;
24+
protected ?EventDispatcherInterface $dispatcher;
25+
protected ?HttpClientInterface $client;
26+
protected ?LoggerInterface $logger;
2727

2828
public function __construct(EventDispatcherInterface $dispatcher = null, HttpClientInterface $client = null, LoggerInterface $logger = null)
2929
{

0 commit comments

Comments
 (0)