Skip to content

Commit 04c84ee

Browse files
Use CPP where possible
1 parent b4fa0d7 commit 04c84ee

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

MercureOptions.php

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,18 @@
1919
final class MercureOptions implements MessageOptionsInterface
2020
{
2121
private ?array $topics;
22-
private bool $private;
23-
private ?string $id;
24-
private ?string $type;
25-
private ?int $retry;
2622

2723
/**
2824
* @param string|string[]|null $topics
2925
*/
30-
public function __construct(string|array|null $topics = null, bool $private = false, ?string $id = null, ?string $type = null, ?int $retry = null)
31-
{
26+
public function __construct(
27+
string|array|null $topics = null,
28+
private bool $private = false,
29+
private ?string $id = null,
30+
private ?string $type = null,
31+
private ?int $retry = null,
32+
) {
3233
$this->topics = null !== $topics ? (array) $topics : null;
33-
$this->private = $private;
34-
$this->id = $id;
35-
$this->type = $type;
36-
$this->retry = $retry;
3734
}
3835

3936
/**

MercureTransportFactory.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,12 @@
2525
*/
2626
final class MercureTransportFactory extends AbstractTransportFactory
2727
{
28-
private HubRegistry $registry;
29-
30-
public function __construct(HubRegistry $registry, ?EventDispatcherInterface $dispatcher = null, ?HttpClientInterface $client = null)
31-
{
28+
public function __construct(
29+
private HubRegistry $registry,
30+
?EventDispatcherInterface $dispatcher = null,
31+
?HttpClientInterface $client = null,
32+
) {
3233
parent::__construct($dispatcher, $client);
33-
34-
$this->registry = $registry;
3534
}
3635

3736
public function create(Dsn $dsn): MercureTransport

0 commit comments

Comments
 (0)