Skip to content

Commit

Permalink
#1188 - removing unused variable assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Nov 27, 2014
1 parent af39fce commit a80117a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/Doctrine/ORM/Tools/Pagination/Paginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,8 @@ public function setUseOutputWalkers($useOutputWalkers)
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;
}
Expand Down

0 comments on commit a80117a

Please sign in to comment.