Test Failed
Push — develop ( 92c10d...ff12cf )
by Daniel
05:05
created

StaticPage   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 6
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

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