From b3b39b0a9b856343736a39e95844506602cbba33 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Thu, 11 Apr 2019 21:46:02 +0200 Subject: [PATCH] small constraint improvements --- reference/constraints/Json.rst | 4 +--- reference/constraints/Timezone.rst | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/reference/constraints/Json.rst b/reference/constraints/Json.rst index 1fdcaaffd12..4590b847c57 100644 --- a/reference/constraints/Json.rst +++ b/reference/constraints/Json.rst @@ -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 @@ -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([ diff --git a/reference/constraints/Timezone.rst b/reference/constraints/Timezone.rst index 070708ccc11..2fc04bdc839 100644 --- a/reference/constraints/Timezone.rst +++ b/reference/constraints/Timezone.rst @@ -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());