Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-mongodb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
laravel-mongodb
Commits
cf7d7ae7
Commit
cf7d7ae7
authored
Mar 30, 2016
by
Renato Moura
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CodeStyle
fix #798
parent
37398d2e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
Collection.php
src/Jenssegers/Mongodb/Collection.php
+2
-2
CollectionTest.php
tests/CollectionTest.php
+1
-1
No files found.
src/Jenssegers/Mongodb/Collection.php
View file @
cf7d7ae7
...
...
@@ -49,12 +49,12 @@ class Collection
$query
=
[];
// 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
)
{
$item
=
(
string
)
$item
;
}
});
foreach
(
$parameters
as
$parameter
)
{
try
{
$query
[]
=
json_encode
(
$parameter
);
...
...
tests/CollectionTest.php
View file @
cf7d7ae7
...
...
@@ -26,7 +26,7 @@ class CollectionTest extends TestCase
$connection
->
expects
(
$this
->
once
())
->
method
(
'logging'
)
->
willReturn
(
true
);
$connection
->
expects
(
$this
->
once
())
->
method
(
'getElapsedTime'
)
->
willReturn
(
$time
);
$connection
->
expects
(
$this
->
once
())
->
method
(
'logQuery'
)
->
with
(
$queryString
,
[],
$time
);
$collection
=
new
Collection
(
$connection
,
$mongoCollection
);
$this
->
assertEquals
(
$return
,
$collection
->
findOne
(
$where
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment