From 92a9465acf580eb67ece44c646604786a85131c4 Mon Sep 17 00:00:00 2001 From: David Maicher Date: Tue, 7 Sep 2021 17:53:56 +0200 Subject: [PATCH] Fix some phpdoc for `Node` class (#28) --- src/Node/Node.php | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/src/Node/Node.php b/src/Node/Node.php index 4a56ddd..493505b 100644 --- a/src/Node/Node.php +++ b/src/Node/Node.php @@ -20,17 +20,17 @@ class Node protected $nodeFactory; /** - * @var string + * @var string|null */ protected $label; /** - * @var string + * @var string|null */ protected $url; /** - * @var string + * @var string|null */ protected $route; @@ -55,7 +55,7 @@ class Node protected $attr = []; /** - * @var Node + * @var Node|null */ protected $parent; @@ -80,7 +80,7 @@ class Node protected $removeIfNoChildren = false; /** - * @param null $label + * @param string|null $label */ public function __construct($label = null) { @@ -89,8 +89,6 @@ public function __construct($label = null) } /** - * @param Node $parent - * * @return $this */ public function setParent(Node $parent = null) @@ -101,7 +99,7 @@ public function setParent(Node $parent = null) } /** - * @return Node + * @return Node|null */ public function getParent() { @@ -138,7 +136,7 @@ public function endIf(): self } /** - * @param null $label + * @param string|null $label * * @return Node * @@ -163,7 +161,7 @@ public function child($label = null) } /** - * @return Node + * @return Node|null */ public function end() { @@ -300,7 +298,7 @@ public function getAttrs() } /** - * @param $label + * @param string|null $label * * @return $this */ @@ -312,7 +310,7 @@ public function setLabel($label) } /** - * @return string + * @return string|null */ public function getLabel() { @@ -338,7 +336,7 @@ public function getRequiredPermissions() } /** - * @param $route + * @param string|null $route * * @return $this * @@ -356,7 +354,7 @@ public function setRoute($route) } /** - * @return string + * @return string|null */ public function getRoute() { @@ -449,7 +447,7 @@ public function getNodeFactory() } /** - * @param $url + * @param string|null $url * * @return $this * @@ -467,7 +465,7 @@ public function setUrl($url) } /** - * @return string + * @return string|null */ public function getUrl() {