Passed
Push — develop ( c0a645...f538e8 )
by Daniel
05:28
created

MenuItem::isMenuLabel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 1
cts 1
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Silverback\ApiComponentBundle\Entity\Content\Component\Navigation\Menu;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Silverback\ApiComponentBundle\Entity\Content\Component\Navigation\AbstractNavigationItem;
7
use Symfony\Component\Serializer\Annotation\Groups;
8
9
/**
10
 * Class MenuItem
11
 * @package Silverback\ApiComponentBundle\Entity\Content\Component\Navigation\Menu
12
 * @author Daniel West <[email protected]>
13
 * @ORM\Entity()
14
 */
15
class MenuItem extends AbstractNavigationItem
16
{
17
    /**
18
     * @ORM\Column(type="boolean", nullable=false)
19
     * @Groups({"content", "component"})
20
     * @var bool
21
     */
22
    private $menuLabel = false;
23
24
    /**
25
     * @return bool
26
     */
27
    public function isMenuLabel(): bool
28
    {
29 1
        return $this->menuLabel;
30
    }
31 1
32
    /**
33
     * @param bool $menuLabel
34
     */
35
    public function setMenuLabel(bool $menuLabel): void
36
    {
37 2
        $this->menuLabel = $menuLabel;
38
    }
39
}
40