1
0
mirror of synced 2025-02-02 13:31:45 +03:00

#1188 - removing unused variable assignments

This commit is contained in:
Marco Pivetta 2014-11-27 17:42:14 +01:00
parent ea3856673d
commit 2dbe28a150

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;
}