From f5980f06e9b69855e5730b134e20f5370d370e1a Mon Sep 17 00:00:00 2001 From: Thomas Bisignani Date: Thu, 15 Nov 2018 13:03:08 +0100 Subject: [PATCH] Removed useless parentheses in Assert annotations --- best_practices/forms.rst | 2 +- components/validator/resources.rst | 2 +- doctrine/registration_form.rst | 8 ++++---- form/embedded.rst | 4 ++-- forms.rst | 4 ++-- reference/constraints/Bic.rst | 2 +- reference/constraints/Blank.rst | 2 +- reference/constraints/Country.rst | 2 +- reference/constraints/Date.rst | 2 +- reference/constraints/DateTime.rst | 2 +- reference/constraints/IsNull.rst | 2 +- reference/constraints/Language.rst | 2 +- reference/constraints/Locale.rst | 2 +- reference/constraints/NotBlank.rst | 2 +- reference/constraints/NotNull.rst | 2 +- reference/constraints/Time.rst | 2 +- reference/constraints/UniqueEntity.rst | 2 +- reference/constraints/Url.rst | 2 +- reference/constraints/Valid.rst | 2 +- validation.rst | 4 ++-- validation/sequence_provider.rst | 2 +- 21 files changed, 27 insertions(+), 27 deletions(-) diff --git a/best_practices/forms.rst b/best_practices/forms.rst index 9bf7cb25b5c..702f72679c6 100644 --- a/best_practices/forms.rst +++ b/best_practices/forms.rst @@ -169,7 +169,7 @@ blank, add the following in the ``Post`` object:: class Post { /** - * @Assert\NotBlank() + * @Assert\NotBlank */ public $title; } diff --git a/components/validator/resources.rst b/components/validator/resources.rst index c32e35c7b17..03cee104be1 100644 --- a/components/validator/resources.rst +++ b/components/validator/resources.rst @@ -100,7 +100,7 @@ prefixed classes included in doc block comments (``/** ... */``). For example:: class User { /** - * @Assert\NotBlank() + * @Assert\NotBlank */ protected $name; } diff --git a/doctrine/registration_form.rst b/doctrine/registration_form.rst index c0a987d8a7b..bfa3b69b450 100644 --- a/doctrine/registration_form.rst +++ b/doctrine/registration_form.rst @@ -63,19 +63,19 @@ With some validation added, your class may look something like this:: /** * @ORM\Column(type="string", length=255, unique=true) - * @Assert\NotBlank() - * @Assert\Email() + * @Assert\NotBlank + * @Assert\Email */ private $email; /** * @ORM\Column(type="string", length=255, unique=true) - * @Assert\NotBlank() + * @Assert\NotBlank */ private $username; /** - * @Assert\NotBlank() + * @Assert\NotBlank * @Assert\Length(max=4096) */ private $plainPassword; diff --git a/form/embedded.rst b/form/embedded.rst index 3f3d0b5937b..0a1fc2b997b 100644 --- a/form/embedded.rst +++ b/form/embedded.rst @@ -25,7 +25,7 @@ of course, by creating the ``Category`` object:: class Category { /** - * @Assert\NotBlank() + * @Assert\NotBlank */ public $name; } @@ -40,7 +40,7 @@ Next, add a new ``category`` property to the ``Task`` class:: /** * @Assert\Type(type="AppBundle\Entity\Category") - * @Assert\Valid() + * @Assert\Valid */ protected $category; diff --git a/forms.rst b/forms.rst index 7f43ab2fa86..c1bc6aaa857 100644 --- a/forms.rst +++ b/forms.rst @@ -334,12 +334,12 @@ object. class Task { /** - * @Assert\NotBlank() + * @Assert\NotBlank */ public $task; /** - * @Assert\NotBlank() + * @Assert\NotBlank * @Assert\Type("\DateTime") */ protected $dueDate; diff --git a/reference/constraints/Bic.rst b/reference/constraints/Bic.rst index 270a147bbae..b77d410f242 100644 --- a/reference/constraints/Bic.rst +++ b/reference/constraints/Bic.rst @@ -37,7 +37,7 @@ will contain a Business Identifier Code (BIC). class Transaction { /** - * @Assert\Bic() + * @Assert\Bic */ protected $businessIdentifierCode; } diff --git a/reference/constraints/Blank.rst b/reference/constraints/Blank.rst index b1f574326c0..2a203ff3bc6 100644 --- a/reference/constraints/Blank.rst +++ b/reference/constraints/Blank.rst @@ -42,7 +42,7 @@ of an ``Author`` class were blank, you could do the following: class Author { /** - * @Assert\Blank() + * @Assert\Blank */ protected $firstName; } diff --git a/reference/constraints/Country.rst b/reference/constraints/Country.rst index 792fda787d3..4e90a348910 100644 --- a/reference/constraints/Country.rst +++ b/reference/constraints/Country.rst @@ -29,7 +29,7 @@ Basic Usage class User { /** - * @Assert\Country() + * @Assert\Country */ protected $country; } diff --git a/reference/constraints/Date.rst b/reference/constraints/Date.rst index e78003b5019..4bdd3ddf542 100644 --- a/reference/constraints/Date.rst +++ b/reference/constraints/Date.rst @@ -31,7 +31,7 @@ Basic Usage class Author { /** - * @Assert\Date() + * @Assert\Date */ protected $birthday; } diff --git a/reference/constraints/DateTime.rst b/reference/constraints/DateTime.rst index 9dad0660d7c..ae9eb7b50b9 100644 --- a/reference/constraints/DateTime.rst +++ b/reference/constraints/DateTime.rst @@ -31,7 +31,7 @@ Basic Usage class Author { /** - * @Assert\DateTime() + * @Assert\DateTime */ protected $createdAt; } diff --git a/reference/constraints/IsNull.rst b/reference/constraints/IsNull.rst index bc44a950bad..bc174a76255 100644 --- a/reference/constraints/IsNull.rst +++ b/reference/constraints/IsNull.rst @@ -36,7 +36,7 @@ of an ``Author`` class exactly equal to ``null``, you could do the following: class Author { /** - * @Assert\IsNull() + * @Assert\IsNull */ protected $firstName; } diff --git a/reference/constraints/Language.rst b/reference/constraints/Language.rst index 240534aa949..76131e280a1 100644 --- a/reference/constraints/Language.rst +++ b/reference/constraints/Language.rst @@ -30,7 +30,7 @@ Basic Usage class User { /** - * @Assert\Language() + * @Assert\Language */ protected $preferredLanguage; } diff --git a/reference/constraints/Locale.rst b/reference/constraints/Locale.rst index ca47bf5b077..70051d12c3a 100644 --- a/reference/constraints/Locale.rst +++ b/reference/constraints/Locale.rst @@ -34,7 +34,7 @@ Basic Usage class User { /** - * @Assert\Locale() + * @Assert\Locale */ protected $locale; } diff --git a/reference/constraints/NotBlank.rst b/reference/constraints/NotBlank.rst index ed48a5e70bf..93f8db220a1 100644 --- a/reference/constraints/NotBlank.rst +++ b/reference/constraints/NotBlank.rst @@ -40,7 +40,7 @@ class were not blank, you could do the following: class Author { /** - * @Assert\NotBlank() + * @Assert\NotBlank */ protected $firstName; } diff --git a/reference/constraints/NotNull.rst b/reference/constraints/NotNull.rst index 7db8cc41132..df91be24b24 100644 --- a/reference/constraints/NotNull.rst +++ b/reference/constraints/NotNull.rst @@ -34,7 +34,7 @@ class were not strictly equal to ``null``, you would: class Author { /** - * @Assert\NotNull() + * @Assert\NotNull */ protected $firstName; } diff --git a/reference/constraints/Time.rst b/reference/constraints/Time.rst index 945cc6660e7..1d3c6bf69a4 100644 --- a/reference/constraints/Time.rst +++ b/reference/constraints/Time.rst @@ -34,7 +34,7 @@ of the day when the event starts: class Event { /** - * @Assert\Time() + * @Assert\Time */ protected $startsAt; } diff --git a/reference/constraints/UniqueEntity.rst b/reference/constraints/UniqueEntity.rst index c9dd4e5abcc..8cdcdeda25d 100644 --- a/reference/constraints/UniqueEntity.rst +++ b/reference/constraints/UniqueEntity.rst @@ -52,7 +52,7 @@ your user table: * @var string $email * * @ORM\Column(name="email", type="string", length=255, unique=true) - * @Assert\Email() + * @Assert\Email */ protected $email; diff --git a/reference/constraints/Url.rst b/reference/constraints/Url.rst index e40b2ff1d6e..543ecd2043b 100644 --- a/reference/constraints/Url.rst +++ b/reference/constraints/Url.rst @@ -32,7 +32,7 @@ Basic Usage class Author { /** - * @Assert\Url() + * @Assert\Url */ protected $bioUrl; } diff --git a/reference/constraints/Valid.rst b/reference/constraints/Valid.rst index b97744a27fe..f2c1a2788fe 100644 --- a/reference/constraints/Valid.rst +++ b/reference/constraints/Valid.rst @@ -57,7 +57,7 @@ stores an ``Address`` instance in the ``$address`` property:: class Address { /** - * @Assert\NotBlank() + * @Assert\NotBlank */ protected $street; diff --git a/validation.rst b/validation.rst index 16343dba699..eb2d9cc0b08 100644 --- a/validation.rst +++ b/validation.rst @@ -52,7 +52,7 @@ following: class Author { /** - * @Assert\NotBlank() + * @Assert\NotBlank */ public $name; } @@ -536,7 +536,7 @@ class to have at least 3 characters. class Author { /** - * @Assert\NotBlank() + * @Assert\NotBlank * @Assert\Length(min=3) */ private $firstName; diff --git a/validation/sequence_provider.rst b/validation/sequence_provider.rst index c08661fe622..9448d5e20bd 100644 --- a/validation/sequence_provider.rst +++ b/validation/sequence_provider.rst @@ -178,7 +178,7 @@ entity and a new constraint group called ``Premium``: class User { /** - * @Assert\NotBlank() + * @Assert\NotBlank */ private $name;