diff options
author | Steve Clay <steve@mrclay.org> | 2013-02-04 20:37:25 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2013-02-09 07:47:28 -0500 |
commit | 85e4c16f39a8b00b229644bcd175663541dfd51a (patch) | |
tree | 49a503ec7eebe24f19025fe5ac0c890857cf86cf /engine/classes/ElggMenuBuilder.php | |
parent | 2cd87bb4ecf6df7b3aea9189cf1933ac3a78038c (diff) | |
download | elgg-85e4c16f39a8b00b229644bcd175663541dfd51a.tar.gz elgg-85e4c16f39a8b00b229644bcd175663541dfd51a.tar.bz2 |
Doc fixes and inline type hints for variables (big static analysis cleanup)
Diffstat (limited to 'engine/classes/ElggMenuBuilder.php')
-rw-r--r-- | engine/classes/ElggMenuBuilder.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engine/classes/ElggMenuBuilder.php b/engine/classes/ElggMenuBuilder.php index d7f85685c..2fd5ad9c4 100644 --- a/engine/classes/ElggMenuBuilder.php +++ b/engine/classes/ElggMenuBuilder.php @@ -8,6 +8,9 @@ */ class ElggMenuBuilder { + /** + * @var ElggMenuItem[] + */ protected $menu = array(); protected $selected = null; @@ -15,7 +18,7 @@ class ElggMenuBuilder { /** * ElggMenuBuilder constructor * - * @param array $menu Array of ElggMenuItem objects + * @param ElggMenuItem[] $menu Array of ElggMenuItem objects */ public function __construct(array $menu) { $this->menu = $menu; @@ -107,6 +110,7 @@ class ElggMenuBuilder { $children = array(); // divide base nodes from children foreach ($section as $menu_item) { + /* @var ElggMenuItem $menu_item */ $parent_name = $menu_item->getParentName(); if (!$parent_name) { $parents[$menu_item->getName()] = $menu_item; @@ -216,6 +220,7 @@ class ElggMenuBuilder { array_push($stack, $root); while (!empty($stack)) { $node = array_pop($stack); + /* @var ElggMenuItem $node */ $node->sortChildren($sort_callback); $children = $node->getChildren(); if ($children) { |