Skip to content

Commit 36cacbd

Browse files
Fix compatibility
1 parent 80ec380 commit 36cacbd

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/PHPCR/Shell/Serializer/NodeNormalizer.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,21 @@ public function getNotes()
3939
return $this->notes;
4040
}
4141

42+
public function getSupportedTypes(?string $format): array
43+
{
44+
return [
45+
NodeInterface::class => true,
46+
];
47+
}
48+
4249
/**
4350
* {@inheritdoc}
4451
*/
45-
public function normalize($node, $format = null, array $context = []): ArrayObject|array|string|int|float|bool|null
52+
public function normalize($object, $format = null, array $context = []): array
4653
{
4754
$res = [];
4855

49-
foreach ($node->getProperties() as $property) {
56+
foreach ($object->getProperties() as $property) {
5057
if (false === $this->isPropertyEditable($property)) {
5158
continue;
5259
}
@@ -82,13 +89,6 @@ public function normalize($node, $format = null, array $context = []): ArrayObje
8289
return $res;
8390
}
8491

85-
public function getSupportedTypes(?string $format): array
86-
{
87-
return [
88-
NodeInterface::class => true,
89-
];
90-
}
91-
9292
/**
9393
* {@inheritdoc}
9494
*/

0 commit comments

Comments
 (0)