1
0
mirror of synced 2025-01-18 22:41:43 +03:00

#1188 - removing unused variable assignments

This commit is contained in:
Marco Pivetta 2014-11-27 17:42:14 +01:00
parent af39fce6e5
commit a80117a4ee

View File

@ -118,12 +118,8 @@ class Paginator implements \Countable, \IteratorAggregate
public function count()
{
if ($this->count === null) {
$countQuery = $this->getCountQuery();
try {
$data = $countQuery->getScalarResult();
$data = array_map('current', $data);
$this->count = array_sum($data);
$this->count = array_sum(array_map('current', $this->getCountQuery()->getScalarResult()));
} catch(NoResultException $e) {
$this->count = 0;
}