Skip to content

Commit 41d703c

Browse files
committed
BUGFIX: Fix signature mismatch in query builders
Makes limit/from "typeless" (as in Neos.ContentRepository.Search) for consistency and to limit potential Eel issues.
1 parent 3864e3e commit 41d703c

3 files changed

Lines changed: 4 additions & 12 deletions

File tree

Classes/Search/MysqlQueryBuilder.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,6 @@ public function sortAsc(string $propertyName): QueryBuilderInterface
9393
*/
9494
public function limit($limit): QueryBuilderInterface
9595
{
96-
if ($limit !== null) {
97-
$limit = (int)$limit;
98-
}
9996
$this->limit = $limit === null ? $limit : (int)$limit;
10097
return $this;
10198
}

Classes/Search/QueryBuilderInterface.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ public function sortAsc(string $propertyName): QueryBuilderInterface;
3131
* @param int|null $limit
3232
* @return QueryBuilderInterface
3333
*/
34-
public function limit(?int $limit): QueryBuilderInterface;
34+
public function limit($limit): QueryBuilderInterface;
3535

3636
/**
3737
* Start returned results $from number results.
3838
*
3939
* @param int|null $from
4040
* @return QueryBuilderInterface
4141
*/
42-
public function from(?int $from): QueryBuilderInterface;
42+
public function from($from): QueryBuilderInterface;
4343

4444
/**
4545
* add an exact-match query for a given property
@@ -59,15 +59,13 @@ public function exactMatch(string $propertyName, $propertyValue): QueryBuilderIn
5959
*/
6060
public function like(string $propertyName, $propertyValue): QueryBuilderInterface;
6161

62-
6362
/**
6463
* add an custom query condition
6564
*
66-
* @param string $conditon
65+
* @param string $condition
6766
* @return QueryBuilderInterface
6867
*/
69-
public function customCondition(string $conditon): QueryBuilderInterface;
70-
68+
public function customCondition(string $condition): QueryBuilderInterface;
7169

7270
/**
7371
* Match the searchword against the fulltext index

Classes/Search/SqLiteQueryBuilder.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ public function sortAsc(string $propertyName): QueryBuilderInterface
8585
*/
8686
public function limit($limit): QueryBuilderInterface
8787
{
88-
if ($limit !== null) {
89-
$limit = (int)$limit;
90-
}
9188
$this->limit = $limit === null ? $limit : (int)$limit;
9289
return $this;
9390
}

0 commit comments

Comments
 (0)