Passed
Push — develop ( 0112d6...38c008 )
by Daniel
05:14
created

Page::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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