Passed
Push — develop ( 0112d6...38c008 )
by Daniel
05:14
created

NavBar::onDeleteCascade()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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