Fixed some deprecation notices.

This commit is contained in:
Jan Böhmer 2022-07-23 22:21:29 +02:00
parent 2fc44c91e6
commit d9d7e09866
4 changed files with 4 additions and 4 deletions

View file

@ -87,7 +87,7 @@ abstract class AbstractDBElement implements \JsonSerializable
return $this->id; return $this->id;
} }
public function jsonSerialize() public function jsonSerialize(): array
{ {
return ['@id' => $this->getID()]; return ['@id' => $this->getID()];
} }

View file

@ -62,7 +62,7 @@ final class StructuralDBElementIterator extends ArrayIterator implements Recursi
return !empty($element->getSubelements()); return !empty($element->getSubelements());
} }
public function getChildren() public function getChildren(): StructuralDBElementIterator
{ {
/** @var AbstractStructuralDBElement $element */ /** @var AbstractStructuralDBElement $element */
$element = $this->current(); $element = $this->current();

View file

@ -233,7 +233,7 @@ final class TreeViewNode implements JsonSerializable
return $this; return $this;
} }
public function jsonSerialize() public function jsonSerialize(): array
{ {
$ret = [ $ret = [
'text' => $this->text, 'text' => $this->text,

View file

@ -63,7 +63,7 @@ final class TreeViewNodeIterator extends ArrayIterator implements RecursiveItera
return !empty($element->getNodes()); return !empty($element->getNodes());
} }
public function getChildren() public function getChildren(): TreeViewNodeIterator
{ {
/** @var TreeViewNode $element */ /** @var TreeViewNode $element */
$element = $this->current(); $element = $this->current();