Skip to content

Commit e7c2f73

Browse files
committed
return null explicitly
1 parent a283c9d commit e7c2f73

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/PHPCR/Shell/Serializer/NodeNormalizer.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function denormalize($data, $class, $format = null, array $context = []):
154154
// Add new properties
155155
foreach ($data as $pName => $datum) {
156156
$datum = $this->normalizeDatum($datum);
157-
$pValue = isset($datum['value']) ? $datum['value'] : null;
157+
$pValue = $datum['value'] ?? null;
158158
$pType = isset($datum['type']) ? PropertyType::valueFromName($datum['type']) : null;
159159

160160
if ($pValue !== null) {
@@ -168,6 +168,8 @@ public function denormalize($data, $class, $format = null, array $context = []):
168168
implode("\n", $errors)
169169
));
170170
}
171+
172+
return null;
171173
}
172174

173175
/**

0 commit comments

Comments
 (0)