8000 minor #12127 [WIP] minor [Serializer] Fix CS (dunglas) · symfony/symfony@59bfe83 · GitHub
[go: up one dir, main page]

Skip to content

Commit 59bfe83

Browse files
committed
minor #12127 [WIP] minor [Serializer] Fix CS (dunglas)
This PR was merged into the 2.6-dev branch. Discussion ---------- [WIP] minor [Serializer] Fix CS | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT * Reverts CS breaks introduced by #12102 found by @stof and @xabbuh. * Fix CS of `PropertyNormalizer` (missed in last commit) Commits ------- dffa3e4 [Serializer] Fix CS
2 parents e0d7f12 + dffa3e4 commit 59bfe83

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

src/Symfony/Component/Serializer/Encoder/JsonEncode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function supportsEncoding($format)
7171
/**
7272
* Merge default json encode options with context.
7373
*
74-
* @param array $context
74+
* @param array $context
7575
*
7676
* @return array
7777
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function denormalize($data, $class, $format = null, array $context = arra
187187
* As option, if attribute name is found on camelizedAttributes array
188188
* returns attribute name in camelcase format.
189189
*
190-
* @param string $attributeName
190+
* @param string $attributeName
191191
*
192192
* @return string
193193
*/

src/Symfony/Component/Serializer/Normalizer/PropertyNormalizer.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function denormalize($data, $class, $format = null, array $context = arra
130130
unset($data[$paramName]);
131131
} elseif (!$constructorParameter->isOptional()) {
132132
throw new RuntimeException(sprintf(
133-
'Cannot create an instance of %s from serialized data because ' .
133+
'Cannot create an instance of %s from serialized data because '.
134134
'its constructor requires parameter "%s" to be present.',
135135
$class,
136136
$constructorParameter->name
@@ -140,7 +140,7 @@ public function denormalize($data, $class, $format = null, array $context = arra
140140

141141
$object = $reflectionClass->newInstanceArgs($params);
142142
} else {
143-
$object = new $class;
143+
$object = new $class();
144144
}
145145

146146
foreach ($data as $propertyName => $value) {
@@ -162,15 +162,15 @@ public function denormalize($data, $class, $format = null, array $context = arra
162162
}
163163

164164
/**
165-
* {@inheritDoc}
165+
* {@inheritdoc}
166166
*/
167167
public function supportsNormalization($data, $format = null)
168168
{
169169
return is_object($data) && $this->supports(get_class($data));
170170
}
171171

172172
/**
173-
* {@inheritDoc}
173+
* {@inheritdoc}
174174
*/
175175
public function supportsDenormalization($data, $type, $format = null)
176176
{
@@ -181,6 +181,7 @@ public function supportsDenormalization($data, $type, $format = null)
181181
* Format an attribute name, for example to convert a snake_case name to camelCase.
182182
*
183183
* @param string $attributeName
184+
*
184185
* @return string
185186
*/
186187
protected function formatAttribute($attributeName)
@@ -199,7 +200,7 @@ protected function formatAttribute($attributeName)
199200
*
200201
* @param string $class
201202
*
202-
* @return Boolean
203+
* @return bool
203204
*/
204205
private function supports($class)
205206
{

0 commit comments

Comments
 (0)
0