Skip to content

Commit aba7506

Browse files
committed
use promoted properties
1 parent 9bc9c68 commit aba7506

5 files changed

Lines changed: 13 additions & 28 deletions

File tree

src/CurrentProcess.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,11 @@
1818

1919
final class CurrentProcess
2020
{
21-
private Halt $halt;
22-
private Handler $handler;
23-
private ?Signals $signals = null;
24-
25-
private function __construct(Halt $halt, Handler $handler)
26-
{
27-
$this->halt = $halt;
28-
$this->handler = $handler;
21+
private function __construct(
22+
private Halt $halt,
23+
private Handler $handler,
24+
private ?Signals $signals = null,
25+
) {
2926
}
3027

3128
/**

src/CurrentProcess/Signals.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@
1515

1616
final class Signals
1717
{
18-
private Handler $handler;
19-
20-
private function __construct(Handler $handler)
18+
private function __construct(private Handler $handler)
2119
{
22-
$this->handler = $handler;
2320
}
2421

2522
/**

src/Ports.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@
1313

1414
final class Ports
1515
{
16-
private Config $config;
17-
18-
private function __construct(Config $config)
16+
private function __construct(private Config $config)
1917
{
20-
$this->config = $config;
2118
}
2219

2320
/**

src/Remote.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,11 @@
1919

2020
final class Remote
2121
{
22-
private Server $server;
23-
private Config $config;
24-
private ?HttpTransport $http = null;
25-
26-
private function __construct(Server $server, Config $config)
27-
{
28-
$this->server = $server;
29-
$this->config = $config;
22+
private function __construct(
23+
private Server $server,
24+
private Config $config,
25+
private ?HttpTransport $http = null,
26+
) {
3027
}
3128

3229
/**

src/Sockets.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@
1212

1313
final class Sockets
1414
{
15-
private Config $config;
16-
17-
private function __construct(Config $config)
15+
private function __construct(private Config $config)
1816
{
19-
$this->config = $config;
2017
}
2118

2219
/**

0 commit comments

Comments
 (0)