From 789606b41f1024c2da506bb6765d2fbfa85897cd Mon Sep 17 00:00:00 2001 From: Mohammad Alavi Date: Sun, 4 Jun 2023 23:12:29 +0330 Subject: [PATCH] feat!: add type --- Traits/HashIdTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Traits/HashIdTrait.php b/Traits/HashIdTrait.php index 439f8f60..ebafa1c4 100644 --- a/Traits/HashIdTrait.php +++ b/Traits/HashIdTrait.php @@ -20,10 +20,10 @@ trait HashIdTrait * * Will be used by the Eloquent Models (since it's used as trait there). * - * @param null $field The field of the model to be hashed + * @param string|null $field The field of the model to be hashed * @return string|null */ - public function getHashedKey($field = null): ?string + public function getHashedKey(?string $field = null): ?string { // if no key is set, use the default key name (i.e., id) if ($field === null) {