Skip to content

Commit 824fe18

Browse files
committed
Update example
1 parent 2366c95 commit 824fe18

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

docs/examples/aws-lambda/index.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66

77
$uri = getenv('MONGODB_URI') ?: throw new RuntimeException('The MONGODB_URI environment variable is not set');
88
$client = new Client($uri);
9-
$planets = $client->sample_guides->planets
10-
->find(
11-
[],
12-
['sort' => ['orderFromSun' => 1]],
13-
);
9+
$planets = $client
10+
->selectCollection('sample_guides', 'planets')
11+
->find([], ['sort' => ['orderFromSun' => 1]]);
1412

1513
?>
1614
<!DOCTYPE html>

phpcs.xml.dist

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@
8383
<exclude name="SlevomatCodingStandard.ControlStructures.BlockControlStructureSpacing.IncorrectLinesCountAfterControlStructure">
8484
<exclude-pattern>docs/examples/*/index.php</exclude-pattern>
8585
</exclude>
86-
<exclude name="Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps">
87-
<exclude-pattern>docs/examples/*/index.php</exclude-pattern>
88-
</exclude>
8986
</rule>
9087

9188

0 commit comments

Comments
 (0)