From 6756c5c5b4e535dcd0580fb74090b67cbc1bca06 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 18 Sep 2018 00:32:24 +0200 Subject: [PATCH] app/library/Navigation/*: fixing some phpdoc comments and add proper types to arguments. --- app/library/Navigation/Container.php | 6 ++++-- app/library/Navigation/Node.php | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/library/Navigation/Container.php b/app/library/Navigation/Container.php index 5d12dbb..f7a6da7 100644 --- a/app/library/Navigation/Container.php +++ b/app/library/Navigation/Container.php @@ -29,7 +29,8 @@ class Container /** * @param $child - * @return Node + * @return Container + * @throws Exception */ public function addChild($child) { @@ -69,7 +70,8 @@ class Container /** * @param $children - * @return Node + * @return Container + * @throws Exception */ public function addChildren($children) { diff --git a/app/library/Navigation/Node.php b/app/library/Navigation/Node.php index e65d61b..5f9d420 100644 --- a/app/library/Navigation/Node.php +++ b/app/library/Navigation/Node.php @@ -56,22 +56,24 @@ class Node extends Container protected $_visible = true; /** - * @var Node + * Parent container. Null if no parent exists. + * + * @var Container|null */ protected $_parent = null; /** - * @param $parent + * @param Container $parent * @return Node */ - public function setParent($parent) + public function setParent(Container $parent) { $this->_parent = $parent; return $this; } /** - * @return Node + * @return Container|null */ public function getParent() {