Skip to content

Commit 919eafe

Browse files
committed
Model docs update
WIP
1 parent 379e418 commit 919eafe

File tree

2 files changed

+44
-18
lines changed

2 files changed

+44
-18
lines changed

src/Eloquent/Docs/ModelDocs.php

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
namespace PDPhilip\Elasticsearch\Eloquent\Docs;
66

7-
use Closure;
8-
use Illuminate\Contracts\Database\Query\Expression;
97
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
108
use Illuminate\Pagination\Cursor;
119
use PDPhilip\Elasticsearch\Eloquent\Builder;
@@ -17,25 +15,57 @@
1715
* Query Builder Methods ---------------------------------
1816
*
1917
* @method static Builder query()
20-
* @method static $this where(array|Closure|Expression|string $column, $operator = null, $value = null, $boolean = 'and', $options = [])
21-
* @method static $this whereIn(string $column, array $values, $options = [])
22-
* @method static $this whereExact(string $column, string $value, $boolean = 'and', $options = [])
18+
* @method static $this where($column, $operator = null, $value = null, $boolean = 'and', $options = [])
19+
* @method static $this whereNot($column, $operator = null, $value = null, $boolean = 'and', $options = [])
20+
* @method static $this orWhere($column, $operator = null, $value = null, $options = [])
21+
* @method static $this orWhereNot($column, $operator = null, $value = null, $options = [])
22+
* @method static $this whereRaw($dsl, $bindings = [], $boolean = 'and', $options = [])
23+
* @method static $this whereIn($column, $values, $boolean = 'and', $not = false, $options = [])
24+
* @method static $this whereNotIn($column, $values, $boolean = 'and', $options = [])
25+
* @method static $this orWhereIn($column, $values, $options = [])
26+
* @method static $this orWhereNotIn($column, $values, $options = [])
27+
* @method static $this whereNull($columns, $boolean = 'and', $not = false)
28+
* @method static $this whereNotNull($columns, $boolean = 'and')
29+
* @method static $this orWhereNull($columns)
30+
* @method static $this orWhereNotNull($columns)
31+
* @method static $this whereExact($column, $value, $boolean = 'and', $not = false, $options = [])
32+
* @method static $this whereNotExact($column, $value, $options = [])
33+
* @method static $this orWhereExact($column, $value, $options = [])
34+
* @method static $this orWhereNotExact($column, $value, $options = [])
35+
* @method static $this whereTermExists($column, $boolean = 'and', $not = false)
36+
* @method static $this whereNotTermExists($column)
37+
* @method static $this orWhereTermExists($column)
38+
* @method static $this orWhereNotTermsExists($column)
39+
* @method static $this whereFuzzy($column, $value, $boolean = 'and', $not = false, $options = [])
40+
* @method static $this whereNotFuzzy($column, $value, $options = [])
41+
* @method static $this orWhereFuzzy($column, $value, $options = [])
42+
* @method static $this orWhereNotFuzzy($column, $value, $options = [])
43+
* @method static $this wherePrefix($column, $value, $boolean = 'and', $not = false, $options = [])
44+
* @method static $this whereNotPrefix($column, $value, $options = [])
45+
* @method static $this orWherePrefix($column, $value, $options = [])
46+
* @method static $this orWhereNotPrefix($column, $value, $options = [])
47+
* @method static $this whereGeoBox($field, array $topLeft, array $bottomRight, $validationMethod = null, $boolean = 'and', bool $not = false)
48+
* @method static $this whereNotGeoBox($field, array $topLeft, array $bottomRight, $validationMethod = null)
49+
* @method static $this orWhereGeoBox($field, array $topLeft, array $bottomRight, $validationMethod = null)
50+
* @method static $this orWhereNotGeoBox($field, array $topLeft, array $bottomRight, $validationMethod = null)
51+
* @method static $this whereGeoDistance($field, string $distance, array $location, $distanceType = null, $validationMethod = null, $boolean = 'and', bool $not = false)
52+
* @method static $this whereNotGeoDistance($field, string $distance, array $location, $distanceType = null, $validationMethod = null)
53+
* @method static $this orWhereGeoDistance($field, string $distance, array $location, $distanceType = null, $validationMethod = null)
54+
* @method static $this orWhereNotGeoDistance($field, string $distance, array $location, $distanceType = null, $validationMethod = null)
55+
* @method static $this whereNestedObject($column, $query, $filterInnerHits = false, $options = [], $boolean = 'and', $not = false)
56+
* @method static $this whereNotNestedObject($column, $query, $filterInnerHits = false, $options = [])
57+
* @method static $this orWhereNestedObject($column, $query, $filterInnerHits = false, $options = [])
58+
* @method static $this orWhereNotNestedObject($column, $query, $filterInnerHits = false, $options = [])
2359
* @method static $this wherePhrase(string $column, string $value, $boolean = 'and', $options = [])
2460
* @method static $this wherePhrasePrefix(string $column, string $value, $boolean = 'and', $options = [])
2561
* @method static $this whereDate($column, $operator = null, $value = null, $boolean = 'and', $options = [])
2662
* @method static $this whereTimestamp($column, $operator = null, $value = null, $boolean = 'and', $options = [])
2763
* @method static $this whereRegex(string $column, string $regex, $options = [])
28-
* @method static $this orWhere(array|Closure|Expression|string $column, $operator = null, $value = null, $options = [])
29-
* @method static $this orWhereIn(string $column, array $values, $options = [])
30-
* @method static $this orWhereExact(string $column, string $value, $options = [])
3164
* @method static $this orWherePhrase(string $column, string $value, $options = [])
3265
* @method static $this orWherePhrasePrefix(string $column, string $value, $options = [])
3366
* @method static $this orWhereDate($column, $operator = null, $value = null, $options = [])
3467
* @method static $this orWhereTimestamp($column, $operator = null, $value = null, $options = [])
3568
* @method static $this orWhereRegex(string $column, string $regex, $options = [])
36-
* @method static $this whereNestedObject(string $column, Callable $callback, string $scoreType = 'avg', $options = [])
37-
* @method static $this whereNotNestedObject(string $column, Callable $callback, string $scoreType = 'avg', $options = [])
38-
* @method static $this queryNested(string $column, Callable $callback, $options = [])
3969
*
4070
* Filter and order methods ---------------------------------
4171
* @method static $this orderBy(string $column, string $direction = 'asc')
@@ -63,17 +93,14 @@
6393
* @method static $this orSearchPhrasePrefix($phrase, $fields = ['*'], $options = [])
6494
* @method static $this orSearchBoolPrefix($phrase, $fields = ['*'], $options = [])
6595
* @method static $this highlight(array $fields = [], string|array $preTag = '<em>', string|array $postTag = '</em>', array $globalOptions = [])
66-
* @method static $this asFuzzy(?int $depth = null)
67-
* @method static $this setMinShouldMatch(int $value)
68-
* @method static $this setBoost(int $value)
96+
* @method static $this withoutRefresh()
6997
*
7098
* Query Executors --------------------------------------------
7199
* @method static Model|null find($id)
72100
* @method static array getModels(array $columns = ['*'])
73101
* @method static ElasticCollection get(array $columns = ['*'])
74102
* @method static Model|null first(array $columns = ['*'])
75103
* @method static Model firstOrCreate(array $attributes, array $values = [])
76-
* @method static Model firstOrCreateWithoutRefresh(array $attributes, array $values = [])
77104
* @method static int|array sum(array|string $columns)
78105
* @method static int|array min(array|string $columns)
79106
* @method static int|array max(array|string $columns)
@@ -82,7 +109,6 @@
82109
* @method static LengthAwarePaginator paginate(int $perPage = 15, array $columns = ['*'], string $pageName = 'page', ?int $page = null, ?int $total = null)
83110
* @method static SearchAfterPaginator cursorPaginate(int|null $perPage = null, array $columns = [], string $cursorName = 'cursor', ?Cursor $cursor = null)
84111
* @method static ElasticCollection insert($values, $returnData = null):
85-
* @method static ElasticCollection insertWithoutRefresh($values, $returnData = null)
86112
* @method static array toDsl(array $columns = ['*'])
87113
* @method static array toSql(array $columns = ['*'])
88114
* @method static mixed rawDsl(array $bodyParams)

src/Query/Builder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,12 +1031,12 @@ public function whereNotTermExists($column)
10311031
return $this->whereTermExists($column, 'and', true);
10321032
}
10331033

1034-
public function orWhereTermExists($column, $options = [])
1034+
public function orWhereTermExists($column)
10351035
{
10361036
return $this->whereTermExists($column, 'or', false);
10371037
}
10381038

1039-
public function orWhereNotTermsExists($column, $options = [])
1039+
public function orWhereNotTermsExists($column)
10401040
{
10411041
return $this->whereTermExists($column, 'or', true);
10421042
}

0 commit comments

Comments
 (0)