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