|
@@ 161-167 (lines=7) @@
|
| 158 |
|
} |
| 159 |
|
|
| 160 |
|
$completeQuery['earliestGet'] = ['$lte' => new UTCDateTime((int)(microtime(true) * 1000))]; |
| 161 |
|
foreach ($query as $key => $value) { |
| 162 |
|
if (!is_string($key)) { |
| 163 |
|
throw new \InvalidArgumentException('key in $query was not a string'); |
| 164 |
|
} |
| 165 |
|
|
| 166 |
|
$completeQuery["payload.{$key}"] = $value; |
| 167 |
|
} |
| 168 |
|
|
| 169 |
|
$resetTimestamp = time() + $runningResetDuration; |
| 170 |
|
//ints overflow to floats |
|
@@ 239-245 (lines=7) @@
|
| 236 |
|
$totalQuery['earliestGet'] = [$key => new UTCDateTime((int)(microtime(true) * 1000))]; |
| 237 |
|
} |
| 238 |
|
|
| 239 |
|
foreach ($query as $key => $value) { |
| 240 |
|
if (!is_string($key)) { |
| 241 |
|
throw new \InvalidArgumentException('key in $query was not a string'); |
| 242 |
|
} |
| 243 |
|
|
| 244 |
|
$totalQuery["payload.{$key}"] = $value; |
| 245 |
|
} |
| 246 |
|
|
| 247 |
|
return $this->collection->count($totalQuery); |
| 248 |
|
} |