Completed
Pull Request — develop (#552)
by
unknown
28:27 queued 23:25
created

Service::setRoles()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 3
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * Part of JSON definition
4
 */
5
namespace Graviton\GeneratorBundle\Definition\Schema;
6
7
/**
8
 * JSON definition "service"
9
 *
10
 * @author   List of contributors <https://github.com/libgraviton/graviton/graphs/contributors>
11
 * @license  http://opensource.org/licenses/gpl-license.php GNU Public License
12
 * @link     http://swisscom.ch
13
 */
14
class Service
15
{
16
    /**
17
     * @var bool
18
     */
19
    private $readOnly;
20
    /**
21
     * @var bool
22
     */
23
    private $versioning;
24
    /**
25
     * @var bool
26
     */
27
    private $recordOriginModifiable;
28
    /**
29
     * @var string
30
     */
31
    private $routerBase;
32
    /**
33
     * @var string
34
     */
35
    private $parent;
36
    /**
37
     * @var string
38
     */
39
    private $baseController;
40
    /**
41
     * @var string[]
42
     */
43
    private $roles = [];
44
    /**
45
     * @var int
46
     */
47
    private $fixtureOrder;
48
    /**
49
     * @var array[]
50
     */
51
    private $fixtures = [];
52
    /**
53
     * @var string
54
     */
55
    private $collectionName;
56
57
    /**
58
     * @return string
59
     */
60
    public function getParent()
61
    {
62
        return $this->parent;
63
    }
64
65
    /**
66
     * @param string $parent Parent service ID
67
     * @return $this
68
     */
69
    public function setParent($parent)
70
    {
71
        $this->parent = $parent;
72
        return $this;
73
    }
74
75
    /**
76
     * @return string
77
     */
78 4
    public function getBaseController()
79
    {
80 4
        return $this->baseController;
81
    }
82
83
    /**
84
     * @param string $baseController Base controller class
85
     * @return $this
86
     */
87
    public function setBaseController($baseController)
88
    {
89
        $this->baseController = $baseController;
90
        return $this;
91
    }
92
93
    /**
94
     * @return bool
95
     */
96 4
    public function getReadOnly()
0 ignored issues
show
Coding Style introduced by
function getReadOnly() does not seem to conform to the naming convention (^(?:is|has|should|may|supports)).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
97
    {
98 4
        return $this->readOnly;
99
    }
100
101
    /**
102
     * @param bool $readOnly Is readOnly service
103
     * @return $this
104
     */
105
    public function setReadOnly($readOnly)
106
    {
107
        $this->readOnly = $readOnly;
108
        return $this;
109
    }
110
111
    /**
112
     * @return bool
113
     */
114 22
    public function getVersioning()
0 ignored issues
show
Coding Style introduced by
function getVersioning() does not seem to conform to the naming convention (^(?:is|has|should|may|supports)).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
115
    {
116 22
        return is_null($this->versioning) ? false : $this->versioning;
117
    }
118
119
    /**
120
     * @param bool $versioning Is a versioned service
121
     * @return $this
122
     */
123
    public function setVersioning($versioning)
124
    {
125
        $this->versioning = $versioning;
126
        return $this;
127
    }
128
129
    /**
130
     * @return bool
131
     */
132
    public function getRecordOriginModifiable()
0 ignored issues
show
Coding Style introduced by
function getRecordOriginModifiable() does not seem to conform to the naming convention (^(?:is|has|should|may|supports)).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
133
    {
134
        return $this->recordOriginModifiable;
135
    }
136
137
    /**
138
     * @param bool $recordOriginModifiable Is origin record modifiable
139
     * @return $this
140
     */
141
    public function setRecordOriginModifiable($recordOriginModifiable)
142
    {
143
        $this->recordOriginModifiable = $recordOriginModifiable;
144
145
        return $this;
146
    }
147
148
    /**
149
     * @return string
150
     */
151 8
    public function getRouterBase()
152
    {
153 8
        return $this->routerBase;
154
    }
155
156
    /**
157
     * @param string $routerBase Base URL
158
     * @return $this
159
     */
160
    public function setRouterBase($routerBase)
161
    {
162
        $this->routerBase = $routerBase;
163
        return $this;
164
    }
165
166
    /**
167
     * @return string[]
168
     */
169 2
    public function getRoles()
170
    {
171 2
        return $this->roles;
172
    }
173
174
    /**
175
     * @param string[] $roles Service roles
176
     * @return $this
177
     */
178
    public function setRoles(array $roles)
179
    {
180
        $this->roles = $roles;
181
        return $this;
182
    }
183
184
    /**
185
     * @return int
186
     */
187 4
    public function getFixtureOrder()
188
    {
189 4
        return $this->fixtureOrder;
190
    }
191
192
    /**
193
     * @param int $fixtureOrder Fixture order
194
     * @return $this
195
     */
196
    public function setFixtureOrder($fixtureOrder)
197
    {
198
        $this->fixtureOrder = $fixtureOrder;
199
        return $this;
200
    }
201
202
    /**
203
     * @return array[]
204
     */
205 4
    public function getFixtures()
206
    {
207 4
        return $this->fixtures;
208
    }
209
210
    /**
211
     * @param array[] $fixtures Fixtures
212
     * @return $this
213
     */
214
    public function setFixtures(array $fixtures)
215
    {
216
        $this->fixtures = $fixtures;
217
        return $this;
218
    }
219
220
    /**
221
     * @return string
222
     */
223
    public function getCollectionName()
224
    {
225
        return $this->collectionName;
226
    }
227
228
    /**
229
     * @param string $collectionName name of colleciton
230
     * @return $this
231
     */
232
    public function setCollectionName($collectionName)
233
    {
234
        $this->collectionName = $collectionName;
235
        return $this;
236
    }
237
}
238