Skip to content

Commit 4d427fa

Browse files
committed
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.
1 parent 17726a3 commit 4d427fa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Types/Never_.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use phpDocumentor\Reflection\Type;
1717

1818
/**
19-
* Value Object representing the pseudo-type 'never'.
19+
* Value Object representing the return-type 'never'.
2020
*
2121
* Never is generally only used when working with return types as it signifies that the method that only
2222
* ever throw or exit.

src/Types/Void_.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use phpDocumentor\Reflection\Type;
1717

1818
/**
19-
* Value Object representing the pseudo-type 'void'.
19+
* Value Object representing the return-type 'void'.
2020
*
2121
* Void is generally only used when working with return types as it signifies that the method intentionally does not
2222
* return any value.

0 commit comments

Comments
 (0)