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