Skip to content

Commit

Permalink
Update CanEagerLoadTrait.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad-Alavi committed Dec 7, 2024
1 parent ab23aed commit 71c6942
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Traits/CanEagerLoadTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ protected function eagerLoadRequestedIncludes(): void
});
}

// TODO: rename this method or maybe keep the name but dont return null.
// Returning null causes multiple if() guard clauses as you can see
private function filterInvalidRelations(Builder|Model $model, array $relationParts): string|null
{
if (empty($relationParts)) {
Expand Down

0 comments on commit 71c6942

Please sign in to comment.