@@ 113-119 (lines=7) @@ | ||
110 | } |
|
111 | ||
112 | $completeQuery = ['earliestGet' => ['$lte' => new UTCDateTime((int)(microtime(true) * 1000))]]; |
|
113 | foreach ($query as $key => $value) { |
|
114 | if (!is_string($key)) { |
|
115 | throw new \InvalidArgumentException('key in $query was not a string'); |
|
116 | } |
|
117 | ||
118 | $completeQuery["payload.{$key}"] = $value; |
|
119 | } |
|
120 | ||
121 | $resetTimestamp = time() + $runningResetDuration; |
|
122 | //ints overflow to floats |
|
@@ 192-198 (lines=7) @@ | ||
189 | $totalQuery['earliestGet'] = [$key => new UTCDateTime((int)(microtime(true) * 1000))]; |
|
190 | } |
|
191 | ||
192 | foreach ($query as $key => $value) { |
|
193 | if (!is_string($key)) { |
|
194 | throw new \InvalidArgumentException('key in $query was not a string'); |
|
195 | } |
|
196 | ||
197 | $totalQuery["payload.{$key}"] = $value; |
|
198 | } |
|
199 | ||
200 | return $this->collection->count($totalQuery); |
|
201 | } |