File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
source/includes/monitoring Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 5
5
// start-command-subscriber
6
6
class MyCommandSubscriber implements MongoDB \Driver \Monitoring \CommandSubscriber
7
7
{
8
- private $ stream ;
9
-
10
- public function __construct ($ stream )
11
- {
12
- $ this ->stream = $ stream ;
13
- }
8
+ public function __construct (private $ stream ) {}
14
9
15
10
public function commandStarted (MongoDB \Driver \Monitoring \CommandStartedEvent $ event ): void
16
11
{
@@ -31,12 +26,7 @@ public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $even
31
26
// start-sdam-subscriber
32
27
class MySDAMSubscriber implements MongoDB \Driver \Monitoring \SDAMSubscriber
33
28
{
34
- private $ stream ;
35
-
36
- public function __construct ($ stream )
37
- {
38
- $ this ->stream = $ stream ;
39
- }
29
+ public function __construct (private $ stream ) {}
40
30
41
31
public function serverOpening (MongoDB \Driver \Monitoring \ServerOpeningEvent $ event ): void {
42
32
fprintf (
You can’t perform that action at this time.
0 commit comments