Commit 3778aef8 authored by Jeremy Mikola's avatar Jeremy Mikola

Code formatting patches from Scrutinizer CI

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