Skip to content

Commit

Permalink
Fix compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Feb 19, 2024
1 parent 80ec380 commit 9b9b3c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions src/PHPCR/Shell/Serializer/NodeNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,21 @@ public function getNotes()
return $this->notes;
}

public function getSupportedTypes(?string $format): array
{
return [
NodeInterface::class => true,
];
}

/**
* {@inheritdoc}
*/
public function normalize($node, $format = null, array $context = []): ArrayObject|array|string|int|float|bool|null
public function normalize($object, $format = null, array $context = []): array
{
$res = [];

foreach ($node->getProperties() as $property) {
foreach ($object->getProperties() as $property) {
if (false === $this->isPropertyEditable($property)) {
continue;
}
Expand Down Expand Up @@ -82,13 +89,6 @@ public function normalize($node, $format = null, array $context = []): ArrayObje
return $res;
}

public function getSupportedTypes(?string $format): array
{
return [
NodeInterface::class => true,
];
}

/**
* {@inheritdoc}
*/
Expand Down
2 changes: 1 addition & 1 deletion src/PHPCR/Shell/Serializer/YamlEncoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function encode($data, $format, array $context = []): string
return Yaml::dump($data);
}

public function decode($data, $format, array $context = [])
public function decode($data, $format, array $context = []): mixed
{
$arr = Yaml::parse($data);

Expand Down

0 comments on commit 9b9b3c8

Please sign in to comment.