Menu::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace JumpGate\Menu;
4
5
use Illuminate\Support\Collection;
6
use JumpGate\Menu\Traits\Insertable;
7
use JumpGate\Menu\Traits\Linkable;
8
9
/**
10
 * Class Menu
11
 *
12
 * @package JumpGate\Menu
13
 */
14
class Menu
15
{
16
    use Linkable, Insertable;
17
18
    /**
19
     * Name of this menu
20
     *
21
     * @var string
22
     */
23
    public $name;
24
25
    /**
26
     * Construct a menu
27
     *
28
     * @param $menuName
29
     */
30
    public function __construct($menuName = null)
31
    {
32
        $this->links = new Collection();
33
34
        if (isset($menuName)) {
35
            $this->name = $menuName;
36
        }
37
    }
38
}
39