-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,15 +8,20 @@ | |
use Illuminate\Database\Query\JoinClause; | ||
use ReflectionClass; | ||
|
||
/** @template TModel of Model */ | ||
class EloquentJoinClause extends JoinClause | ||
{ | ||
/** | ||
* The model associated to this join. | ||
* | ||
* @var TModel | ||
*/ | ||
public Model $model; | ||
|
||
/** | ||
* The eloquent query representing this join. | ||
* | ||
* @var Eloquent<Model> | ||
*/ | ||
public Eloquent $eloquent; | ||
Check failure on line 26 in src/EloquentJoinClause.php GitHub Actions / Static Analysis (8.2)
Check failure on line 26 in src/EloquentJoinClause.php GitHub Actions / Static Analysis (8.3)
Check failure on line 26 in src/EloquentJoinClause.php GitHub Actions / Static Analysis (8.4)
|
||
|
||
|
@@ -27,6 +32,8 @@ class EloquentJoinClause extends JoinClause | |
|
||
/** | ||
* Create a new join clause instance. | ||
* | ||
* @param TModel $model | ||
*/ | ||
public function __construct(JoinClause $parentJoin, Model $model) | ||
{ | ||
|
@@ -74,6 +81,8 @@ public function applyScopes(): static | |
|
||
/** | ||
* Returns a new query builder for the model's table. | ||
* | ||
* @return Eloquent<TModel> | ||
*/ | ||
public function newEloquentQuery(): Eloquent | ||
Check failure on line 87 in src/EloquentJoinClause.php GitHub Actions / Static Analysis (8.2)
Check failure on line 87 in src/EloquentJoinClause.php GitHub Actions / Static Analysis (8.3)
Check failure on line 87 in src/EloquentJoinClause.php GitHub Actions / Static Analysis (8.4)
|
||
{ | ||
|
@@ -84,6 +93,8 @@ public function newEloquentQuery(): Eloquent | |
|
||
/** | ||
* Returns a new eloquent builder that doesn't have any global scopes or eager loading. | ||
* | ||
* @return Eloquent<TModel> | ||
*/ | ||
public function newModelQuery(): Eloquent | ||
Check failure on line 99 in src/EloquentJoinClause.php GitHub Actions / Static Analysis (8.2)
Check failure on line 99 in src/EloquentJoinClause.php GitHub Actions / Static Analysis (8.3)
Check failure on line 99 in src/EloquentJoinClause.php GitHub Actions / Static Analysis (8.4)
|
||
{ | ||
|
@@ -92,9 +103,12 @@ public function newModelQuery(): Eloquent | |
|
||
/** | ||
* Returns a new eloquent builder for this join clause. | ||
* | ||
* @return Eloquent<TModel> | ||
*/ | ||
public function newEloquentBuilder(): Eloquent | ||
Check failure on line 109 in src/EloquentJoinClause.php GitHub Actions / Static Analysis (8.2)
Check failure on line 109 in src/EloquentJoinClause.php GitHub Actions / Static Analysis (8.3)
Check failure on line 109 in src/EloquentJoinClause.php GitHub Actions / Static Analysis (8.4)
|
||
{ | ||
/** @var Eloquent<TModel> */ | ||
return new Eloquent($this); | ||
Check failure on line 112 in src/EloquentJoinClause.php GitHub Actions / Static Analysis (8.2)
Check failure on line 112 in src/EloquentJoinClause.php GitHub Actions / Static Analysis (8.3)
Check failure on line 112 in src/EloquentJoinClause.php GitHub Actions / Static Analysis (8.4)
|
||
} | ||
|
||
|