From 4d427faba4583d244def085610e39f90fe5a4f3e Mon Sep 17 00:00:00 2001 From: Jaapio Date: Fri, 17 Sep 2021 17:20:15 +0200 Subject: [PATCH] Improve docs about return only types Void and never are types that can only be used for function return types. Officially php doesn't have a category of types that are only allowed for return, but I think it makes sense to name them like this. --- src/Types/Never_.php | 2 +- src/Types/Void_.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Types/Never_.php b/src/Types/Never_.php index e5752eb..40a99c9 100644 --- a/src/Types/Never_.php +++ b/src/Types/Never_.php @@ -16,7 +16,7 @@ use phpDocumentor\Reflection\Type; /** - * Value Object representing the pseudo-type 'never'. + * Value Object representing the return-type 'never'. * * Never is generally only used when working with return types as it signifies that the method that only * ever throw or exit. diff --git a/src/Types/Void_.php b/src/Types/Void_.php index 3836bdc..23a601d 100644 --- a/src/Types/Void_.php +++ b/src/Types/Void_.php @@ -16,7 +16,7 @@ use phpDocumentor\Reflection\Type; /** - * Value Object representing the pseudo-type 'void'. + * Value Object representing the return-type 'void'. * * Void is generally only used when working with return types as it signifies that the method intentionally does not * return any value.