Skip to content

small constraint improvements #11412

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
Apr 13, 2019
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
4 changes: 1 addition & 3 deletions reference/constraints/Json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The ``Json`` constraint can be applied to a property or a "getter" method:
* message = "You've entered an invalid Json."
* )
*/
private $chapters;
private $chapters;
}

.. code-block:: yaml
Expand Down Expand Up @@ -74,8 +74,6 @@ The ``Json`` constraint can be applied to a property or a "getter" method:

class Book
{
private $chapters;

public static function loadValidatorMetadata(ClassMetadata $metadata)
{
$metadata->addPropertyConstraint('chapters', new Assert\Json([
Expand Down
2 changes: 0 additions & 2 deletions reference/constraints/Timezone.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ string meant to contain a timezone identifier (e.g. ``America/New_York``):

class UserSettings
{
protected $timezone;

public static function loadValidatorMetadata(ClassMetadata $metadata)
{
$metadata->addPropertyConstraint('timezone', new Assert\Timezone());
Expand Down