Test Failed
Branch develop (ac2838)
by Daniel
09:09
created

AbstractFeature   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
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 implements FeatureInterface
13
{
14
    public function __construct()
15
    {
16
        parent::__construct();
17
        $this->addValidComponent(AbstractFeatureItem::class);
18
        $this->addComponentGroup(new ComponentGroup());
19
    }
20
21
    public function onDeleteCascade(): bool
22
    {
23
        return true;
24
    }
25
}
26