Commit cf7d7ae7 authored by Renato Moura's avatar Renato Moura

Fix CodeStyle

fix #798
parent 37398d2e
...@@ -49,12 +49,12 @@ class Collection ...@@ -49,12 +49,12 @@ class Collection
$query = []; $query = [];
// Convert the query paramters to a json string. // Convert the query paramters to a json string.
array_walk_recursive($parameters, function (&$item, $key){ array_walk_recursive($parameters, function (&$item, $key) {
if ($item instanceof \MongoDB\BSON\ObjectID) { if ($item instanceof \MongoDB\BSON\ObjectID) {
$item = (string) $item; $item = (string) $item;
} }
}); });
foreach ($parameters as $parameter) { foreach ($parameters as $parameter) {
try { try {
$query[] = json_encode($parameter); $query[] = json_encode($parameter);
......
...@@ -26,7 +26,7 @@ class CollectionTest extends TestCase ...@@ -26,7 +26,7 @@ class CollectionTest extends TestCase
$connection->expects($this->once())->method('logging')->willReturn(true); $connection->expects($this->once())->method('logging')->willReturn(true);
$connection->expects($this->once())->method('getElapsedTime')->willReturn($time); $connection->expects($this->once())->method('getElapsedTime')->willReturn($time);
$connection->expects($this->once())->method('logQuery')->with($queryString, [], $time); $connection->expects($this->once())->method('logQuery')->with($queryString, [], $time);
$collection = new Collection($connection, $mongoCollection); $collection = new Collection($connection, $mongoCollection);
$this->assertEquals($return, $collection->findOne($where)); $this->assertEquals($return, $collection->findOne($where));
......
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