diff --git a/src/Entity/Base/AbstractDBElement.php b/src/Entity/Base/AbstractDBElement.php index a186b489..3a97473c 100644 --- a/src/Entity/Base/AbstractDBElement.php +++ b/src/Entity/Base/AbstractDBElement.php @@ -87,7 +87,7 @@ abstract class AbstractDBElement implements \JsonSerializable return $this->id; } - public function jsonSerialize() + public function jsonSerialize(): array { return ['@id' => $this->getID()]; } diff --git a/src/Helpers/Trees/StructuralDBElementIterator.php b/src/Helpers/Trees/StructuralDBElementIterator.php index 488aec0c..1bbbd6ef 100644 --- a/src/Helpers/Trees/StructuralDBElementIterator.php +++ b/src/Helpers/Trees/StructuralDBElementIterator.php @@ -62,7 +62,7 @@ final class StructuralDBElementIterator extends ArrayIterator implements Recursi return !empty($element->getSubelements()); } - public function getChildren() + public function getChildren(): StructuralDBElementIterator { /** @var AbstractStructuralDBElement $element */ $element = $this->current(); diff --git a/src/Helpers/Trees/TreeViewNode.php b/src/Helpers/Trees/TreeViewNode.php index 889eed97..a905cd93 100644 --- a/src/Helpers/Trees/TreeViewNode.php +++ b/src/Helpers/Trees/TreeViewNode.php @@ -233,7 +233,7 @@ final class TreeViewNode implements JsonSerializable return $this; } - public function jsonSerialize() + public function jsonSerialize(): array { $ret = [ 'text' => $this->text, diff --git a/src/Helpers/Trees/TreeViewNodeIterator.php b/src/Helpers/Trees/TreeViewNodeIterator.php index e57f8943..46fd8343 100644 --- a/src/Helpers/Trees/TreeViewNodeIterator.php +++ b/src/Helpers/Trees/TreeViewNodeIterator.php @@ -63,7 +63,7 @@ final class TreeViewNodeIterator extends ArrayIterator implements RecursiveItera return !empty($element->getNodes()); } - public function getChildren() + public function getChildren(): TreeViewNodeIterator { /** @var TreeViewNode $element */ $element = $this->current();