From 8ee6c2844a057dd0ddd5098e6a483754559b33f7 Mon Sep 17 00:00:00 2001 From: Sander Muller Date: Wed, 4 Sep 2024 16:24:11 +0200 Subject: [PATCH] Resolve phpstan errors --- composer.json | 2 +- src/Relations/BelongsToThrough.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index f31ab44..74411c3 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "barryvdh/laravel-ide-helper": "^3.0", "larastan/larastan": "^2.9", "orchestra/testbench": "^9.0", - "phpstan/phpstan": "^1.10", + "phpstan/phpstan": "1.11.1", "phpstan/phpstan-mockery": "^1.1", "phpstan/phpstan-phpunit": "^1.4", "phpunit/phpunit": "^11.0" diff --git a/src/Relations/BelongsToThrough.php b/src/Relations/BelongsToThrough.php index 802394f..17d6b8f 100644 --- a/src/Relations/BelongsToThrough.php +++ b/src/Relations/BelongsToThrough.php @@ -310,7 +310,7 @@ public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $foreignKey = $from . '.' . $this->getFirstForeignKeyName(); - /** @var \Illuminate\Database\Eloquent\Builder<\Illuminate\Database\Eloquent\Model> $query */ + /** @var \Illuminate\Database\Eloquent\Builder $query */ $query = $query->select($columns)->whereColumn( $this->getQualifiedFirstLocalKeyName(), '=', @@ -387,6 +387,9 @@ public function getQualifiedFirstLocalKeyName() * Make a new related instance for the given model. * * @inheritDoc + * + * @param \Illuminate\Database\Eloquent\Model $parent + * @return \Illuminate\Database\Eloquent\Model */ protected function newRelatedInstanceFor(Model $parent) {