Passed
Push — develop ( 1b1d1e...d85927 )
by Daniel
05:53
created

AbstractDynamicPage   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
dl 0
loc 15
ccs 4
cts 6
cp 0.6667
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getComponentLocations() 0 3 1
1
<?php
2
3
namespace Silverback\ApiComponentBundle\Entity\Content\Dynamic;
4
5
use Doctrine\Common\Collections\ArrayCollection;
6
use Doctrine\Common\Collections\Collection;
7
use Silverback\ApiComponentBundle\Entity\Content\AbstractContent;
8
use Silverback\ApiComponentBundle\Entity\Content\PageTrait;
9
use Silverback\ApiComponentBundle\Entity\Route\RouteAwareInterface;
10
use Silverback\ApiComponentBundle\Entity\Route\RouteAwareTrait;
11
use Symfony\Component\Serializer\Annotation\Groups;
12
13
abstract class AbstractDynamicPage extends AbstractContent implements RouteAwareInterface
14
{
15
    use RouteAwareTrait;
16
    use PageTrait;
17
18 3
    public function __construct()
19
    {
20 3
        parent::__construct();
21 3
        $this->routes = new ArrayCollection;
22 3
    }
23
24
    /** @Groups({"dynamic_content"}) */
25
    public function getComponentLocations(): Collection
26
    {
27
        return new ArrayCollection;
28
    }
29
}
30