File tree 1 file changed +5
-3
lines changed
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::
36
36
Type::generic(Type::object(Collection::class), Type::int());
37
37
Type::list(Type::bool());
38
38
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
40
40
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()
43
45
44
46
.. versionadded :: 7.3
45
47
You can’t perform that action at this time.
0 commit comments