From 3ae59a8841eed0716db06d75a61b3698684655a0 Mon Sep 17 00:00:00 2001 From: lalshe Date: Tue, 3 Dec 2019 22:59:02 +0200 Subject: [PATCH] Drop `else` in favor early return --- src/Symfony/Extensions/PropertyNormalizerWrapper.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Extensions/PropertyNormalizerWrapper.php b/src/Symfony/Extensions/PropertyNormalizerWrapper.php index 491cfe4..ac9cc0d 100644 --- a/src/Symfony/Extensions/PropertyNormalizerWrapper.php +++ b/src/Symfony/Extensions/PropertyNormalizerWrapper.php @@ -94,10 +94,10 @@ protected function setAttributeValue(object $object, string $attribute, $value, if (true === isset($object->{$attribute})) { $object->{$attribute} = $value; + + return; } - else - { - parent::setAttributeValue($object, $attribute, $value, $format, $context); - } + + parent::setAttributeValue($object, $attribute, $value, $format, $context); } }