Completed
Push — master ( 0be8e1...585ca2 )
by Daniel
59:26 queued 46:02
created

NavBar::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Silverback\ApiComponentBundle\Entity\Component\Navigation\NavBar;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use Silverback\ApiComponentBundle\Entity\Component\Navigation\AbstractNavigation;
9
use Silverback\ApiComponentBundle\Entity\Content\ComponentGroup\ComponentGroup;
10
use Silverback\ApiComponentBundle\Entity\Layout\Layout;
11
12
/**
13
 * @author Daniel West <[email protected]
14
 * @ORM\Entity()
15
 */
16
class NavBar extends AbstractNavigation
17
{
18
    public function __construct()
19
    {
20
        parent::__construct();
21
        $this->addValidComponent(NavBarItem::class);
22
        $this->addComponentGroup(new ComponentGroup());
23
    }
24
25
    public function onDeleteCascade(): bool
26
    {
27
        return true;
28
    }
29
}
30