10000 [Serializer] Remove a now useless call to method_exists · symfony/symfony@6425f85 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6425f85

Browse files
committed
[Serializer] Remove a now useless call to method_exists
1 parent 15b7cdb commit 6425f85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ protected function instantiateObject(array &$data, $class, array &$context, \Ref
339339

340340
$allowed = $allowedAttributes === false || in_array($paramName, $allowedAttributes);
341341
$ignored = !$this->isAllowedAttribute($class, $paramName, $format, $context);
342-
if (method_exists($constructorParameter, 'isVariadic') && $constructorParameter->isVariadic()) {
342+
if ($constructorParameter->isVariadic()) {
343343
if ($allowed && !$ignored && (isset($data[$key]) || array_key_exists($key, $data))) {
344344
if (!is_array($data[$paramName])) {
345345
throw new RuntimeException(sprintf('Cannot create an instance of %s from serialized data because the variadic parameter %s can only accept an array.', $class, $constructorParameter->name));

0 commit comments

Comments
 (0)
0