|
34 | 34 | * @method string getQualifiedLocalKeyName() |
35 | 35 | * @method string getExistenceCompareKey() |
36 | 36 | * @mixin \Illuminate\Database\Eloquent\Relations\Relation |
| 37 | + * @mixin \Illuminate\Database\Eloquent\Relations\HasOneOrMany |
| 38 | + * @mixin \Illuminate\Database\Eloquent\Relations\BelongsToMany |
37 | 39 | * @property EloquentBuilder $query |
38 | 40 | * @property \Illuminate\Database\Eloquent\Model $parent |
39 | 41 | * @property \Illuminate\Database\Eloquent\Model $throughParent |
@@ -105,7 +107,7 @@ protected function performJoinForEloquentPowerJoinsForBelongsTo(): \Closure |
105 | 107 | */ |
106 | 108 | protected function performJoinForEloquentPowerJoinsForBelongsToMany(): \Closure |
107 | 109 | { |
108 | | - return function ($builder, $joinType, $callback = null, $alias = null, bool $disableExtraConditions = false): static { |
| 110 | + return function (EloquentBuilder $builder, string $joinType, $callback = null, $alias = null, bool $disableExtraConditions = false): static { |
109 | 111 | [$alias1, $alias2] = $alias; |
110 | 112 |
|
111 | 113 | $joinedTable = $alias1 ?: $this->getTable(); |
@@ -161,7 +163,7 @@ protected function performJoinForEloquentPowerJoinsForBelongsToMany(): \Closure |
161 | 163 | */ |
162 | 164 | protected function performJoinForEloquentPowerJoinsForMorphToMany(): \Closure |
163 | 165 | { |
164 | | - return function ($builder, $joinType, $callback = null, $alias = null, bool $disableExtraConditions = false): static { |
| 166 | + return function (EloquentBuilder $builder, string $joinType, $callback = null, $alias = null, bool $disableExtraConditions = false): static { |
165 | 167 | [$alias1, $alias2] = $alias; |
166 | 168 |
|
167 | 169 | $joinedTable = $alias1 ?: $this->getTable(); |
@@ -217,7 +219,7 @@ protected function performJoinForEloquentPowerJoinsForMorphToMany(): \Closure |
217 | 219 | */ |
218 | 220 | protected function performJoinForEloquentPowerJoinsForMorph(): \Closure |
219 | 221 | { |
220 | | - return function (Builder $builder, $joinType, $callback = null, $alias = null, bool $disableExtraConditions = false) { |
| 222 | + return function (Builder $builder, string $joinType, $callback = null, $alias = null, bool $disableExtraConditions = false) { |
221 | 223 | $builder->{$joinType}($this->getModel()->getTable(), function (PowerJoinClause $join) use ($callback, $disableExtraConditions) { |
222 | 224 | $join->on( |
223 | 225 | "{$this->getModel()->getTable()}.{$this->getForeignKeyName()}", |
@@ -247,7 +249,7 @@ protected function performJoinForEloquentPowerJoinsForMorph(): \Closure |
247 | 249 | */ |
248 | 250 | protected function performJoinForEloquentPowerJoinsForMorphTo() :\Closure |
249 | 251 | { |
250 | | - return function (Builder $builder, $joinType, $callback = null, $alias = null, bool $disableExtraConditions = false, string $morphable = null) { |
| 252 | + return function (Builder $builder, string $joinType, $callback = null, $alias = null, bool $disableExtraConditions = false, string $morphable = null) { |
251 | 253 | $modelInstance = new $morphable; |
252 | 254 |
|
253 | 255 | $builder->{$joinType}($modelInstance->getTable(), function ($join) use ($modelInstance, $callback, $disableExtraConditions) { |
@@ -279,7 +281,7 @@ protected function performJoinForEloquentPowerJoinsForMorphTo() :\Closure |
279 | 281 | */ |
280 | 282 | protected function performJoinForEloquentPowerJoinsForHasMany(): \Closure |
281 | 283 | { |
282 | | - return function ($builder, $joinType, $callback = null, $alias = null, bool $disableExtraConditions = false): void { |
| 284 | + return function (EloquentBuilder $builder, string $joinType, callable $callback = null, $alias = null, bool $disableExtraConditions = false): void { |
283 | 285 | $joinedTable = $alias ?: $this->getQuery()->getModel()->getTable(); |
284 | 286 | $parentTable = StaticCache::getTableOrAliasForModel($this->parent); |
285 | 287 | $isOneOfMany = method_exists($this, 'isOneOfMany') ? $this->isOneOfMany() : false; |
@@ -325,7 +327,7 @@ protected function performJoinForEloquentPowerJoinsForHasMany(): \Closure |
325 | 327 | */ |
326 | 328 | protected function performJoinForEloquentPowerJoinsForHasManyThrough(): \Closure |
327 | 329 | { |
328 | | - return function ($builder, $joinType, $callback = null, $alias = null, bool $disableExtraConditions = false): static { |
| 330 | + return function (EloquentBuilder $builder, string $joinType, $callback = null, $alias = null, bool $disableExtraConditions = false): static { |
329 | 331 | [$alias1, $alias2] = $alias; |
330 | 332 | $throughTable = $alias1 ?: $this->getThroughParent()->getTable(); |
331 | 333 | $farTable = $alias2 ?: $this->getModel()->getTable(); |
|
0 commit comments