Completed
Push — develop ( 18ae71...e7301d )
by Daniel
08:22
created

Page   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
dl 0
loc 23
ccs 3
cts 5
cp 0.6
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isDynamic() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
namespace Silverback\ApiComponentBundle\Entity\Content;
4
5
use ApiPlatform\Core\Annotation\ApiProperty;
6
use ApiPlatform\Core\Annotation\ApiResource;
7
use Doctrine\Common\Collections\ArrayCollection;
8
use Doctrine\ORM\Mapping as ORM;
9
use Silverback\ApiComponentBundle\Entity\Route\RouteAwareInterface;
10
use Silverback\ApiComponentBundle\Entity\Route\RouteAwareTrait;
11
use Symfony\Component\Serializer\Annotation\Groups;
12
13
/**
14
 * Class Page
15
 * @package Silverback\ApiComponentBundle\Entity\Content
16
 * @author Daniel West <[email protected]>
17
 * @ApiResource()
18
 * @ORM\Entity()
19
 */
20
class Page extends AbstractContent implements RouteAwareInterface
21
{
22
    use RouteAwareTrait;
23
    use PageTrait;
24
25
    /**
26
     * @ApiProperty()
27
     * @Groups({"content","route"})
28
     */
29
    public function isDynamic()
30
    {
31
        return false;
32
    }
33
34
    /**
35
     * @Groups({"default"})
36
     */
37
    protected $componentLocations;
38
39 5
    public function __construct()
40
    {
41 5
        parent::__construct();
42 5
        $this->routes = new ArrayCollection;
43 5
    }
44
}
45