8000 minor #17431 [Serializer] Remove useless is_object condition (paradaj… · symfony/symfony@3a19369 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3a19369

Browse files
committed
minor #17431 [Serializer] Remove useless is_object condition (paradajozsef)
This PR was merged into the 2.7 branch. Discussion ---------- [Serializer] Remove useless is_object condition | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | E6D9 - [This condition](https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Serializer/Serializer.php#L185) is useless, because ```$class``` is not used in ```getNormalizer()```. Commits ------- f6fd5e4 Remove useless is_object condition
2 parents 63cb9a9 + f6fd5e4 commit 3a19369

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/Symfony/Component/Serializer/Serializer.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,6 @@ public function supportsDenormalization($data, $type, $format = null)
182182
*/
183183
private function getNormalizer($data, $format)
184184
{
185-
if ($isObject = is_object($data)) {
186-
$class = get_class($data);
187-
}
188-
189185
foreach ($this->normalizers as $normalizer) {
190186
if ($normalizer instanceof NormalizerInterface && $normalizer->supportsNormalization($data, $format)) {
191187
return $normalizer;

0 commit comments

Comments
 (0)
0