1 | <?php |
||
18 | class PaginatorFactory implements PaginatorFactoryContract |
||
19 | { |
||
20 | /** |
||
21 | * A list of query string values appended to the paginator links. |
||
22 | * |
||
23 | * @var array |
||
24 | */ |
||
25 | protected $parameters; |
||
26 | |||
27 | /** |
||
28 | * Construct the factory class. |
||
29 | * |
||
30 | * @param array $parameters |
||
31 | */ |
||
32 | 57 | public function __construct(array $parameters) |
|
36 | |||
37 | /** |
||
38 | * Make a Fractal paginator adapter from a Laravel paginator. |
||
39 | * |
||
40 | * @param \Illuminate\Contracts\Pagination\LengthAwarePaginator $paginator |
||
41 | * @return \League\Fractal\Pagination\PaginatorInterface |
||
42 | */ |
||
43 | 2 | public function make(LengthAwarePaginator $paginator): PaginatorInterface |
|
49 | |||
50 | /** |
||
51 | * Make a Fractal paginator adapter from a Laravel paginator. |
||
52 | * |
||
53 | * @param \Flugg\Responder\Pagination\CursorPaginator $paginator |
||
54 | * @return \League\Fractal\Pagination\Cursor |
||
55 | */ |
||
56 | 1 | public function makeCursor(CursorPaginator $paginator): Cursor |
|
60 | } |
||
61 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.