Skip to content

Commit 2832061

Browse files
Merge branch '3.2'
* 3.2: [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class [VarDumper] Use default color for ellipsed namespaces/paths mark alias as private during creation [Serializer] Remove unused GetSetMethodNormalizer::denormalize
2 parents f81e6b9 + e27793b commit 2832061

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

Normalizer/GetSetMethodNormalizer.php

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -36,40 +36,6 @@ class GetSetMethodNormalizer extends AbstractObjectNormalizer
3636
{
3737
private static $setterAccessibleCache = array();
3838

39-
/**
40-
* {@inheritdoc}
41-
*
42-
* @throws RuntimeException
43-
*/
44-
public function denormalize($data, $class, $format = null, array $context = array())
45-
{
46-
$allowedAttributes = $this->getAllowedAttributes($class, $context, true);
47-
$normalizedData = $this->prepareForDenormalization($data);
48-
49-
$reflectionClass = new \ReflectionClass($class);
50-
$object = $this->instantiateObject($normalizedData, $class, $context, $reflectionClass, $allowedAttributes, $format);
51-
52-
$classMethods = get_class_methods($object);
53-
foreach ($normalizedData as $attribute => $value) {
54-
if ($this->nameConverter) {
55-
$attribute = $this->nameConverter->denormalize($attribute);
56-
}
57-
58-
$allowed = $allowedAttributes === false || in_array($attribute, $allowedAttributes);
59-
$ignored = in_array($attribute, $this->ignoredAttributes);
60-
61-
if ($allowed && !$ignored) {
62-
$setter = 'set'.ucfirst($attribute);
63-
64-
if (in_array($setter, $classMethods) && !$reflectionClass->getMethod($setter)->isStatic()) {
65-
$object->$setter($value);
66-
}
67-
}
68-
}
69-
70-
return $object;
71-
}
72-
7339
/**
7440
* {@inheritdoc}
7541
*/

0 commit comments

Comments
 (0)