Skip to content

Commit

Permalink
Merge branch '2.8' into 3.4
Browse files Browse the repository at this point in the history
* 2.8:
  Removed useless parentheses in Assert annotations
  • Loading branch information
javiereguiluz committed Nov 16, 2018
2 parents 91a9140 + f54067b commit defcdff
Show file tree
Hide file tree
Showing 21 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion best_practices/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ blank, add the following in the ``Post`` object::
class Post
{
/**
* @Assert\NotBlank()
* @Assert\NotBlank
*/
public $title;
}
Expand Down
2 changes: 1 addition & 1 deletion components/validator/resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ prefixed classes included in doc block comments (``/** ... */``). For example::
class User
{
/**
* @Assert\NotBlank()
* @Assert\NotBlank
*/
protected $name;
}
Expand Down
8 changes: 4 additions & 4 deletions doctrine/registration_form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions form/embedded.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ of course, by creating the ``Category`` object::
class Category
{
/**
* @Assert\NotBlank()
* @Assert\NotBlank
*/
public $name;
}
Expand All @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,12 @@ object.
class Task
{
/**
* @Assert\NotBlank()
* @Assert\NotBlank
*/
public $task;
/**
* @Assert\NotBlank()
* @Assert\NotBlank
* @Assert\Type("\DateTime")
*/
protected $dueDate;
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Bic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ will contain a Business Identifier Code (BIC).
class Transaction
{
/**
* @Assert\Bic()
* @Assert\Bic
*/
protected $businessIdentifierCode;
}
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Blank.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ of an ``Author`` class were blank, you could do the following:
class Author
{
/**
* @Assert\Blank()
* @Assert\Blank
*/
protected $firstName;
}
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Country.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Basic Usage
class User
{
/**
* @Assert\Country()
* @Assert\Country
*/
protected $country;
}
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Date.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Basic Usage
class Author
{
/**
* @Assert\Date()
* @Assert\Date
*/
protected $birthday;
}
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/DateTime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Basic Usage
class Author
{
/**
* @Assert\DateTime()
* @Assert\DateTime
*/
protected $createdAt;
}
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/IsNull.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Basic Usage
class User
{
/**
* @Assert\Language()
* @Assert\Language
*/
protected $preferredLanguage;
}
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Locale.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Basic Usage
class User
{
/**
* @Assert\Locale()
* @Assert\Locale
*/
protected $locale;
}
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/NotBlank.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class were not blank, you could do the following:
class Author
{
/**
* @Assert\NotBlank()
* @Assert\NotBlank
*/
protected $firstName;
}
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/NotNull.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class were not strictly equal to ``null``, you would:
class Author
{
/**
* @Assert\NotNull()
* @Assert\NotNull
*/
protected $firstName;
}
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Time.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ of the day when the event starts:
class Event
{
/**
* @Assert\Time()
* @Assert\Time
*/
protected $startsAt;
}
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/UniqueEntity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ your user table:
* @var string $email
*
* @ORM\Column(name="email", type="string", length=255, unique=true)
* @Assert\Email()
* @Assert\Email
*/
protected $email;
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Url.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Basic Usage
class Author
{
/**
* @Assert\Url()
* @Assert\Url
*/
protected $bioUrl;
}
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Valid.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ stores an ``Address`` instance in the ``$address`` property::
class Address
{
/**
* @Assert\NotBlank()
* @Assert\NotBlank
*/
protected $street;
Expand Down
4 changes: 2 additions & 2 deletions validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ following:
class Author
{
/**
* @Assert\NotBlank()
* @Assert\NotBlank
*/
public $name;
}
Expand Down Expand Up @@ -531,7 +531,7 @@ class to have at least 3 characters.
class Author
{
/**
* @Assert\NotBlank()
* @Assert\NotBlank
* @Assert\Length(min=3)
*/
private $firstName;
Expand Down
2 changes: 1 addition & 1 deletion validation/sequence_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ entity and a new constraint group called ``Premium``:
class User
{
/**
* @Assert\NotBlank()
* @Assert\NotBlank
*/
private $name;
Expand Down

0 comments on commit defcdff

Please sign in to comment.