22
33namespace timgws ;
44
5- use Illuminate \Database \Query \Builder ;
65use stdClass ;
6+ use \Illuminate \Database \Query \Builder ;
7+ use \Illuminate \Database \Eloquent \Builder as EloquentBuilder ;
78use timgws \QBParseException ;
89
910class JoinSupportingQueryBuilderParser extends QueryBuilderParser
@@ -42,15 +43,15 @@ public function __construct(array $fields = null, array $joinFields = null)
4243 * Make sure that all the correct fields are in the rule object then add the expression to
4344 * the query that was given by the user to the QueryBuilder.
4445 *
45- * @param Builder $query
46- * @param stdClass $rule
47- * @param string $queryCondition the condition that will be used in the query
46+ * @param EloquentBuilder| Builder $query
47+ * @param stdClass $rule
48+ * @param string $queryCondition the condition that will be used in the query
4849 *
4950 * @throws QBParseException
5051 *
51- * @return Builder
52+ * @return EloquentBuilder| Builder
5253 */
53- protected function makeQuery (Builder $ query , stdClass $ rule , $ queryCondition = 'AND ' )
54+ protected function makeQuery (EloquentBuilder | Builder $ query , stdClass $ rule , $ queryCondition = 'AND ' )
5455 {
5556 /*
5657 * Ensure that the value is correct for the rule, return query on exception
@@ -73,10 +74,10 @@ protected function makeQuery(Builder $query, stdClass $rule, $queryCondition = '
7374 /**
7475 * Build a subquery clause if there are join fields that have been specified.
7576 *
76- * @param Builder $query
77+ * @param EloquentBuilder| Builder $query
7778 * @param stdClass $rule
7879 * @param string|null $value
79- * @return Builder the query builder object
80+ * @return EloquentBuilder| Builder the query builder object
8081 */
8182 private function buildSubclauseQuery ($ query , $ rule , $ value , $ condition )
8283 {
@@ -129,7 +130,7 @@ function(Builder $query) use ($subclause) {
129130 * @param Builder $query
130131 * @return Builder the query builder object
131132 */
132- private function buildSubclauseInnerQuery ($ subclause , Builder $ query )
133+ private function buildSubclauseInnerQuery ($ subclause , EloquentBuilder | Builder $ query )
133134 {
134135 if ($ subclause ['require_array ' ]) {
135136 return $ this ->buildRequireArrayQuery ($ subclause , $ query );
0 commit comments