Skip to content

Commit 2744ecb

Browse files
committed
fix code block order
The documentation standard for the order of code blocks in validation contraint configurations is *YAML*, *Annotations*, *XML*, *PHP*. This commit fixes the order of the configuration examples for the `CardScheme` constraint.
1 parent 6b66f03 commit 2744ecb

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

reference/constraints/CardScheme.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,21 @@ on an object that will contain a credit card number.
3737
schemes: [VISA]
3838
message: Your credit card number is invalid.
3939
40+
.. code-block:: php-annotations
41+
42+
// src/Acme/SubscriptionBundle/Entity/Transaction.php
43+
namespace Acme\SubscriptionBundle\Entity\Transaction;
44+
45+
use Symfony\Component\Validator\Constraints as Assert;
46+
47+
class Transaction
48+
{
49+
/**
50+
* @Assert\CardScheme(schemes = {"VISA"}, message = "Your credit card number is invalid.")
51+
*/
52+
protected $cardNumber;
53+
}
54+
4055
.. code-block:: xml
4156
4257
<!-- src/Acme/SubscriptionBundle/Resources/config/validation.xml -->
@@ -57,21 +72,6 @@ on an object that will contain a credit card number.
5772
</class>
5873
</constraint-mapping>
5974
60-
.. code-block:: php-annotations
61-
62-
// src/Acme/SubscriptionBundle/Entity/Transaction.php
63-
namespace Acme\SubscriptionBundle\Entity\Transaction;
64-
65-
use Symfony\Component\Validator\Constraints as Assert;
66-
67-
class Transaction
68-
{
69-
/**
70-
* @Assert\CardScheme(schemes = {"VISA"}, message = "Your credit card number is invalid.")
71-
*/
72-
protected $cardNumber;
73-
}
74-
7575
.. code-block:: php
7676
7777
// src/Acme/SubscriptionBundle/Entity/Transaction.php

0 commit comments

Comments
 (0)