@@ -45,103 +45,79 @@ abstract protected function getAddOperatorClosure(): Closure;
45
45
*/
46
46
abstract protected function addOperator (SearchOperator $ operator ): SearchOperator ;
47
47
48
- /** return Autocomplete&CompoundSearchOperatorInterface */
49
- public function autocomplete (string $ path = '' , string ...$ query ): Autocomplete
48
+ public function autocomplete (string $ path = '' , string ...$ query ): Autocomplete &CompoundSearchOperatorInterface
50
49
{
51
50
return $ this ->addOperator (new CompoundedAutocomplete ($ this ->getCompoundStage (), $ this ->getAddOperatorClosure (), $ this ->getSearchStage (), $ path , ...$ query ));
52
51
}
53
52
54
- /** @return EmbeddedDocument&CompoundSearchOperatorInterface */
55
- public function embeddedDocument (string $ path = '' ): EmbeddedDocument
53
+ public function embeddedDocument (string $ path = '' ): EmbeddedDocument &CompoundSearchOperatorInterface
56
54
{
57
55
return $ this ->addOperator (new CompoundedEmbeddedDocument ($ this ->getCompoundStage (), $ this ->getAddOperatorClosure (), $ this ->getSearchStage (), $ path ));
58
56
}
59
57
60
- /**
61
- * @param string|int|float|ObjectId|UTCDateTime|null $value
62
- *
63
- * @return Equals&CompoundSearchOperatorInterface
64
- */
65
- public function equals (string $ path = '' , $ value = null ): Equals
58
+ /** @param string|int|float|ObjectId|UTCDateTime|null $value */
59
+ public function equals (string $ path = '' , $ value = null ): Equals &CompoundSearchOperatorInterface
66
60
{
67
61
return $ this ->addOperator (new CompoundedEquals ($ this ->getCompoundStage (), $ this ->getAddOperatorClosure (), $ this ->getSearchStage (), $ path , $ value ));
68
62
}
69
63
70
- /** @return Exists&CompoundSearchOperatorInterface */
71
- public function exists (string $ path ): Exists
64
+ public function exists (string $ path ): Exists &CompoundSearchOperatorInterface
72
65
{
73
66
return $ this ->addOperator (new CompoundedExists ($ this ->getCompoundStage (), $ this ->getAddOperatorClosure (), $ this ->getSearchStage (), $ path ));
74
67
}
75
68
76
- /**
77
- * @param LineString|Point|Polygon|MultiPolygon|array|null $geometry
78
- *
79
- * @return GeoShape&CompoundSearchOperatorInterface
80
- */
81
- public function geoShape ($ geometry = null , string $ relation = '' , string ...$ path ): GeoShape
69
+ /** @param LineString|Point|Polygon|MultiPolygon|array<string, mixed>|null $geometry */
70
+ public function geoShape ($ geometry = null , string $ relation = '' , string ...$ path ): GeoShape &CompoundSearchOperatorInterface
82
71
{
83
72
return $ this ->addOperator (new CompoundedGeoShape ($ this ->getCompoundStage (), $ this ->getAddOperatorClosure (), $ this ->getSearchStage (), $ geometry , $ relation , ...$ path ));
84
73
}
85
74
86
- /** @return GeoWithin&CompoundSearchOperatorInterface */
87
- public function geoWithin (string ...$ path ): GeoWithin
75
+ public function geoWithin (string ...$ path ): GeoWithin &CompoundSearchOperatorInterface
88
76
{
89
77
return $ this ->addOperator (new CompoundedGeoWithin ($ this ->getCompoundStage (), $ this ->getAddOperatorClosure (), $ this ->getSearchStage (), ...$ path ));
90
78
}
91
79
92
- /**
93
- * @param array<string, mixed>|object $documents
94
- *
95
- * @return MoreLikeThis&CompoundSearchOperatorInterface
96
- */
97
- public function moreLikeThis (...$ documents ): MoreLikeThis
80
+ /** @param array<string, mixed>|object $documents */
81
+ public function moreLikeThis (...$ documents ): MoreLikeThis &CompoundSearchOperatorInterface
98
82
{
99
83
return $ this ->addOperator (new CompoundedMoreLikeThis ($ this ->getCompoundStage (), $ this ->getAddOperatorClosure (), $ this ->getSearchStage (), ...$ documents ));
100
84
}
101
85
102
86
/**
103
- * @param int|float|UTCDateTime|array|Point|null $origin
104
- * @param int|float|null $pivot
105
- *
106
- * @return Near&CompoundSearchOperatorInterface
87
+ * @param int|float|UTCDateTime|array<string, mixed>|Point|null $origin
88
+ * @param int|float|null $pivot
107
89
*/
108
- public function near ($ origin = null , $ pivot = null , string ...$ path ): Near
90
+ public function near ($ origin = null , $ pivot = null , string ...$ path ): Near & CompoundSearchOperatorInterface
109
91
{
110
92
return $ this ->addOperator (new CompoundedNear ($ this ->getCompoundStage (), $ this ->getAddOperatorClosure (), $ this ->getSearchStage (), $ origin , $ pivot , ...$ path ));
111
93
}
112
94
113
- /** @return Phrase&CompoundSearchOperatorInterface */
114
- public function phrase (): Phrase
95
+ public function phrase (): Phrase &CompoundSearchOperatorInterface
115
96
{
116
97
return $ this ->addOperator (new CompoundedPhrase ($ this ->getCompoundStage (), $ this ->getAddOperatorClosure (), $ this ->getSearchStage ()));
117
98
}
118
99
119
- /** @return QueryString&CompoundSearchOperatorInterface */
120
- public function queryString (string $ query = '' , string $ defaultPath = '' ): QueryString
100
+ public function queryString (string $ query = '' , string $ defaultPath = '' ): QueryString &CompoundSearchOperatorInterface
121
101
{
122
102
return $ this ->addOperator (new CompoundedQueryString ($ this ->getCompoundStage (), $ this ->getAddOperatorClosure (), $ this ->getSearchStage (), $ query , $ defaultPath ));
123
103
}
124
104
125
- /** @return Range&CompoundSearchOperatorInterface */
126
- public function range (): Range
105
+ public function range (): Range &CompoundSearchOperatorInterface
127
106
{
128
107
return $ this ->addOperator (new CompoundedRange ($ this ->getCompoundStage (), $ this ->getAddOperatorClosure (), $ this ->getSearchStage ()));
129
108
}
130
109
131
- /** @return Regex&CompoundSearchOperatorInterface */
132
- public function regex (): Regex
110
+ public function regex (): Regex &CompoundSearchOperatorInterface
133
111
{
134
112
return $ this ->addOperator (new CompoundedRegex ($ this ->getCompoundStage (), $ this ->getAddOperatorClosure (), $ this ->getSearchStage ()));
135
113
}
136
114
137
- /** @return Text&CompoundSearchOperatorInterface */
138
- public function text (): Text
115
+ public function text (): Text &CompoundSearchOperatorInterface
139
116
{
140
117
return $ this ->addOperator (new CompoundedText ($ this ->getCompoundStage (), $ this ->getAddOperatorClosure (), $ this ->getSearchStage ()));
141
118
}
142
119
143
- /** @return Wildcard&CompoundSearchOperatorInterface */
144
- public function wildcard (): Wildcard
120
+ public function wildcard (): Wildcard &CompoundSearchOperatorInterface
145
121
{
146
122
return $ this ->addOperator (new CompoundedWildcard ($ this ->getCompoundStage (), $ this ->getAddOperatorClosure (), $ this ->getSearchStage ()));
147
123
}
0 commit comments