for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Bone\BoneDoctrine\Collection;
use Bone\Contracts\Collection\ApiCollectionInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Psr\Http\Message\UriInterface;
class ApiCollection extends ArrayCollection implements ApiCollectionInterface
{
private int $page;
private int $totalPages;
private UriInterface $uri;
public function __construct(array $elements, UriInterface $uri, int $page, int $totalPages, int $totalRecords)
$totalRecords
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function __construct(array $elements, UriInterface $uri, int $page, int $totalPages, /** @scrutinizer ignore-unused */ int $totalRecords)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
parent::__construct($elements);
$this->page = $page;
$this->totalPages = $totalPages;
$this->uri = $uri;
}
public function getTotalPages(): int
return $this->totalPages;
public function getUri(): UriInterface
return $this->uri;
public function getPage(): int
return $this->page;
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.