Skip to content

Commit 9f0b8c1

Browse files
Fix typo
1 parent d707fcb commit 9f0b8c1

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/Provider/DoctrineProvider.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -275,32 +275,27 @@ public function findBy($data)
275275
* @return ['time', 'count']
276276
*/
277277

278-
public function counts($data)
278+
public function counts($data=null)
279279
{
280280
if (isset($data['period']) && $data['period'] !== null) {
281281
$period = $data['period'];
282282
} else {
283283
$period = self::DEFAULT_PERIOD;
284284
}
285-
286285
$sql = 'SELECT from_unixtime(floor(unix_timestamp(created)/'
287286
. $period . ') * ' . $period . ') as time,
288287
count(*) as count
289288
FROM uecode_qpush_message
290289
where queue = "' . $this->name . '"';
291-
292290
if (isset($data['from']) && $data['from'] !== null) {
293291
$sql = $sql . ' and created >= "' . $data['from'] . '"';
294292
}
295-
296293
if (isset($data['to']) && $data['to'] !== null) {
297294
$sql = $sql . ' and created <= "' . $data['to'] . '"';
298295
}
299-
300296
$sql = $sql . ' group by floor(unix_timestamp(created)/' . $period . ')';
301297
$sql = $sql . ' order by floor(unix_timestamp(created)/' . $period . ') ASC';
302-
303-
$statement = $this->em->getConnection() > prepare($sql);
298+
$statement = $this->em->getConnection()->prepare($sql);
304299
$statement->execute();
305300
$results = $statement->fetchAll();
306301

0 commit comments

Comments
 (0)