Skip to content

Commit fb29e93

Browse files
committed
Add type-hints on signatures of repository methods
1 parent 08369a9 commit fb29e93

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/Repository.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,46 +31,40 @@ public function __construct(PaginatedFinderInterface $finder)
3131

3232
/**
3333
* @param mixed $query
34-
* @param int $limit
35-
* @param array $options
3634
*
3735
* @return array
3836
*/
39-
public function find($query, $limit = null, $options = [])
37+
public function find($query, ?int $limit = null, array $options = [])
4038
{
4139
return $this->finder->find($query, $limit, $options);
4240
}
4341

4442
/**
4543
* @param mixed $query
46-
* @param int $limit
47-
* @param array $options
4844
*
4945
* @return mixed
5046
*/
51-
public function findHybrid($query, $limit = null, $options = [])
47+
public function findHybrid($query, ?int $limit = null, array $options = [])
5248
{
5349
return $this->finder->findHybrid($query, $limit, $options);
5450
}
5551

5652
/**
5753
* @param mixed $query
58-
* @param array $options
5954
*
6055
* @return \Pagerfanta\Pagerfanta
6156
*/
62-
public function findPaginated($query, $options = [])
57+
public function findPaginated($query, array $options = [])
6358
{
6459
return $this->finder->findPaginated($query, $options);
6560
}
6661

6762
/**
6863
* @param mixed $query
69-
* @param array $options
7064
*
7165
* @return Paginator\PaginatorAdapterInterface
7266
*/
73-
public function createPaginatorAdapter($query, $options = [])
67+
public function createPaginatorAdapter($query, array $options = [])
7468
{
7569
return $this->finder->createPaginatorAdapter($query, $options);
7670
}

0 commit comments

Comments
 (0)