Passed
Push — master ( 01151b...3d8b44 )
by Kevin
04:44
created

ResultPaginator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 2
dl 0
loc 5
ccs 2
cts 2
cp 1
rs 10
c 1
b 0
f 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A paginate() 0 3 1
1
<?php
2
3
namespace Zenstruck\Porpaginas;
4
5
/**
6
 * @author Kevin Bond <[email protected]>
7
 */
8
trait ResultPaginator
9
{
10 7
    public function paginate(int $page = 1, int $limit = Pager::DEFAULT_LIMIT): Pager
11
    {
12 7
        return new Pager($this, $page, $limit);
0 ignored issues
show
Bug introduced by
$this of type Zenstruck\Porpaginas\ResultPaginator is incompatible with the type Zenstruck\Porpaginas\Result expected by parameter $result of Zenstruck\Porpaginas\Pager::__construct(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

12
        return new Pager(/** @scrutinizer ignore-type */ $this, $page, $limit);
Loading history...
13
    }
14
}
15