Menu   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 25
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php namespace NukaCode\Menu;
2
3
use Illuminate\Support\Collection;
4
use NukaCode\Menu\Traits\Insertable;
5
use NukaCode\Menu\Traits\Linkable;
6
7
/**
8
 * Class Menu
9
 *
10
 * @package NukaCode\Menu
11
 */
12
class Menu {
13
    use Linkable;
14
    use Insertable;
15
16
    /**
17
     * Name of this menu
18
     *
19
     * @var string
20
     */
21
    public $name;
22
23
    /**
24
     * Construct a menu
25
     *
26
     * @param $menuName
27
     */
28 17
    public function __construct($menuName = null)
29
    {
30 17
        $this->links = new Collection();
31
32 17
        if (isset($menuName)) {
33 13
            $this->name = $menuName;
34 13
        }
35
    }
36
}