Skip to content

Commit c48751b

Browse files
committed
Add description of Nullable
fixes #45
1 parent 9c0562f commit c48751b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ elements, one of type `\phpDocumentor\Reflection\Types\String_` and one of type
8181

8282
The real power of this resolver is in its capability to expand partial class names into fully qualified class names; but in order to do that we need an additional `\phpDocumentor\Reflection\Types\Context` class that will inform the resolver in which namespace the given expression occurs and which namespace aliases (or imports) apply.
8383

84+
### Resolving nullable types
85+
86+
Php 7.1 introduced nullable types e.g. `?string`. Type resolver will resolve the original type without the nullable notation `?`
87+
just like it would do without the `?`. After that the type is wrapped in a `\phpDocumentor\Reflection\Types\Nullable` object.
88+
The `Nullable` type has a method to fetch the actual type.
89+
8490
## Resolving an FQSEN
8591

8692
A Fully Qualified Structural Element Name is a reference to another element in your code bases and can be resolved using the `\phpDocumentor\Reflection\FqsenResolver` class' `resolve` method, like this:

0 commit comments

Comments
 (0)