Skip to content

Commit 5355801

Browse files
committed
Fix code blocks
1 parent 02c2329 commit 5355801

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

components/serializer.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Attributes Groups
149149
Sometimes, you want to serialize different set of attributes from your
150150
entities. Groups are a handy way to achieve this need.
151151

152-
Lets start with a simple Plain Old PHP object.
152+
Lets start with a simple Plain Old PHP object::
153153

154154
namespace Acme;
155155

@@ -164,21 +164,21 @@ and YAML. The :class:Symfony\Component\Serializer\Mapping\Factory\ClassMetadataF
164164
that will be used by the normalizer must be aware of the format to use.
165165

166166
If you want to use annotations to define groups, initialize the :class:Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory
167-
like the following:
167+
like the following::
168168

169169
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
170170
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
171171

172172
$classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()));
173173

174-
If you prefer XML:
174+
If you prefer XML::
175175

176176
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
177177
use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader;
178178

179179
$classMetadataFactory = new ClassMetadataFactory(new XmlFileLoader('/path/to/your/definition.xml'));
180180

181-
And for YAML:
181+
And for YAML::
182182

183183
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
184184
use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader;
@@ -234,7 +234,7 @@ Then, create your groups definition:
234234
</class>
235235
</serializer>
236236
237-
You are now able to serialize only attributes in the groups you want:
237+
You are now able to serialize only attributes in the groups you want::
238238

239239
use Symfony\Component\Serializer\Serializer;
240240
use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer;

0 commit comments

Comments
 (0)