diff --git a/src/Models/Entry.php b/src/Models/Entry.php index 9a6c4be03aac5fdf7fe1968168d0b1e4b25642a6..6c3546a93f50ead45eef153b02244a3f76449ebd 100644 --- a/src/Models/Entry.php +++ b/src/Models/Entry.php @@ -98,7 +98,7 @@ class Entry extends Model implements EntryContract * @param Model|null $model * @return $this */ - public function by(Model $model = null) + public function by(?Model $model = null) { $this->participant()->associate($model); diff --git a/src/Models/Survey.php b/src/Models/Survey.php index a2d92a4a705d05eaf66e43f15242d649ec3ecb20..58dfcafdd630a08e58a2653ca33f00a57711c21e 100644 --- a/src/Models/Survey.php +++ b/src/Models/Survey.php @@ -113,7 +113,7 @@ class Survey extends Model implements SurveyContract * @param Model $participant * @return \Illuminate\Database\Eloquent\Relations\HasMany */ - public function lastEntry(Model $participant = null) + public function lastEntry(?Model $participant = null) { return $participant === null ? null : $this->entriesFrom($participant)->first(); } @@ -124,7 +124,7 @@ class Survey extends Model implements SurveyContract * @param Model|null $model * @return bool */ - public function isEligible(Model $participant = null) + public function isEligible(?Model $participant = null) { if ($participant === null) { return $this->acceptsGuestEntries(); diff --git a/tests/TestCase.php b/tests/TestCase.php index a62cf6903879dd84097ba79e0d76ffaf458694f7..35468da7265dd048130e5df294e46f07a0057410 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -62,7 +62,7 @@ class TestCase extends Orchestra * @param User|null $user * @return User */ - protected function signIn(User $user = null) + protected function signIn(?User $user = null) { $user = $user ?? User::forceCreate([ 'name' => 'John',