Total Complexity | 3 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | trait LimitAwareOperationTrait |
||
11 | { |
||
12 | /** |
||
13 | * @var int The result offset. |
||
14 | */ |
||
15 | protected $offset = 0; |
||
16 | |||
17 | /** |
||
18 | * @var int|null The result limit. |
||
19 | */ |
||
20 | protected $limit; |
||
21 | |||
22 | /** |
||
23 | * Registers the result offset with this object. |
||
24 | * |
||
25 | * @param integer $offset The result offset. |
||
26 | * @return mixed An implementation of this trait. |
||
27 | */ |
||
28 | 7 | final public function setOffset(int $offset) |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * Registers the result limit with this object. |
||
36 | * |
||
37 | * @param integer|null $limit The result limit. |
||
38 | * @return mixed An implementation of this trait. |
||
39 | */ |
||
40 | 9 | final public function setLimit(?int $limit) |
|
44 | } |
||
45 | |||
46 | 3 | public function toArray(): array |
|
53 |