Skip to content

Commit e694b30

Browse files
committed
Update phpDoc comments and add more type hinting
Signed-off-by: Julius Härtl <[email protected]>
1 parent 5a23b35 commit e694b30

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

lib/private/NavigationManager.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,10 @@ public function add($entry) {
104104
}
105105

106106
/**
107-
* returns all the added Menu entries
108-
* @param string $type
109-
* @return array an array of the added entries
107+
* Get a list of navigation entries
108+
*
109+
* @param string $type type of the navigation entries
110+
* @return array
110111
*/
111112
public function getAll(string $type = 'link'): array {
112113
$this->init();
@@ -128,10 +129,10 @@ public function getAll(string $type = 'link'): array {
128129
/**
129130
* Sort navigation entries by order, name and set active flag
130131
*
131-
* @param $list
132-
* @return mixed
132+
* @param array $list
133+
* @return array
133134
*/
134-
private function proceedNavigation($list) {
135+
private function proceedNavigation(array $list): array {
135136
usort($list, function($a, $b) {
136137
if (isset($a['order']) && isset($b['order'])) {
137138
return ($a['order'] < $b['order']) ? -1 : 1;

lib/public/INavigationManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function setActiveEntry($appId);
6161
/**
6262
* Get a list of navigation entries
6363
*
64-
* @param bool $absolute set to true if links to navigation entries should be converted to absolute urls
64+
* @param string $type type of the navigation entries
6565
* @return array
6666
* @since 14.0.0
6767
*/

0 commit comments

Comments
 (0)