Commit 1d4376cd authored by Jeremy Mikola's avatar Jeremy Mikola

Merge pull request #557

parents 9420a3b4 3778aef8
......@@ -115,7 +115,7 @@ class ChangeStream implements Iterator
* free any reference to Watch. This will also free the only
* reference to an implicit session, since any such reference
* belongs to Watch. */
if ((string)$this->getCursorId() === '0') {
if ((string) $this->getCursorId() === '0') {
$this->resumeCallable = null;
}
} catch (RuntimeException $e) {
......@@ -138,7 +138,7 @@ class ChangeStream implements Iterator
$this->resumeToken = $this->extractResumeToken($this->csIt->current());
}
// As with next(), free the callable once we know it will never be used.
if ((string)$this->getCursorId() === '0') {
if ((string) $this->getCursorId() === '0') {
$this->resumeCallable = null;
}
} catch (RuntimeException $e) {
......
......@@ -949,7 +949,7 @@ class Collection
$options['typeMap'] = $this->typeMap;
}
if (! isset($options['writeConcern']) && \MongoDB\server_supports_feature($server, self::$wireVersionForWritableCommandWriteConcern)) {
if ( ! isset($options['writeConcern']) && \MongoDB\server_supports_feature($server, self::$wireVersionForWritableCommandWriteConcern)) {
$options['writeConcern'] = $this->writeConcern;
}
......
......@@ -29,7 +29,7 @@ class UnsupportedException extends RuntimeException
return new static('Array filters are not supported by the server executing this operation');
}
/**
/**
* Thrown when collations are not supported by a server.
*
* @return self
......@@ -39,7 +39,7 @@ class UnsupportedException extends RuntimeException
return new static('Collations are not supported by the server executing this operation');
}
/**
/**
* Thrown when explain is not supported by a server.
*
* @return self
......
......@@ -94,7 +94,7 @@ class BulkWrite implements Executable
*
* This is not supported for server versions < 3.6 and will result in an
* exception at execution time if used.
*
*
* Supported options for the bulk write operation:
*
* * bypassDocumentValidation (boolean): If true, allows the write to
......
......@@ -180,7 +180,7 @@ class CountDocuments implements Executable
$pipeline[] = ['$limit' => $this->options['limit']];
}
$pipeline[] = ['$group' => [ '_id' => null, 'n' => ['$sum' => 1]]];
$pipeline[] = ['$group' => ['_id' => null, 'n' => ['$sum' => 1]]];
$cmd = [
'aggregate' => $this->collectionName,
......
......@@ -327,17 +327,17 @@ class Find implements Executable, Explainable
unset($options['maxAwaitTimeMS']);
$modifierFallback = [
['allowPartialResults' , 'partial'],
['comment' , '$comment'],
['hint' , '$hint'],
['maxScan' , '$maxScan'],
['max' , '$max'],
['maxTimeMS' , '$maxTimeMS'],
['min' , '$min'],
['returnKey' , '$returnKey'],
['showRecordId' , '$showDiskLoc'],
['sort' , '$orderby'],
['snapshot' , '$snapshot'],
['allowPartialResults', 'partial'],
['comment', '$comment'],
['hint', '$hint'],
['maxScan', '$maxScan'],
['max', '$max'],
['maxTimeMS', '$maxTimeMS'],
['min', '$min'],
['returnKey', '$returnKey'],
['showRecordId', '$showDiskLoc'],
['sort', '$orderby'],
['snapshot', '$snapshot'],
];
foreach ($modifierFallback as $modifier) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment