Skip to content

Commit

Permalink
Apply review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderMuller committed Sep 13, 2024
1 parent 402f62d commit 816f8c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
12 changes: 4 additions & 8 deletions src/Eloquent/Traits/HasAdjacencyList.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,8 @@ public function isIntegerAttribute($attribute)
*/
public function newEloquentBuilder($query)
{
/** @var \Staudenmeir\LaravelAdjacencyList\Eloquent\Builder<static> $builder */
$builder = new \Staudenmeir\LaravelAdjacencyList\Eloquent\Builder($query);

return $builder;
// @phpstan-ignore return.type
return new \Staudenmeir\LaravelAdjacencyList\Eloquent\Builder($query);
}

/**
Expand All @@ -461,10 +459,8 @@ public function newEloquentBuilder($query)
*/
public function newCollection(array $models = [])
{
/** @var \Staudenmeir\LaravelAdjacencyList\Eloquent\Collection<array-key, static> $collection */
$collection = new Collection($models);

return $collection;
// @phpstan-ignore return.type
return new Collection($models);
}

/**
Expand Down
12 changes: 4 additions & 8 deletions src/Eloquent/Traits/HasGraphAdjacencyList.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,8 @@ public function isIntegerAttribute(string $attribute): bool
*/
public function newEloquentBuilder($query)
{
/** @var \Staudenmeir\LaravelAdjacencyList\Eloquent\Builder<static> $builder */
$builder = new \Staudenmeir\LaravelAdjacencyList\Eloquent\Builder($query);

return $builder;
// @phpstan-ignore return.type
return new \Staudenmeir\LaravelAdjacencyList\Eloquent\Builder($query);
}

/**
Expand All @@ -443,10 +441,8 @@ public function newEloquentBuilder($query)
*/
public function newCollection(array $models = [])
{
/** @var \Staudenmeir\LaravelAdjacencyList\Eloquent\Graph\Collection<array-key, static> $collection */
$collection = new Collection($models);

return $collection;
// @phpstan-ignore return.type
return new Collection($models);
}

/**
Expand Down

0 comments on commit 816f8c3

Please sign in to comment.