Skip to content

Commit defcdff

Browse files
committed
Merge branch '2.8' into 3.4
* 2.8: Removed useless parentheses in Assert annotations
2 parents 91a9140 + f54067b commit defcdff

File tree

21 files changed

+27
-27
lines changed

21 files changed

+27
-27
lines changed

best_practices/forms.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ blank, add the following in the ``Post`` object::
170170
class Post
171171
{
172172
/**
173-
* @Assert\NotBlank()
173+
* @Assert\NotBlank
174174
*/
175175
public $title;
176176
}

components/validator/resources.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ prefixed classes included in doc block comments (``/** ... */``). For example::
100100
class User
101101
{
102102
/**
103-
* @Assert\NotBlank()
103+
* @Assert\NotBlank
104104
*/
105105
protected $name;
106106
}

doctrine/registration_form.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,19 @@ With some validation added, your class may look something like this::
6363

6464
/**
6565
* @ORM\Column(type="string", length=255, unique=true)
66-
* @Assert\NotBlank()
67-
* @Assert\Email()
66+
* @Assert\NotBlank
67+
* @Assert\Email
6868
*/
6969
private $email;
7070

7171
/**
7272
* @ORM\Column(type="string", length=255, unique=true)
73-
* @Assert\NotBlank()
73+
* @Assert\NotBlank
7474
*/
7575
private $username;
7676

7777
/**
78-
* @Assert\NotBlank()
78+
* @Assert\NotBlank
7979
* @Assert\Length(max=4096)
8080
*/
8181
private $plainPassword;

form/embedded.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ of course, by creating the ``Category`` object::
2525
class Category
2626
{
2727
/**
28-
* @Assert\NotBlank()
28+
* @Assert\NotBlank
2929
*/
3030
public $name;
3131
}
@@ -40,7 +40,7 @@ Next, add a new ``category`` property to the ``Task`` class::
4040

4141
/**
4242
* @Assert\Type(type="AppBundle\Entity\Category")
43-
* @Assert\Valid()
43+
* @Assert\Valid
4444
*/
4545
protected $category;
4646

forms.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,12 @@ object.
320320
class Task
321321
{
322322
/**
323-
* @Assert\NotBlank()
323+
* @Assert\NotBlank
324324
*/
325325
public $task;
326326
327327
/**
328-
* @Assert\NotBlank()
328+
* @Assert\NotBlank
329329
* @Assert\Type("\DateTime")
330330
*/
331331
protected $dueDate;

reference/constraints/Bic.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ will contain a Business Identifier Code (BIC).
3434
class Transaction
3535
{
3636
/**
37-
* @Assert\Bic()
37+
* @Assert\Bic
3838
*/
3939
protected $businessIdentifierCode;
4040
}

reference/constraints/Blank.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ of an ``Author`` class were blank, you could do the following:
4242
class Author
4343
{
4444
/**
45-
* @Assert\Blank()
45+
* @Assert\Blank
4646
*/
4747
protected $firstName;
4848
}

reference/constraints/Country.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Basic Usage
2929
class User
3030
{
3131
/**
32-
* @Assert\Country()
32+
* @Assert\Country
3333
*/
3434
protected $country;
3535
}

reference/constraints/Date.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Basic Usage
3131
class Author
3232
{
3333
/**
34-
* @Assert\Date()
34+
* @Assert\Date
3535
*/
3636
protected $birthday;
3737
}

reference/constraints/DateTime.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Basic Usage
3232
class Author
3333
{
3434
/**
35-
* @Assert\DateTime()
35+
* @Assert\DateTime
3636
*/
3737
protected $createdAt;
3838
}

0 commit comments

Comments
 (0)