Skip to content

EloquentWhereTypeHintClosureParameterRector uses database contract on eloquent model -> relationship -> where? #421

@ghbob

Description

@ghbob

e.g.

$this->someModel
  ->someHasManyRelationship()
  ->where(...)
  ->where(function ($query)

makes the $query a Illuminate\Contracts\Database\Query\Builder

I'd expect Illuminate\Contracts\Database\Eloquent\Builder though?

A simple

Model::where(function ($query)

on the other hand is refactored to use Illuminate\Contracts\Database\Eloquent\Builder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions