Skip to content

Commit 094032f

Browse files
committed
PV feedback
1 parent 79dd9ce commit 094032f

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

source/includes/monitoring/monitor.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,7 @@
55
// start-command-subscriber
66
class MyCommandSubscriber implements MongoDB\Driver\Monitoring\CommandSubscriber
77
{
8-
private $stream;
9-
10-
public function __construct($stream)
11-
{
12-
$this->stream = $stream;
13-
}
8+
public function __construct(private $stream) {}
149

1510
public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $event): void
1611
{
@@ -31,12 +26,7 @@ public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $even
3126
// start-sdam-subscriber
3227
class MySDAMSubscriber implements MongoDB\Driver\Monitoring\SDAMSubscriber
3328
{
34-
private $stream;
35-
36-
public function __construct($stream)
37-
{
38-
$this->stream = $stream;
39-
}
29+
public function __construct(private $stream) {}
4030

4131
public function serverOpening(MongoDB\Driver\Monitoring\ServerOpeningEvent $event): void {
4232
fprintf(

0 commit comments

Comments
 (0)