Skip to content

Commit

Permalink
Fix code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-helmich committed Mar 27, 2018
1 parent 19e8511 commit 3c253ca
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/MockCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,16 +215,13 @@ private function updateCore(&$doc, $update)
}

foreach ($update['$inc'] ?? [] as $k => $v) {
if (array_key_exists($k, $doc) &&
is_integer($v) &&
is_integer($doc[$k])) {
if (array_key_exists($k, $doc) && is_integer($v) && is_integer($doc[$k])) {
$doc[$k] += $v;
}
}

foreach ($update['$push'] ?? [] as $k => $v) {
if (array_key_exists($k, $doc) &&
is_array($doc[$k])) {
if (array_key_exists($k, $doc) && is_array($doc[$k])) {
$doc[$k][] = $v;
}
}
Expand Down

0 comments on commit 3c253ca

Please sign in to comment.