Skip to content

Commit 8967cd3

Browse files
committed
Reword
1 parent 2f2187d commit 8967cd3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

components/type_info.rst

+5-3
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ to the :class:`Symfony\\Component\\TypeInfo\\Type` static methods as following::
3636
Type::generic(Type::object(Collection::class), Type::int());
3737
Type::list(Type::bool());
3838
Type::intersection(Type::object(\Stringable::class), Type::object(\Iterator::class));
39-
Type::fromValue(1.1) // same as Type::float()
39+
// ... and more methods defined in Symfony\Component\TypeInfo\TypeFactoryTrait
4040

41-
// Many others are available and can be
42-
// found in Symfony\Component\TypeInfo\TypeFactoryTrait
41+
// you can also use a generic method that detects the type automatically
42+
Type::fromValue(1.1) // same as Type::float()
43+
Type::fromValue('...') // same as Type::string()
44+
Type::fromValue(false) // same as Type::false()
4345

4446
.. versionadded:: 7.3
4547

0 commit comments

Comments
 (0)