Skip to content

Commit 15a50b5

Browse files
committed
Minor tweaks
1 parent 3780287 commit 15a50b5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

components/type_info.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,17 @@ based on reflection or a simple string::
6363

6464
// Type instances have several helper methods
6565

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)
6868
// and for compound types (e.g. int|string) it throws an exception because both types
6969
// can be considered the main one, so there's no way to pick one
7070
$baseType = $type->getBaseType();
7171

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;
7373
// in this example, the collection is a list, so it returns and "int" Type instance
7474
$keyType = $type->getCollectionKeyType();
7575

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)
7777
// the following code will return true
7878
$isValueNullable = $type->getCollectionValueType()->isNullable();
7979

0 commit comments

Comments
 (0)