Passed
Push — develop ( c0a645...f538e8 )
by Daniel
05:28
created

Gallery::onDeleteCascade()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1.125

Importance

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