| Conditions | 3 |
| Paths | 1 |
| Total Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function paginate() |
||
| 20 | { |
||
| 21 | return function ( |
||
| 22 | int $perPage = 15, |
||
| 23 | string $pageName = 'page', |
||
| 24 | int $page = null, |
||
| 25 | int $total = null, |
||
| 26 | array $options = [] |
||
| 27 | ): LengthAwarePaginator { |
||
| 28 | $page = $page ?: LengthAwarePaginator::resolveCurrentPage($pageName); |
||
| 29 | |||
| 30 | $results = $this->forPage($page, $perPage); |
||
| 31 | |||
| 32 | $total = $total ?: $this->count(); |
||
| 33 | |||
| 34 | $options += [ |
||
| 35 | 'path' => LengthAwarePaginator::resolveCurrentPath(), |
||
| 36 | 'pageName' => $pageName, |
||
| 37 | ]; |
||
| 38 | |||
| 39 | return new LengthAwarePaginator($results, $total, $perPage, $page, $options); |
||
| 40 | }; |
||
| 41 | } |
||
| 42 | } |
||
| 43 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.