File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed
Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ abstract class AbstractMatchQuery implements QueryInterface
1111
1212 public function __construct (
1313 string $ field ,
14- protected string |bool $ query ,
14+ protected string |bool | int $ query ,
1515 protected ?string $ analyzer = null ,
1616 protected array $ params = [],
1717 ) {
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class MatchQuery extends AbstractMatchQuery
1414
1515 public function __construct (
1616 string $ field ,
17- string |bool $ query ,
17+ string |bool | int $ query ,
1818 ?string $ analyzer = null ,
1919 ?string $ operator = null ,
2020 ?string $ minimumShouldMatch = null ,
Original file line number Diff line number Diff line change @@ -51,4 +51,18 @@ public function testItBuildTheQueryWithBoolean(): void
5151 ],
5252 ], $ query ->build ());
5353 }
54+
55+
56+ public function testItBuildTheQueryWithIntefer (): void
57+ {
58+ $ query = new MatchQuery ('count ' , 1 );
59+
60+ $ this ->assertEquals ([
61+ 'match ' => [
62+ 'count ' => [
63+ 'query ' => 1
64+ ],
65+ ],
66+ ], $ query ->build ());
67+ }
5468}
You can’t perform that action at this time.
0 commit comments