Skip to content

Commit 27a06be

Browse files
committed
drop type-hints for properties where the Type constraint is used
1 parent a26d9d3 commit 27a06be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

reference/constraints/Type.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,19 @@ This will check if ``emailAddress`` is an instance of ``Symfony\Component\Mime\A
3333
class Author
3434
{
3535
#[Assert\Type(Address::class)]
36-
protected Address $emailAddress;
36+
protected $emailAddress;
3737
3838
#[Assert\Type('string')]
39-
protected string $firstName;
39+
protected $firstName;
4040
4141
#[Assert\Type(
4242
type: 'integer',
4343
message: 'The value {{ value }} is not a valid {{ type }}.',
4444
)]
45-
protected int $age;
45+
protected $age;
4646
4747
#[Assert\Type(type: ['alpha', 'digit'])]
48-
protected string $accessCode;
48+
protected $accessCode;
4949
}
5050
5151
.. code-block:: yaml

0 commit comments

Comments
 (0)