Passed
Push — develop ( 1c9254...e0f0df )
by Daniel
04:57
created

Tabs   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 71.43%

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 5
cts 7
cp 0.7143
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A onDeleteCascade() 0 3 1
1
<?php
2
3
namespace Silverback\ApiComponentBundle\Entity\Content\Component\Navigation\Tabs;
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
 * Class Tabs
12
 * @package Silverback\ApiComponentBundle\Entity\Content\Component\Navigation\Tabs
13
 * @author Daniel West <[email protected]>
14
 * @ApiResource()
15
 * @ORM\Entity()
16
 */
17
class Tabs extends AbstractNavigation
18
{
19 4
    public function __construct()
20
    {
21 4
        parent::__construct();
22 4
        $this->addValidComponent(TabsItem::class);
23 4
        $this->addComponentGroup(new ComponentGroup());
24 4
    }
25
26
    public function onDeleteCascade(): bool
27
    {
28
        return true;
29
    }
30
}
31