Skip to content

Removed useless parentheses in Assert annotations #10676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion best_practices/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,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 @@ -334,12 +334,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 @@ -37,7 +37,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 @@ -31,7 +31,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 @@ -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;

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 @@ -57,7 +57,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 @@ -536,7 +536,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