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());