delboy1978uk /
bone-doctrine
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Bone\BoneDoctrine\Collection; |
||
| 6 | |||
| 7 | use Bone\Contracts\Collection\ApiCollectionInterface; |
||
| 8 | use Doctrine\Common\Collections\ArrayCollection; |
||
| 9 | use Psr\Http\Message\UriInterface; |
||
| 10 | |||
| 11 | class ApiCollection extends ArrayCollection implements ApiCollectionInterface |
||
| 12 | { |
||
| 13 | private int $page; |
||
| 14 | private int $totalPages; |
||
| 15 | private UriInterface $uri; |
||
| 16 | |||
| 17 | public function __construct(array $elements, UriInterface $uri, int $page, int $totalPages, int $totalRecords) |
||
|
0 ignored issues
–
show
|
|||
| 18 | { |
||
| 19 | parent::__construct($elements); |
||
| 20 | $this->page = $page; |
||
| 21 | $this->totalPages = $totalPages; |
||
| 22 | $this->uri = $uri; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getTotalPages(): int |
||
| 26 | { |
||
| 27 | return $this->totalPages; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function getUri(): UriInterface |
||
| 31 | { |
||
| 32 | return $this->uri; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getPage(): int |
||
| 36 | { |
||
| 37 | return $this->page; |
||
| 38 | } |
||
| 39 | } |
||
| 40 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.