Completed
Push — master ( 2058f9...b13840 )
by Paweł
31:54
created

Route   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 86
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 7
Bugs 1 Features 3
Metric Value
wmc 8
c 7
b 1
f 3
lcom 0
cbo 1
dl 0
loc 86
ccs 20
cts 20
cp 1
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getTemplateName() 0 4 1
A setTemplateName() 0 4 1
A getArticlesTemplateName() 0 4 1
A setArticlesTemplateName() 0 4 1
A getType() 0 4 1
A setType() 0 4 1
A getCacheTimeInSeconds() 0 4 1
A setCacheTimeInSeconds() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Superdesk Web Publisher Content Bundle.
5
 *
6
 * Copyright 2016 Sourcefabric z.ú. and contributors.
7
 *
8
 * For the full copyright and license information, please see the
9
 * AUTHORS and LICENSE files distributed with this source code.
10
 *
11
 * @copyright 2016 Sourcefabric z.ú.
12
 * @license http://www.superdesk.org/license
13
 */
14
namespace SWP\Bundle\ContentBundle\Doctrine\ODM\PHPCR;
15
16
use Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route as BaseRoute;
17
18
class Route extends BaseRoute implements RouteObjectInterface
19
{
20
    /**
21
     * @var string
22
     */
23
    protected $templateName;
24
25
    /**
26
     * @var string
27
     */
28
    protected $articlesTemplateName;
29
30
    /**
31
     * @var string
32
     */
33
    protected $type;
34
35
    /**
36
     * @var int
37
     */
38
    protected $cacheTimeInSeconds = 0;
39
40
    /**
41
     * {@inheritdoc}
42
     */
43 18
    public function getTemplateName()
44
    {
45 18
        return $this->templateName;
46
    }
47
48
    /**
49
     * {@inheritdoc}
50
     */
51 8
    public function setTemplateName($templateName)
52
    {
53 8
        $this->templateName = $templateName;
54 8
    }
55
56
    /**
57
     * {@inheritdoc}
58
     */
59 8
    public function getArticlesTemplateName()
60
    {
61 8
        return $this->articlesTemplateName;
62
    }
63
64
    /**
65
     * {@inheritdoc}
66
     */
67 6
    public function setArticlesTemplateName($articlesTemplateName)
68
    {
69 6
        $this->articlesTemplateName = $articlesTemplateName;
70 6
    }
71
72
    /**
73
     * {@inheritdoc}
74
     */
75 18
    public function getType()
76
    {
77 18
        return $this->type;
78
    }
79
80
    /**
81
     * {@inheritdoc}
82
     */
83 31
    public function setType($type)
84
    {
85 31
        $this->type = $type;
86 31
    }
87
88
    /**
89
     * @return int
90
     */
91 14
    public function getCacheTimeInSeconds()
92
    {
93 14
        return $this->cacheTimeInSeconds;
94
    }
95
96
    /**
97
     * @param int $cacheTimeInSeconds
98
     */
99 9
    public function setCacheTimeInSeconds($cacheTimeInSeconds)
100
    {
101 9
        $this->cacheTimeInSeconds = $cacheTimeInSeconds;
102 9
    }
103
}
104