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

Appearance settings

Commit 2d42533

Browse filesBrowse files
author
Alexandre Segura
committed
[Component][Serializer] Add fluent interface to GetSetMethodNormalizer
1 parent bc38d76 commit 2d42533
Copy full SHA for 2d42533

File tree

Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed

‎src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ class GetSetMethodNormalizer extends SerializerAwareNormalizer implements Normal
4646
* @param callable[] $callbacks help normalize the result
4747
*
4848
* @throws InvalidArgumentException if a non-callable callback is set
49+
*
50+
* @return GetSetMethodNormalizer
4951
*/
5052
public function setCallbacks(array $callbacks)
5153
{
@@ -55,26 +57,36 @@ public function setCallbacks(array $callbacks)
5557
}
5658
}
5759
$this->callbacks = $callbacks;
60+
61+
return $this;
5862
}
5963

6064
/**
6165
* Set ignored attributes for normalization
6266
*
6367
* @param array $ignoredAttributes
68+
*
69+
* @return GetSetMethodNormalizer
6470
*/
6571
public function setIgnoredAttributes(array $ignoredAttributes)
6672
{
6773
$this->ignoredAttributes = $ignoredAttributes;
74+
75+
return $this;
6876
}
6977

7078
/**
7179
* Set attributes to be camelized on denormalize
7280
*
7381
* @param array $camelizedAttributes
82+
*
83+
* @return GetSetMethodNormalizer
7484
*/
7585
public function setCamelizedAttributes(array $camelizedAttributes)
7686
{
7787
$this->camelizedAttributes = $camelizedAttributes;
88+
89+
return $this;
7890
}
7991

8092
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.