File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -63,17 +63,17 @@ based on reflection or a simple string::
63
63
64
64
// Type instances have several helper methods
65
65
66
- // returns the main type (e.g. in this example ir returns an "array" Type instance)
67
- // for nullable types (e.g. string|null) returns the non-null type (e.g. string)
66
+ // returns the main type (e.g. in this example i returns an "array" Type instance);
67
+ // for nullable types (e.g. string|null) it returns the non-null type (e.g. string)
68
68
// and for compound types (e.g. int|string) it throws an exception because both types
69
69
// can be considered the main one, so there's no way to pick one
70
70
$baseType = $type->getBaseType();
71
71
72
- // for collections, it returns the type of the item used as the key
72
+ // for collections, it returns the type of the item used as the key;
73
73
// in this example, the collection is a list, so it returns and "int" Type instance
74
74
$keyType = $type->getCollectionKeyType();
75
75
76
- // you can chain the utility methods e.g. to introspect the values of the collection
76
+ // you can chain the utility methods ( e.g. to introspect the values of the collection)
77
77
// the following code will return true
78
78
$isValueNullable = $type->getCollectionValueType()->isNullable();
79
79
You can’t perform that action at this time.
0 commit comments