Passed
Push — develop ( 53a66f...07e04a )
by Daniel
05:35
created

AbstractFeature   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 onDeleteCascade() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
namespace Silverback\ApiComponentBundle\Entity\Component\Feature;
4
5
use Silverback\ApiComponentBundle\Entity\Component\AbstractComponent;
6
use Silverback\ApiComponentBundle\Entity\Content\ComponentGroup;
7
8
/**
9
 * Class AbstractFeature
10
 * @package Silverback\ApiComponentBundle\Entity\Component\Feature
11
 */
12
abstract class AbstractFeature extends AbstractComponent
13
{
14 5
    public function __construct()
15
    {
16 5
        parent::__construct();
17 5
        $this->addValidComponent(AbstractFeatureItem::class);
18 5
        $this->addComponentGroup(new ComponentGroup());
19 5
    }
20
21
    public function onDeleteCascade(): bool
22
    {
23
        return true;
24
    }
25
}
26