File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ class Criteria implements ParseAware
37
37
38
38
private int $ page ;
39
39
40
- private int $ limit ;
40
+ private ? int $ limit ;
41
41
42
42
/**
43
43
* Don't use term parameters together with query parameters.
@@ -84,7 +84,7 @@ class Criteria implements ParseAware
84
84
85
85
private array $ includes = [];
86
86
87
- public function __construct (int $ page = 1 , int $ limit = 25 )
87
+ public function __construct (int $ page = 1 , ? int $ limit = 25 )
88
88
{
89
89
$ this ->page = $ page ;
90
90
$ this ->limit = $ limit ;
@@ -307,9 +307,7 @@ public function parse(): array
307
307
$ params ['page ' ] = $ this ->page ;
308
308
}
309
309
310
- if ($ this ->limit ) {
311
- $ params ['limit ' ] = $ this ->limit ;
312
- }
310
+ $ params ['limit ' ] = $ this ->limit ;
313
311
314
312
if ($ this ->term !== null ) {
315
313
$ params ['term ' ] = $ this ->term ;
@@ -391,12 +389,12 @@ public function setPage(int $page): void
391
389
$ this ->page = $ page ;
392
390
}
393
391
394
- public function getLimit (): int
392
+ public function getLimit (): ? int
395
393
{
396
394
return $ this ->limit ;
397
395
}
398
396
399
- public function setLimit (int $ limit ): void
397
+ public function setLimit (? int $ limit ): void
400
398
{
401
399
$ this ->limit = $ limit ;
402
400
}
You can’t perform that action at this time.
0 commit comments