From 8263251e6d8e00cd38408d6942d0c42c35640c7e Mon Sep 17 00:00:00 2001 From: Kei Date: Mon, 13 May 2024 09:59:48 +0700 Subject: [PATCH] Fix phpdoc return types of Laravel 11 casts method (#985) --- app/Models/Url.php | 2 +- app/Models/User.php | 2 +- app/Models/Visit.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Models/Url.php b/app/Models/Url.php index b3332e6b0..1beebd619 100644 --- a/app/Models/Url.php +++ b/app/Models/Url.php @@ -48,7 +48,7 @@ class Url extends Model /** * Get the attributes that should be cast. * - * @return array + * @return array{user_id: 'integer', is_custom: 'boolean'} */ protected function casts(): array { diff --git a/app/Models/User.php b/app/Models/User.php index 3faf85cde..1accc7dbb 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -48,7 +48,7 @@ class User extends Authenticatable /** * Get the attributes that should be cast. * - * @return array + * @return array{email_verified_at: 'datetime', password: 'hashed'} */ protected function casts(): array { diff --git a/app/Models/Visit.php b/app/Models/Visit.php index 1bf14835f..d7a5d8a63 100644 --- a/app/Models/Visit.php +++ b/app/Models/Visit.php @@ -34,7 +34,7 @@ class Visit extends Model /** * Get the attributes that should be cast. * - * @return array + * @return array{is_first_click: 'boolean'} */ protected function casts(): array {