File tree 1 file changed +20
-3
lines changed
1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,20 @@ class Criteria implements ParseAware
35
35
*/
36
36
public const TOTAL_COUNT_MODE_NEXT_PAGES = 2 ;
37
37
38
- private int $ page ;
39
38
40
- private ?int $ limit ;
39
+ /**
40
+ * page and limit should be mixed to allow null also
41
+ * this would prevent from generating pagination problems
42
+ *
43
+ * @var mixed
44
+ */
45
+ private $ page ;
46
+
47
+ /**
48
+ * see above
49
+ * @var mixed
50
+ */
51
+ private $ limit ;
41
52
42
53
/**
43
54
* Don't use term parameters together with query parameters.
@@ -84,7 +95,13 @@ class Criteria implements ParseAware
84
95
85
96
private array $ includes = [];
86
97
87
- public function __construct (int $ page = 1 , ?int $ limit = 25 )
98
+ /**
99
+ * Default should be null to not limit artificily
100
+ *
101
+ * @param $page
102
+ * @param $limit
103
+ */
104
+ public function __construct ($ page = null , $ limit = null )
88
105
{
89
106
$ this ->page = $ page ;
90
107
$ this ->limit = $ limit ;
You can’t perform that action at this time.
0 commit comments