Skip to content

Commit

Permalink
Merge pull request #166 from erikn69/patch-13
Browse files Browse the repository at this point in the history
Solve styleci problem
  • Loading branch information
topclaudy authored Nov 21, 2023
2 parents ad55e3e + f8cd40f commit 45f2048
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Database/Eloquent/Relations/BelongsTo.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/**
* @template TRelatedModel of \Illuminate\Database\Eloquent\Model
* @template TChildModel of \Illuminate\Database\Eloquent\Model
*
* @extends BaseBelongsTo<TRelatedModel,TChildModel>
*/
class BelongsTo extends BaseBelongsTo
Expand Down Expand Up @@ -53,7 +54,7 @@ public function associate($model)
$relationName = property_exists($this, 'relationName') ? $this->relationName : $this->relation;
if ($model instanceof Model) {
$this->child->setRelation($relationName, $model);
// proper unset // https://github.com/illuminate/database/commit/44411c7288fc7b7d4e5680cfcdaa46d348b5c981
// proper unset // https://github.com/illuminate/database/commit/44411c7288fc7b7d4e5680cfcdaa46d348b5c981
} elseif ($this->child->isDirty($this->foreignKey)) {
$this->child->unsetRelation($relationName);
}
Expand Down
1 change: 1 addition & 0 deletions src/Database/Eloquent/Relations/HasMany.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

/**
* @template TRelatedModel of \Illuminate\Database\Eloquent\Model
*
* @extends BaseHasMany<TRelatedModel>
*/
class HasMany extends BaseHasMany
Expand Down
1 change: 1 addition & 0 deletions src/Database/Eloquent/Relations/HasOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/**
* @template TRelatedModel of \Illuminate\Database\Eloquent\Model
*
* @extends BaseHasOne<TRelatedModel>
*/
class HasOne extends BaseHasOne
Expand Down

0 comments on commit 45f2048

Please sign in to comment.