Link::isDropDown()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php namespace NukaCode\Menu;
2
3
use NukaCode\Menu\Traits\Activate;
4
use NukaCode\Menu\Traits\Insertable;
5
6
/**
7
 * Class Link
8
 *
9
 * @package NukaCode\Menu
10
 */
11
class Link {
12
    use Insertable;
13
    use Activate;
14
15
    /**
16
     * The link slug
17
     *
18
     * @var string
19
     */
20
    public $slug;
21
22
    /**
23
     * Name of the link
24
     *
25
     * @var string
26
     */
27
    public $name;
28
29
    /**
30
     * Link url
31
     *
32
     * @var string
33
     */
34
    public $url;
35
36
    /**
37
     * Additional options for links
38
     *
39
     * @var array
40
     */
41
    public $options = [];
42
43
    /**
44
     * Get a menu option
45
     *
46
     * @param $name The name of the menu option
47
     *
48
     * @return string|bool Return the menu option if it exists or false.
49
     */
50 2
    public function getOption($name)
51
    {
52 2
        if (isset($this->options[$name])) {
53 1
            return $this->options[$name];
54
        }
55
56 1
        return false;
57
    }
58
59
    /**
60
     * Check if the current object is a drop down
61
     *
62
     * @return bool
63
     */
64 3
    public function isDropDown()
65
    {
66 3
        return false;
67
    }
68
}