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

AbstractFeature::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
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