@@ -960,10 +960,11 @@ entity and a new constraint group called ``Premium``:
960960 private $name;
961961
962962 /**
963- * @Assert\CardScheme(
964- * schemes={"VISA"},
965- * groups={"Premium"},
966- * )
963+ * @Assert\CardScheme(
964+ * schemes={"VISA"},
965+ * groups={"Premium"},
966+ * )
967+ */
967968 private $creditCard;
968969 }
969970
@@ -1024,14 +1025,14 @@ entity and a new constraint group called ``Premium``:
10241025 }
10251026 }
10261027
1027- Now,let this class implement
1028- :class: `Symfony\\ Componet \\ Validation\\ GroupSequenceProviderInterface ` and
1029- implement a method called
1030- :method: `Symfony\\ Componet \\ Validation\\ GroupSequenceProviderInterface::getGroupSequence `,
1031- whichreturns an array of groups to use and add the
1032- ``@Assert\GroupSequencdeProvider `` annotation to the class.Imagine a method
1033- ``isPremium `` returns true if the user is a premium member. Your method looks
1034- like this::
1028+ Now,change the `` User `` class to implement
1029+ :class: `Symfony\\ Component \\ Validation\\ GroupSequenceProviderInterface ` and
1030+ add the
1031+ :method: `Symfony\\ Component \\ Validation\\ GroupSequenceProviderInterface::getGroupSequence `,
1032+ whichshould return an array of groups to use. Also, add the
1033+ ``@Assert\GroupSequenceProvider `` annotation to the class.If you imagine
1034+ that a method called ``isPremium `` returns true if the user is a premium member,
1035+ then your code might look like this::
10351036
10361037 // src/Acme/DemoBundle/Entity/User.php
10371038 namespace Acme\DemoBundle\Entity;
@@ -1043,7 +1044,7 @@ like this::
10431044 * @Assert\GroupSequenceProvider
10441045 * ...
10451046 */
1046- class User
1047+ class User implements GroupSequenceProviderInterface
10471048 {
10481049 // ...
10491050