| Conditions | 3 |
| Paths | 1 |
| Total Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function paginate() |
||
| 21 | { |
||
| 22 | return function ( |
||
| 23 | int $perPage = 15, |
||
| 24 | string $pageName = 'page', |
||
| 25 | int $page = null, |
||
| 26 | int $total = null, |
||
| 27 | array $options = [] |
||
| 28 | ): LengthAwarePaginator { |
||
| 29 | $page = $page ?: LengthAwarePaginator::resolveCurrentPage($pageName); |
||
| 30 | |||
| 31 | $results = $this->forPage($page, $perPage); |
||
| 32 | |||
| 33 | $total = $total ?: $this->count(); |
||
| 34 | |||
| 35 | $options += [ |
||
| 36 | 'path' => LengthAwarePaginator::resolveCurrentPath(), |
||
| 37 | 'pageName' => $pageName, |
||
| 38 | ]; |
||
| 39 | |||
| 40 | return new LengthAwarePaginator($results, $total, $perPage, $page, $options); |
||
| 41 | }; |
||
| 42 | } |
||
| 43 | } |
||
| 44 |
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.