diff --git a/system/Common.php b/system/Common.php index e6fc862fa102..2a98253cb6b4 100644 --- a/system/Common.php +++ b/system/Common.php @@ -817,11 +817,12 @@ function log_message(string $level, string $message, array $context = []) /** * More simple way of getting model instances from Factories * - * @template T of Model + * @template ModelTemplate of Model * - * @param class-string $name + * @param class-string|string $name * - * @return T + * @return ModelTemplate|null + * @phpstan-return ($name is class-string ? ModelTemplate : object|null) */ function model(string $name, bool $getShared = true, ?ConnectionInterface &$conn = null) {