Skip to content

Commit

Permalink
Make elifeAssessment term properties more explicitly truthful to the …
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcmoulton committed Dec 19, 2024
1 parent ac78a76 commit 7d82566
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Serializer/ElifeAssessmentNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ final class ElifeAssessmentNormalizer implements NormalizerInterface, Denormaliz

public function denormalize($data, $class, $format = null, array $context = []) : ElifeAssessment
{
return new ElifeAssessment($data['significance'], $data['strength']);
$significance = $data['significance'] ?? null;
$strength = $data['strength'] ?? null;
return new ElifeAssessment($significance, $strength);
}

public function supportsDenormalization($data, $type, $format = null) : bool
Expand Down

0 comments on commit 7d82566

Please sign in to comment.