Skip to content

Commit 58ec252

Browse files
committed
JM feedback 2
1 parent d29b6c5 commit 58ec252

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

source/includes/aggregation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
$cursor = $collection->aggregate($pipeline);
1818

1919
foreach ($cursor as $doc) {
20-
echo json_encode($doc) . PHP_EOL;
20+
echo json_encode($doc) , PHP_EOL;
2121
}
2222
// end-match-group
2323

@@ -35,6 +35,6 @@
3535
);
3636

3737
$result = $collection->explain($aggregate);
38-
echo json_encode($result) . PHP_EOL;
38+
echo json_encode($result) , PHP_EOL;
3939
// end-explain
4040

source/includes/read/limit-skip-sort.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
);
1818

1919
foreach ($cursor as $doc) {
20-
echo json_encode($doc) . PHP_EOL;
20+
echo json_encode($doc) , PHP_EOL;
2121
}
2222
// end-limit
2323

@@ -29,7 +29,7 @@
2929
);
3030

3131
foreach ($cursor as $doc) {
32-
echo json_encode($doc) . PHP_EOL;
32+
echo json_encode($doc) , PHP_EOL;
3333
}
3434
// end-sort
3535

@@ -41,7 +41,7 @@
4141
);
4242

4343
foreach ($cursor as $doc) {
44-
echo json_encode($doc) . PHP_EOL;
44+
echo json_encode($doc) , PHP_EOL;
4545
}
4646
// end-skip
4747

@@ -56,7 +56,7 @@
5656

5757
$cursor = $collection->find(['cuisine' => 'Italian'], $options);
5858
foreach ($cursor as $doc) {
59-
echo json_encode($doc) . PHP_EOL;
59+
echo json_encode($doc) , PHP_EOL;
6060
}
6161
// end-limit-sort-skip
6262

source/includes/read/project.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
$cursor = $collection->find(['name' => 'Emerald Pub'], $options);
2323
foreach ($cursor as $doc) {
24-
echo json_encode($doc) . PHP_EOL;
24+
echo json_encode($doc) , PHP_EOL;
2525
}
2626
// end-project-include
2727

@@ -39,7 +39,7 @@
3939

4040
$cursor = $collection->find(['name' => 'Emerald Pub'], $options);
4141
foreach ($cursor as $doc) {
42-
echo json_encode($doc) . PHP_EOL;
42+
echo json_encode($doc) , PHP_EOL;
4343
}
4444
// end-project-include-without-id
4545

@@ -54,6 +54,6 @@
5454

5555
$cursor = $collection->find(['name' => 'Emerald Pub'], $options);
5656
foreach ($cursor as $doc) {
57-
echo json_encode($doc) . PHP_EOL;
57+
echo json_encode($doc) , PHP_EOL;
5858
}
5959
// end-project-exclude

source/includes/read/retrieve.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Finds one document with a "name" value of "LinkedIn"
1212
// start-find-one
1313
$document = $collection->findOne(['name' => 'LinkedIn']);
14-
echo json_encode($document) . "\n";
14+
echo json_encode($document) , "\n";
1515
// end-find-one
1616

1717
// Finds documents with a "founded_year" value of 1970
@@ -22,7 +22,7 @@
2222
// Prints documents with a "founded_year" value of 1970
2323
// start-cursor
2424
foreach ($results as $doc) {
25-
echo json_encode($doc) . "\n";
25+
echo json_encode($doc) , "\n";
2626
}
2727
// end-cursor
2828

@@ -34,6 +34,6 @@
3434
);
3535

3636
foreach ($results as $doc) {
37-
echo json_encode($doc) . "\n";
37+
echo json_encode($doc) , "\n";
3838
}
3939
// end-modify

source/includes/read/specify-queries.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,23 @@
5050
// start-find-exact
5151
$cursor = $collection->find(['color' => 'yellow']);
5252
foreach ($cursor as $doc) {
53-
echo json_encode($doc) . PHP_EOL;
53+
echo json_encode($doc) , PHP_EOL;
5454
}
5555
// end-find-exact
5656

5757
// Retrieves all documents in the collection
5858
// start-find-all
5959
$cursor = $collection->find([]);
6060
foreach ($cursor as $doc) {
61-
echo json_encode($doc) . PHP_EOL;
61+
echo json_encode($doc) , PHP_EOL;
6262
}
6363
// end-find-all
6464

6565
// Retrieves and prints documents in which the "rating" value is greater than 2
6666
// start-find-comparison
6767
$cursor = $collection->find(['rating' => ['$gt' => 2]]);
6868
foreach ($cursor as $doc) {
69-
echo json_encode($doc) . PHP_EOL;
69+
echo json_encode($doc) , PHP_EOL;
7070
}
7171
// end-find-comparison
7272

@@ -79,30 +79,30 @@
7979
]
8080
]);
8181
foreach ($cursor as $doc) {
82-
echo json_encode($doc) . PHP_EOL;
82+
echo json_encode($doc) , PHP_EOL;
8383
}
8484
// end-find-logical
8585

8686
// Retrieves and prints documents in which the "type" array has 2 elements
8787
// start-find-array
8888
$cursor = $collection->find(['type' => ['$size' => 2]]);
8989
foreach ($cursor as $doc) {
90-
echo json_encode($doc) . PHP_EOL;
90+
echo json_encode($doc) , PHP_EOL;
9191
}
9292
// end-find-array
9393

9494
// Retrieves and prints documents that have a "color" field
9595
// start-find-element
9696
$cursor = $collection->find(['color' => ['$exists' => true]]);
9797
foreach ($cursor as $doc) {
98-
echo json_encode($doc) . PHP_EOL;
98+
echo json_encode($doc) , PHP_EOL;
9999
}
100100
// end-find-element
101101

102102
// Retrieves and prints documents in which the "name" value has at least two consecutive "p" characters
103103
// start-find-evaluation
104104
$cursor = $collection->find(['name' => ['$regex' => 'p{2,}']]);
105105
foreach ($cursor as $doc) {
106-
echo json_encode($doc) . PHP_EOL;
106+
echo json_encode($doc) , PHP_EOL;
107107
}
108108
// end-find-evaluation

0 commit comments

Comments
 (0)