File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments