Test Setup Failed
Push — main ( 1b2fc7...cb6f91 )
by nassim
04:22
created

helpers.php ➔ menu()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 1
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
1
<?php
2
3
if (!function_exists('menu')) {
4
    /**
5
     * Get the Menu instance or render
6
     *
7
     * @param string $name
8
     *
9
     * @return mixed
10
     */
11
    function menu($name = null)
12
    {
13
        $menu = app('menu');
14
        
15
        if (is_null($name)) {
16
            return $menu;
17
        }
18
        
19
        return $menu->get($name);
20
    }
21
}
22