Skip to content

Commit

Permalink
Fix some phpdoc for Node class (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaicher authored Sep 7, 2021
1 parent 978224b commit 92a9465
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions src/Node/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -55,7 +55,7 @@ class Node
protected $attr = [];

/**
* @var Node
* @var Node|null
*/
protected $parent;

Expand All @@ -80,7 +80,7 @@ class Node
protected $removeIfNoChildren = false;

/**
* @param null $label
* @param string|null $label
*/
public function __construct($label = null)
{
Expand All @@ -89,8 +89,6 @@ public function __construct($label = null)
}

/**
* @param Node $parent
*
* @return $this
*/
public function setParent(Node $parent = null)
Expand All @@ -101,7 +99,7 @@ public function setParent(Node $parent = null)
}

/**
* @return Node
* @return Node|null
*/
public function getParent()
{
Expand Down Expand Up @@ -138,7 +136,7 @@ public function endIf(): self
}

/**
* @param null $label
* @param string|null $label
*
* @return Node
*
Expand All @@ -163,7 +161,7 @@ public function child($label = null)
}

/**
* @return Node
* @return Node|null
*/
public function end()
{
Expand Down Expand Up @@ -300,7 +298,7 @@ public function getAttrs()
}

/**
* @param $label
* @param string|null $label
*
* @return $this
*/
Expand All @@ -312,7 +310,7 @@ public function setLabel($label)
}

/**
* @return string
* @return string|null
*/
public function getLabel()
{
Expand All @@ -338,7 +336,7 @@ public function getRequiredPermissions()
}

/**
* @param $route
* @param string|null $route
*
* @return $this
*
Expand All @@ -356,7 +354,7 @@ public function setRoute($route)
}

/**
* @return string
* @return string|null
*/
public function getRoute()
{
Expand Down Expand Up @@ -449,7 +447,7 @@ public function getNodeFactory()
}

/**
* @param $url
* @param string|null $url
*
* @return $this
*
Expand All @@ -467,7 +465,7 @@ public function setUrl($url)
}

/**
* @return string
* @return string|null
*/
public function getUrl()
{
Expand Down

0 comments on commit 92a9465

Please sign in to comment.