Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,103 +45,79 @@ abstract protected function getAddOperatorClosure(): Closure;
*/
abstract protected function addOperator(SearchOperator $operator): SearchOperator;

/** return Autocomplete&CompoundSearchOperatorInterface */
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just seen the missing @ before return.

public function autocomplete(string $path = '', string ...$query): Autocomplete
public function autocomplete(string $path = '', string ...$query): CompoundedAutocomplete
{
return $this->addOperator(new CompoundedAutocomplete($this->getCompoundStage(), $this->getAddOperatorClosure(), $this->getSearchStage(), $path, ...$query));
}

/** @return EmbeddedDocument&CompoundSearchOperatorInterface */
public function embeddedDocument(string $path = ''): EmbeddedDocument
public function embeddedDocument(string $path = ''): CompoundedEmbeddedDocument
{
return $this->addOperator(new CompoundedEmbeddedDocument($this->getCompoundStage(), $this->getAddOperatorClosure(), $this->getSearchStage(), $path));
}

/**
* @param string|int|float|ObjectId|UTCDateTime|null $value
*
* @return Equals&CompoundSearchOperatorInterface
*/
public function equals(string $path = '', $value = null): Equals
/** @param string|int|float|ObjectId|UTCDateTime|null $value */
public function equals(string $path = '', $value = null): CompoundedEquals
{
return $this->addOperator(new CompoundedEquals($this->getCompoundStage(), $this->getAddOperatorClosure(), $this->getSearchStage(), $path, $value));
}

/** @return Exists&CompoundSearchOperatorInterface */
public function exists(string $path): Exists
public function exists(string $path): CompoundedExists
{
return $this->addOperator(new CompoundedExists($this->getCompoundStage(), $this->getAddOperatorClosure(), $this->getSearchStage(), $path));
}

/**
* @param LineString|Point|Polygon|MultiPolygon|array|null $geometry
*
* @return GeoShape&CompoundSearchOperatorInterface
*/
public function geoShape($geometry = null, string $relation = '', string ...$path): GeoShape
/** @param LineString|Point|Polygon|MultiPolygon|array|null $geometry */
public function geoShape($geometry = null, string $relation = '', string ...$path): CompoundedGeoShape
{
return $this->addOperator(new CompoundedGeoShape($this->getCompoundStage(), $this->getAddOperatorClosure(), $this->getSearchStage(), $geometry, $relation, ...$path));
}

/** @return GeoWithin&CompoundSearchOperatorInterface */
public function geoWithin(string ...$path): GeoWithin
public function geoWithin(string ...$path): CompoundedGeoWithin
{
return $this->addOperator(new CompoundedGeoWithin($this->getCompoundStage(), $this->getAddOperatorClosure(), $this->getSearchStage(), ...$path));
}

/**
* @param array<string, mixed>|object $documents
*
* @return MoreLikeThis&CompoundSearchOperatorInterface
*/
public function moreLikeThis(...$documents): MoreLikeThis
/** @param array<string, mixed>|object $documents */
public function moreLikeThis(...$documents): CompoundedMoreLikeThis
{
return $this->addOperator(new CompoundedMoreLikeThis($this->getCompoundStage(), $this->getAddOperatorClosure(), $this->getSearchStage(), ...$documents));
}

/**
* @param int|float|UTCDateTime|array|Point|null $origin
* @param int|float|null $pivot
*
* @return Near&CompoundSearchOperatorInterface
*/
public function near($origin = null, $pivot = null, string ...$path): Near
public function near($origin = null, $pivot = null, string ...$path): CompoundedNear
{
return $this->addOperator(new CompoundedNear($this->getCompoundStage(), $this->getAddOperatorClosure(), $this->getSearchStage(), $origin, $pivot, ...$path));
}

/** @return Phrase&CompoundSearchOperatorInterface */
public function phrase(): Phrase
public function phrase(): CompoundedPhrase
{
return $this->addOperator(new CompoundedPhrase($this->getCompoundStage(), $this->getAddOperatorClosure(), $this->getSearchStage()));
}

/** @return QueryString&CompoundSearchOperatorInterface */
public function queryString(string $query = '', string $defaultPath = ''): QueryString
public function queryString(string $query = '', string $defaultPath = ''): CompoundedQueryString
{
return $this->addOperator(new CompoundedQueryString($this->getCompoundStage(), $this->getAddOperatorClosure(), $this->getSearchStage(), $query, $defaultPath));
}

/** @return Range&CompoundSearchOperatorInterface */
public function range(): Range
public function range(): CompoundedRange
{
return $this->addOperator(new CompoundedRange($this->getCompoundStage(), $this->getAddOperatorClosure(), $this->getSearchStage()));
}

/** @return Regex&CompoundSearchOperatorInterface */
public function regex(): Regex
public function regex(): CompoundedRegex
{
return $this->addOperator(new CompoundedRegex($this->getCompoundStage(), $this->getAddOperatorClosure(), $this->getSearchStage()));
}

/** @return Text&CompoundSearchOperatorInterface */
public function text(): Text
public function text(): CompoundedText
{
return $this->addOperator(new CompoundedText($this->getCompoundStage(), $this->getAddOperatorClosure(), $this->getSearchStage()));
}

/** @return Wildcard&CompoundSearchOperatorInterface */
public function wildcard(): Wildcard
public function wildcard(): CompoundedWildcard
{
return $this->addOperator(new CompoundedWildcard($this->getCompoundStage(), $this->getAddOperatorClosure(), $this->getSearchStage()));
}
Expand Down
Loading