Completed
Push — master ( 6c2150...6c8a90 )
by Ryota
05:16
created

Ssr   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 105
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 10
lcom 0
cbo 1
dl 0
loc 105
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getApp() 0 4 1
A setApp() 0 5 1
A getState() 0 4 1
A setState() 0 5 1
A getMetas() 0 4 1
A setMetas() 0 5 1
A isCache() 0 4 1
A setCache() 0 5 1
A getAliasName() 0 4 1
A allowArray() 0 4 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
/**
14
 * @Annotation
15
 */
16
final class Ssr extends ConfigurationAnnotation
17
{
18
    /**
19
     * @var string entry point
20
     */
21
    private $app;
22
23
    /**
24
     * @var array
25
     */
26
    private $state = ['*'];
27
28
    /**
29
     * @var array
30
     */
31
    private $metas = [];
32
33
    private $cache = false;
34
35
    /**
36
     * @return string
37
     */
38
    public function getApp()
39
    {
40
        return $this->app;
41
    }
42
43
    /**
44
     * @param string $app
45
     * @return $this
46
     */
47
    public function setApp($app)
48
    {
49
        $this->app = $app;
50
        return $this;
51
    }
52
53
    /**
54
     * @return array
55
     */
56
    public function getState()
57
    {
58
        return $this->state;
59
    }
60
61
    /**
62
     * @param array $state
63
     * @return $this
64
     */
65
    public function setState($state)
66
    {
67
        $this->state = $state;
68
        return $this;
69
    }
70
71
    /**
72
     * @return array
73
     */
74
    public function getMetas()
75
    {
76
        return $this->metas;
77
    }
78
79
    /**
80
     * @param array $metas
81
     * @return $this
82
     */
83
    public function setMetas($metas)
84
    {
85
        $this->metas = $metas;
86
        return $this;
87
    }
88
89
    /**
90
     * @return bool
91
     */
92
    public function isCache(): bool
93
    {
94
        return $this->cache;
95
    }
96
97
    /**
98
     * @param bool $cache
99
     * @return $this
100
     */
101
    public function setCache($cache)
102
    {
103
        $this->cache = $cache;
104
        return $this;
105
    }
106
107
108
109
    public function getAliasName()
110
    {
111
        return 'ssr';
112
    }
113
114
    public function allowArray()
115
    {
116
        return false;
117
    }
118
119
120
}