Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve type hints in ModelNotFoundException #41068

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/Illuminate/Database/Eloquent/ModelNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ class ModelNotFoundException extends RecordsNotFoundException
/**
* Name of the affected Eloquent model.
*
* @var string
* @var class-string<\Illuminate\Database\Eloquent\Model>
*/
protected $model;

/**
* The affected model IDs.
*
* @var int|array
* @var array<int>|array<string>
*/
protected $ids;

/**
* Set the affected Eloquent model and instance ids.
*
* @param string $model
* @param int|array $ids
* @param class-string<\Illuminate\Database\Eloquent\Model> $model
* @param int|array<int>|string|array<string> $ids
* @return $this
*/
public function setModel($model, $ids = [])
Expand All @@ -47,7 +47,7 @@ public function setModel($model, $ids = [])
/**
* Get the affected Eloquent model.
*
* @return string
* @return class-string<\Illuminate\Database\Eloquent\Model>
*/
public function getModel()
{
Expand All @@ -57,7 +57,7 @@ public function getModel()
/**
* Get the affected Eloquent model IDs.
*
* @return int|array
* @return array<int>|array<string>
*/
public function getIds()
{
Expand Down