@@ -298,7 +298,7 @@ rules). In order to validate an object, simply map one or more constraints
298298to its class and then pass it to the ``validator `` service.
299299
300300Behind the scenes, a constraint is simply a PHP object that makes an assertive
301- statement. In real life, a constraint could be: 'The cake must not be burned'.
301+ statement. In real life, a constraint could be: `` 'The cake must not be burned' `` .
302302In Symfony, constraints are similar: they are assertions that a condition
303303is true. Given a value, a constraint will tell you if that value
304304adheres to the rules of the constraint.
@@ -342,7 +342,7 @@ literature genre mostly associated with the author, which can be set to either
342342 {
343343 /**
344344 * @Assert\Choice(
345- * choices = { "fiction", "non-fiction" },
345+ * choices = {"fiction", "non-fiction"},
346346 * message = "Choose a valid genre."
347347 * )
348348 */
@@ -509,7 +509,7 @@ of the form fields::
509509 $builder
510510 ->add('myField', TextType::class, [
511511 'required' => true,
512- 'constraints' => [new Length(['min' => 3])]
512+ 'constraints' => [new Length(['min' => 3])],
513513 ])
514514 ;
515515 }
@@ -606,7 +606,7 @@ class to have at least 3 characters.
606606 $metadata->addPropertyConstraint('firstName', new Assert\NotBlank());
607607 $metadata->addPropertyConstraint(
608608 'firstName',
609- new Assert\Length([" min" => 3])
609+ new Assert\Length([' min' => 3])
610610 );
611611 }
612612 }
0 commit comments