Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit59adb5f

Browse files
committed
fixed CS
1 parentc8ee03e commit59adb5f

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

‎reference/constraints/Type.rst

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -33,30 +33,30 @@ Basic Usage
3333
3434
..code-block::php-annotations
3535
36-
// src/Acme/BlogBundle/Entity/Author.php
37-
namespace Acme\BlogBundle\Entity;
38-
39-
use Symfony\Component\Validator\Constraints as Assert;
40-
41-
class Author
42-
{
43-
/**
44-
* @Assert\Type(type="integer", message="The value {{ value }} is not a valid {{ type }}.")
45-
*/
36+
// src/Acme/BlogBundle/Entity/Author.php
37+
namespace Acme\BlogBundle\Entity;
38+
39+
use Symfony\Component\Validator\Constraints as Assert;
40+
41+
class Author
42+
{
43+
/**
44+
* @Assert\Type(type="integer", message="The value {{ value }} is not a valid {{ type }}.")
45+
*/
4646
protected $age;
47-
}
47+
}
4848
4949
..code-block::xml
5050
51-
<!-- src/Acme/BlogBundle/Resources/config/validation.xml-->
52-
<classname="Acme\BlogBundle\Entity\Author">
53-
<propertyname="age">
54-
<constraintname="Type">
55-
<optionname="type">integer</option>
56-
<optionname="message">The value {{ value }} is not a valid {{ type }}.</option>
57-
</constraint>
58-
</property>
59-
</class>
51+
<!-- src/Acme/BlogBundle/Resources/config/validation.xml-->
52+
<classname="Acme\BlogBundle\Entity\Author">
53+
<propertyname="age">
54+
<constraintname="Type">
55+
<optionname="type">integer</option>
56+
<optionname="message">The value {{ value }} is not a valid {{ type }}.</option>
57+
</constraint>
58+
</property>
59+
</class>
6060
6161
Options
6262
-------
@@ -71,25 +71,25 @@ type
7171
This required option is the fully qualified class name or one of the PHP datatypes
7272
as determined by PHP's ``is_`` functions.
7373

74-
* `array<http://php.net/is_array>`_
75-
* `bool<http://php.net/is_bool>`_
76-
* `callable<http://php.net/is_callable>`_
77-
* `float<http://php.net/is_float>`_
78-
* `double<http://php.net/is_double>`_
79-
* `int<http://php.net/is_int>`_
80-
* `integer<http://php.net/is_integer>`_
81-
* `long<http://php.net/is_long>`_
82-
* `null<http://php.net/is_null>`_
83-
* `numeric<http://php.net/is_numeric>`_
84-
* `object<http://php.net/is_object>`_
85-
* `real<http://php.net/is_real>`_
86-
* `resource<http://php.net/is_resource>`_
87-
* `scalar<http://php.net/is_scalar>`_
88-
* `string<http://php.net/is_string>`_
89-
74+
* `array<http://php.net/is_array>`_
75+
* `bool<http://php.net/is_bool>`_
76+
* `callable<http://php.net/is_callable>`_
77+
* `float<http://php.net/is_float>`_
78+
* `double<http://php.net/is_double>`_
79+
* `int<http://php.net/is_int>`_
80+
* `integer<http://php.net/is_integer>`_
81+
* `long<http://php.net/is_long>`_
82+
* `null<http://php.net/is_null>`_
83+
* `numeric<http://php.net/is_numeric>`_
84+
* `object<http://php.net/is_object>`_
85+
* `real<http://php.net/is_real>`_
86+
* `resource<http://php.net/is_resource>`_
87+
* `scalar<http://php.net/is_scalar>`_
88+
* `string<http://php.net/is_string>`_
89+
9090
message
9191
~~~~~~~
9292

9393
**type**: ``string`` **default**: ``This value should be of type {{ type }}``
9494

95-
The message if the underlying data is not of the given type.
95+
The message if the underlying data is not of the given type.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp