Skip to content

Commit ead4cec

Browse files
committed
phpcs
1 parent f79676c commit ead4cec

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

source/includes/bson/Person.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@
55
// start-person-class
66
class Person implements MongoDB\BSON\Persistable
77
{
8-
private MongoDB\BSON\ObjectId $id;
9-
private string $name;
10-
private MongoDB\BSON\UTCDateTime $createdAt;
8+
private \MongoDB\BSON\ObjectId $id;
9+
private \MongoDB\BSON\UTCDateTime $createdAt;
1110

12-
public function __construct(string $name)
13-
{
14-
$this->id = new MongoDB\BSON\ObjectId;
15-
$this->name = $name;
16-
$this->createdAt = new MongoDB\BSON\UTCDateTime;
11+
public function __construct(private string $name) {
12+
$this->id = new \MongoDB\BSON\ObjectId();
13+
$this->createdAt = new \MongoDB\BSON\UTCDateTime();
1714
}
1815

1916
public function bsonSerialize(): array

source/includes/monitoring-logging/monitor.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,23 @@ public function commandStarted(MongoDB\Driver\Monitoring\CommandStartedEvent $ev
2121
));
2222
}
2323

24-
public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event): void {}
25-
public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event): void {}
24+
public function commandSucceeded(MongoDB\Driver\Monitoring\CommandSucceededEvent $event): void
25+
{
26+
}
27+
28+
public function commandFailed(MongoDB\Driver\Monitoring\CommandFailedEvent $event): void
29+
{
30+
}
2631
}
2732
// end-command-subscriber
2833

2934
// start-sdam-subscriber
3035
class MySDAMSubscriber implements MongoDB\Driver\Monitoring\SDAMSubscriber
3136
{
3237
/** @param resource $stream */
33-
public function __construct(private $stream) {}
38+
public function __construct(private $stream)
39+
{
40+
}
3441

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

0 commit comments

Comments
 (0)