for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Dtc\GridBundle\Grid\Pager;
use Dtc\GridBundle\Grid\Source\GridSourceInterface;
class GridSourcePager extends Pager
{
private $gridSource;
private $totalPages;
$totalPages
public function __construct(GridSourceInterface $gridSource)
$this->gridSource = $gridSource;
}
public function getCurrentPage()
$limit = $this->gridSource->getLimit();
$offset = $this->gridSource->getOffset();
if (!$limit) {
return $offset;
return ceil(($offset / $limit) + 1);
public function getTotalPages()
return $this->gridSource->getCount();
return ceil($this->gridSource->getCount() / $limit);
public function getRange($delta)
$delta
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function getRange(/** @scrutinizer ignore-unused */ $delta)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.