|
@@ 137-143 (lines=7) @@
|
| 134 |
|
); |
| 135 |
|
|
| 136 |
|
$completeQuery = ['running' => false]; |
| 137 |
|
foreach ($query as $key => $value) { |
| 138 |
|
if (!is_string($key)) { |
| 139 |
|
throw new \InvalidArgumentException('key in $query was not a string'); |
| 140 |
|
} |
| 141 |
|
|
| 142 |
|
$completeQuery["payload.{$key}"] = $value; |
| 143 |
|
} |
| 144 |
|
|
| 145 |
|
$completeQuery['earliestGet'] = ['$lte' => new \MongoDB\BSON\UTCDateTime((int)(microtime(true) * 1000))]; |
| 146 |
|
|
|
@@ 216-222 (lines=7) @@
|
| 213 |
|
$totalQuery['running'] = $running; |
| 214 |
|
} |
| 215 |
|
|
| 216 |
|
foreach ($query as $key => $value) { |
| 217 |
|
if (!is_string($key)) { |
| 218 |
|
throw new \InvalidArgumentException('key in $query was not a string'); |
| 219 |
|
} |
| 220 |
|
|
| 221 |
|
$totalQuery["payload.{$key}"] = $value; |
| 222 |
|
} |
| 223 |
|
|
| 224 |
|
return $this->collection->count($totalQuery); |
| 225 |
|
} |