Passed
Push — develop ( 653998...1c9254 )
by Daniel
05:33
created

MenuItem::isMenuLabel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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