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

Page   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
eloc 7
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 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