Ssr::setApp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: polidog
5
 * Date: 2017/02/19.
6
 */
7
8
namespace Polidog\SsrBundle\Annotations;
9
10
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationAnnotation;
11
12
/**
13
 * @Annotation
14
 */
15
final class Ssr extends ConfigurationAnnotation
16
{
17
    /**
18
     * @var string entry point
19
     */
20
    private $app;
21
22
    /**
23
     * @var array
24
     */
25
    private $state = ['*'];
26
27
    /**
28
     * @var array
29
     */
30
    private $metas = [];
31
32
    private $cache = false;
33
34
    /**
35
     * @return string
36
     */
37 1
    public function getApp()
38
    {
39 1
        return $this->app;
40
    }
41
42
    /**
43
     * @param string $app
44
     *
45
     * @return $this
46
     */
47 1
    public function setApp($app)
48
    {
49 1
        $this->app = $app;
50
51 1
        return $this;
52
    }
53
54
    /**
55
     * @return array
56
     */
57 1
    public function getState()
58
    {
59 1
        return $this->state;
60
    }
61
62
    /**
63
     * @param array $state
64
     *
65
     * @return $this
66
     */
67 1
    public function setState($state)
68
    {
69 1
        $this->state = $state;
70
71 1
        return $this;
72
    }
73
74
    /**
75
     * @return array
76
     */
77 1
    public function getMetas()
78
    {
79 1
        return $this->metas;
80
    }
81
82
    /**
83
     * @param array $metas
84
     *
85
     * @return $this
86
     */
87 1
    public function setMetas($metas)
88
    {
89 1
        $this->metas = $metas;
90
91 1
        return $this;
92
    }
93
94
    /**
95
     * @return bool
96
     */
97
    public function isCache(): bool
98
    {
99
        return $this->cache;
100
    }
101
102
    /**
103
     * @param bool $cache
104
     *
105
     * @return $this
106
     */
107
    public function setCache($cache)
108
    {
109
        $this->cache = $cache;
110
111
        return $this;
112
    }
113
114
    public function getAliasName()
115
    {
116
        return 'ssr';
117
    }
118
119
    public function allowArray()
120
    {
121
        return false;
122
    }
123
}
124