Skip to content

Commit 030a3db

Browse files
committed
First fixes
1 parent 9b5226b commit 030a3db

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

source/includes/connect/ca-dir.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<?php
2+
13
$uri = 'mongodb://<hostname>:<port>';
24

35
$uriOptions = [

source/includes/connect/connection-options.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<?php
2+
13
// start-connection-uri
24
// Replace the placeholders with your actual hostname, port, and path to the certificate key file
35
$uri = "mongodb://<hostname>:<port>/?tls=true&tlsCertificateKeyFile=/path/to/file.pem";

source/includes/connect/crl-file.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<?php
2+
13
$uri = 'mongodb://<hostname>:<port>';
24

35
$uriOptions = [

source/includes/indexes/indexes.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
// end-index-compound
3939

4040
// start-compound-query
41-
$document = $collection->findOne(
42-
['title' => ['$regex' => 'Sunrise'],
43-
'year' => ['$gte' => 1990]]
44-
);
41+
$document = $collection->findOne([
42+
'title' => ['$regex' => 'Sunrise'],
43+
'year' => ['$gte' => 1990]
44+
]);
4545
echo json_encode($document), PHP_EOL;
4646
// end-compound-query
4747

@@ -123,4 +123,4 @@
123123

124124
// start-delete-search-index
125125
$collection->dropSearchIndex('mySearchIdx');
126-
// end-delete-search-index
126+
// end-delete-search-index

source/includes/monitoring/sdam.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
// start-mysubscriber
66
class MySubscriber implements MongoDB\Driver\Monitoring\SDAMSubscriber
77
{
8+
/** @var resource */
89
private $stream;
910

11+
/** @param resource $stream */
1012
public function __construct($stream)
1113
{
1214
$this->stream = $stream;
@@ -46,4 +48,4 @@ public function topologyOpening(MongoDB\Driver\Monitoring\TopologyOpeningEvent $
4648

4749
// start-remove-sub
4850
$client->removeSubscriber($subscriber);
49-
// end-remove-sub
51+
// end-remove-sub

0 commit comments

Comments
 (0)