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

NavBar   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 83.33%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 12
ccs 5
cts 6
cp 0.8333
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A onDeleteCascade() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
namespace Silverback\ApiComponentBundle\Entity\Content\Component\Navigation\NavBar;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Silverback\ApiComponentBundle\Entity\Content\Component\Navigation\AbstractNavigation;
7
use Silverback\ApiComponentBundle\Entity\Content\ComponentGroup;
8
9
/**
10
 * @author Daniel West <[email protected]
11
 * @ORM\Entity()
12
 */
13
class NavBar extends AbstractNavigation
14
{
15
    public function __construct()
16
    {
17 4
        parent::__construct();
18
        $this->addValidComponent(NavBarItem::class);
19 4
        $this->addComponentGroup(new ComponentGroup());
20 4
    }
21 4
22 4
    public function onDeleteCascade(): bool
23
    {
24
        return true;
25
    }
26
}
27