diff --git a/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php b/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php index 0664e80780b..c62ce076b92 100644 --- a/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php +++ b/src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php @@ -58,9 +58,11 @@ trait HasRelationships /** * Get the dynamic relation resolver if defined or inherited, or return null. * - * @param string $class + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * + * @param class-string $class * @param string $key - * @return mixed + * @return Closure|null */ public function relationResolver($class, $key) { @@ -851,8 +853,10 @@ public function getMorphClass() /** * Create a new model instance for a related model. * - * @param string $class - * @return mixed + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * + * @param class-string $class + * @return TRelatedModel */ protected function newRelatedInstance($class) { @@ -866,8 +870,10 @@ protected function newRelatedInstance($class) /** * Create a new model instance for a related "through" model. * - * @param string $class - * @return mixed + * @template TRelatedModel of \Illuminate\Database\Eloquent\Model + * + * @param class-string $class + * @return TRelatedModel */ protected function newRelatedThroughInstance($class) {