Skip to content

Commit e5411c1

Browse files
authored
PHPLIB-1046: Fix snooty errors in documentation (#1010)
* Remove literal code blocks * Fix minor errors in documentation * Add missing code-block directives * Fix more docs errors * Fix wrong backticks style
1 parent 8b82bda commit e5411c1

File tree

113 files changed

+446
-183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+446
-183
lines changed

source/includes/apiargs-MongoDBDatabase-method-createCollection-option.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,10 @@ description: |
143143
collection.
144144
145145
The ``indexOptionDefaults`` option accepts a ``storageEngine`` document,
146-
which should take the following form::
146+
which should take the following form:
147147
148+
.. code-block:: none
149+
148150
{ <storage-engine-name>: <options> }
149151
150152
Storage engine configurations specified when creating indexes are validated
@@ -212,8 +214,10 @@ description: |
212214
213215
Allows users to specify configuration to the storage engine on a
214216
per-collection basis when creating a collection. The value of the
215-
``storageEngine`` option should take the following form::
217+
``storageEngine`` option should take the following form:
216218
219+
.. code-block:: none
220+
217221
{ <storage-engine-name>: <options> }
218222
219223
Storage engine configurations specified when creating collections are

source/reference/class/MongoDBCollection.txt

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Definition
2323
select a collection from the library's :phpclass:`MongoDB\\Client` or
2424
:phpclass:`MongoDB\\Database` classes. A collection may also be cloned from
2525
an existing :phpclass:`MongoDB\\Collection` object via the
26-
:phpmethod:`withOptions() <MongoDB\\Collection::withOptions>` method.
26+
:phpmethod:`withOptions() <MongoDB\\Collection::withOptions()>` method.
2727

2828
:phpclass:`MongoDB\\Collection` supports the :php:`readConcern
2929
<mongodb-driver-readconcern>`, :php:`readPreference
@@ -41,17 +41,16 @@ Definition
4141
Type Map Limitations
4242
--------------------
4343

44-
The :manual:`aggregate </reference/command/aggregate>` (when not using a
45-
cursor), :manual:`distinct </reference/command/distinct>`, and
46-
:manual:`findAndModify </reference/command/findAndModify>` helpers do not
47-
support a ``typeMap`` option due to a driver limitation. The
48-
:phpmethod:`aggregate() <MongoDB\\Collection::aggregate>`,
49-
:phpmethod:`distinct() <MongoDB\\Collection::distinct>`,
50-
:phpmethod:`findOneAndReplace() <MongoDB\\Collection::findOneAndReplace>`,
51-
:phpmethod:`findOneAndUpdate() <MongoDB\\Collection::findOneAndUpdate>`, and
52-
:phpmethod:`findOneAndDelete() <MongoDB\\Collection::findOneAndDelete>`
53-
methods return BSON documents as `stdClass` objects and BSON arrays as
54-
arrays.
44+
The :manual:`aggregate </reference/command/aggregate>` (when not using a
45+
cursor), :manual:`distinct </reference/command/distinct>`, and
46+
:manual:`findAndModify </reference/command/findAndModify>` helpers do not
47+
support a ``typeMap`` option due to a driver limitation. The
48+
:phpmethod:`aggregate() <MongoDB\\Collection::aggregate()>`,
49+
:phpmethod:`distinct() <MongoDB\\Collection::distinct()>`,
50+
:phpmethod:`findOneAndReplace() <MongoDB\\Collection::findOneAndReplace()>`,
51+
:phpmethod:`findOneAndUpdate() <MongoDB\\Collection::findOneAndUpdate()>`, and
52+
:phpmethod:`findOneAndDelete() <MongoDB\\Collection::findOneAndDelete()>`
53+
methods return BSON documents as ``stdClass`` objects and BSON arrays as arrays.
5554

5655
Methods
5756
-------

source/reference/class/MongoDBDatabase.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Definition
2222
:php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>` class or
2323
select a database from the library's :phpclass:`MongoDB\\Client` class. A
2424
database may also be cloned from an existing :phpclass:`MongoDB\\Database`
25-
object via the :phpmethod:`withOptions() <MongoDB\\Database::withOptions>`
25+
object via the :phpmethod:`withOptions() <MongoDB\\Database::withOptions()>`
2626
method.
2727

2828
:phpclass:`MongoDB\\Database` supports the :php:`readConcern

source/reference/class/MongoDBGridFSBucket.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Definition
2525
You can construct a GridFS bucket using the driver's
2626
:php:`Manager <class.mongodb-driver-manager>` class, or select a bucket from
2727
the library's :phpclass:`MongoDB\\Database` class via the
28-
:phpmethod:`selectGridFSBucket() <MongoDB\\Database::selectGridFSBucket>`
28+
:phpmethod:`selectGridFSBucket() <MongoDB\\Database::selectGridFSBucket()>`
2929
method.
3030

3131
Methods

source/reference/method/MongoDBChangeStream-getCursorId.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ This example reports the cursor ID for a change stream.
4343

4444
var_dump($changeStream->getCursorId());
4545

46-
The output would then resemble::
46+
The output would then resemble:
47+
48+
.. code-block:: none
4749

4850
object(MongoDB\Driver\CursorId)#5 (1) {
4951
["id"]=>

source/reference/method/MongoDBClient-dropDatabase.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ The following example drops the ``test`` database:
5858

5959
var_dump($result);
6060

61-
The output would then resemble::
61+
The output would then resemble:
62+
63+
.. code-block:: none
6264

6365
object(MongoDB\Model\BSONDocument)#8 (1) {
6466
["storage":"ArrayObject":private]=>

source/reference/method/MongoDBClient-getReadConcern.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ Example
4141

4242
var_dump($client->getReadConcern());
4343

44-
The output would then resemble::
44+
The output would then resemble:
45+
46+
.. code-block:: none
4547

4648
object(MongoDB\Driver\ReadConcern)#5 (1) {
4749
["level"]=>

source/reference/method/MongoDBClient-getReadPreference.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ Example
4242

4343
var_dump($client->getReadPreference());
4444

45-
The output would then resemble::
45+
The output would then resemble:
46+
47+
.. code-block:: none
4648

4749
object(MongoDB\Driver\ReadPreference)#5 (1) {
4850
["mode"]=>

source/reference/method/MongoDBClient-getTypeMap.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ Example
4545

4646
var_dump($client->getTypeMap());
4747

48-
The output would then resemble::
48+
The output would then resemble:
49+
50+
.. code-block:: none
4951

5052
array(3) {
5153
["root"]=>

source/reference/method/MongoDBClient-getWriteConcern.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ Example
4242

4343
var_dump($client->getWriteConcern());
4444

45-
The output would then resemble::
45+
The output would then resemble:
46+
47+
.. code-block:: none
4648

4749
object(MongoDB\Driver\WriteConcern)#4 (1) {
4850
["j"]=>

0 commit comments

Comments
 (0)