Skip to content

Commit 1f941df

Browse files
committed
add readonly to properties
1 parent 3d1aa24 commit 1f941df

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/Adapter/BlackfireOnMessageAdapter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
final class BlackfireOnMessageAdapter implements OnMessageInterface
1818
{
1919
public function __construct(
20-
private OnMessageInterface $onRequest,
21-
private Client $client,
22-
private Configuration $config = new Configuration(),
23-
private LoggerInterface $logger = new NullLogger()
20+
private readonly OnMessageInterface $onRequest,
21+
private readonly Client $client,
22+
private readonly Configuration $config = new Configuration(),
23+
private readonly LoggerInterface $logger = new NullLogger()
2424
) {}
2525

2626
public function __invoke(WorkermanTcpConnection $workermanTcpConnection, WorkermanRequest $workermanRequest): void

src/Adapter/NewRelicOnMessageAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
final class NewRelicOnMessageAdapter implements OnMessageInterface
1212
{
13-
public function __construct(private OnMessageInterface $onRequest, private string $appname) {}
13+
public function __construct(private readonly OnMessageInterface $onRequest, private readonly string $appname) {}
1414

1515
public function __invoke(WorkermanTcpConnection $workermanTcpConnection, WorkermanRequest $workermanRequest): void
1616
{

src/OnMessage.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
final class OnMessage implements OnMessageInterface
1212
{
1313
public function __construct(
14-
private PsrRequestFactoryInterface $psrRequestFactory,
15-
private WorkermanResponseEmitterInterface $workermanResponseEmitter,
16-
private RequestHandlerInterface $requestHander
14+
private readonly PsrRequestFactoryInterface $psrRequestFactory,
15+
private readonly WorkermanResponseEmitterInterface $workermanResponseEmitter,
16+
private readonly RequestHandlerInterface $requestHander
1717
) {}
1818

1919
public function __invoke(WorkermanTcpConnection $workermanTcpConnection, WorkermanRequest $workermanRequest): void

src/PsrRequestFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
final class PsrRequestFactory implements PsrRequestFactoryInterface
1616
{
1717
public function __construct(
18-
private ServerRequestFactoryInterface $serverRequestFactory,
19-
private StreamFactoryInterface $streamFactory,
20-
private UploadedFileFactoryInterface $uploadedFileFactory
18+
private readonly ServerRequestFactoryInterface $serverRequestFactory,
19+
private readonly StreamFactoryInterface $streamFactory,
20+
private readonly UploadedFileFactoryInterface $uploadedFileFactory
2121
) {}
2222

2323
public function create(WorkermanTcpConnection $workermanTcpConnection, WorkermanRequest $workermanRequest): ServerRequestInterface

0 commit comments

Comments
 (0)