GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

AbstractPropertyDefinition   A
last analyzed

Complexity

Total Complexity 35

Size/Duplication

Total Lines 368
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 94.32%

Importance

Changes 0
Metric Value
wmc 35
lcom 1
cbo 1
dl 0
loc 368
ccs 83
cts 88
cp 0.9432
rs 9.6
c 0
b 0
f 0

35 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getId() 0 4 1
A setId() 0 4 1
A getLocalName() 0 4 1
A setLocalName() 0 4 1
A getLocalNamespace() 0 4 1
A setLocalNamespace() 0 4 1
A getQueryName() 0 4 1
A setQueryName() 0 4 1
A getDisplayName() 0 4 1
A setDisplayName() 0 4 1
A getDescription() 0 4 1
A setDescription() 0 4 1
A getPropertyType() 0 4 1
A setPropertyType() 0 4 1
A getCardinality() 0 4 1
A setCardinality() 0 4 1
A getChoice() 0 4 1
A setChoice() 0 4 1
A getChoices() 0 4 1
A setChoices() 0 4 1
A getDefaultValue() 0 4 1
A setDefaultValue() 0 4 1
A getUpdatability() 0 4 1
A setUpdatability() 0 4 1
A isInherited() 0 4 1
A setIsInherited() 0 4 1
A isQueryable() 0 4 1
A setIsQueryable() 0 4 1
A isOrderable() 0 4 1
A setIsOrderable() 0 4 1
A isRequired() 0 4 1
A setIsRequired() 0 4 1
A isOpenChoice() 0 4 1
A setIsOpenChoice() 0 4 1
1
<?php
2
namespace Dkd\PhpCmis\DataObjects;
3
4
/*
5
 * This file is part of php-cmis-client.
6
 *
7
 * (c) Sascha Egerer <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
use Dkd\PhpCmis\Definitions\ChoiceInterface;
14
use Dkd\PhpCmis\Definitions\MutablePropertyDefinitionInterface;
15
use Dkd\PhpCmis\Enum\Cardinality;
16
use Dkd\PhpCmis\Enum\PropertyType;
17
use Dkd\PhpCmis\Enum\Updatability;
18
19
/**
20
 * Abstract property definition data implementation.
21
 */
22
abstract class AbstractPropertyDefinition extends AbstractExtensionData implements MutablePropertyDefinitionInterface
23
{
24
    /**
25
     * @var string
26
     */
27
    protected $id;
28
29
    /**
30
     * @var string
31
     */
32
    protected $localName;
33
34
    /**
35
     * @var string
36
     */
37
    protected $localNamespace;
38
39
    /**
40
     * @var string
41
     */
42
    protected $queryName;
43
44
    /**
45
     * @var string
46
     */
47
    protected $displayName;
48
49
    /**
50
     * @var string
51
     */
52
    protected $description;
53
54
    /**
55
     * @var PropertyType
56
     */
57
    protected $propertyType;
58
59
    /**
60
     * @var Cardinality
61
     */
62
    protected $cardinality;
63
64
    /**
65
     * @var ChoiceInterface[]
66
     */
67
    protected $choices = [];
68
69
    /**
70
     * @var array
71
     */
72
    protected $defaultValue = [];
73
74
    /**
75
     * @var Updatability
76
     */
77
    protected $updatability;
78
79
    /**
80
     * @var boolean
81
     */
82
    protected $isInherited = false;
83
84
    /**
85
     * @var boolean
86
     */
87
    protected $isQueryable = false;
88
89
    /**
90
     * @var boolean
91
     */
92
    protected $isOrderable = false;
93
94
    /**
95
     * @var boolean
96
     */
97
    protected $isRequired = false;
98
99
    /**
100
     * @var boolean
101
     */
102
    protected $isOpenChoice = false;
103
104
    /**
105
     * @param string $id
106
     */
107 226
    public function __construct($id)
108
    {
109 226
        $this->setId($id);
110 226
    }
111
112
    /**
113
     * @return string
114
     */
115 17
    public function getId()
116
    {
117 17
        return $this->id;
118
    }
119
120
    /**
121
     * @param string $id
122
     */
123 226
    public function setId($id)
124
    {
125 226
        $this->id = $this->castValueToSimpleType('string', $id, true);
126 226
    }
127
128
    /**
129
     * @return string
130
     */
131 7
    public function getLocalName()
132
    {
133 7
        return $this->localName;
134
    }
135
136
    /**
137
     * @param string $localName
138
     */
139 22
    public function setLocalName($localName)
140
    {
141 22
        $this->localName = $this->castValueToSimpleType('string', $localName, true);
142 22
    }
143
144
    /**
145
     * @return string
146
     */
147 7
    public function getLocalNamespace()
148
    {
149 7
        return $this->localNamespace;
150
    }
151
152
    /**
153
     * @param string $localNamespace
154
     */
155 22
    public function setLocalNamespace($localNamespace)
156
    {
157 22
        $this->localNamespace = $this->castValueToSimpleType('string', $localNamespace, true);
158 22
    }
159
160
    /**
161
     * @return string
162
     */
163 16
    public function getQueryName()
164
    {
165 16
        return $this->queryName;
166
    }
167
168
    /**
169
     * @param string $queryName
170
     */
171 22
    public function setQueryName($queryName)
172
    {
173 22
        $this->queryName = $this->castValueToSimpleType('string', $queryName, true);
174 22
    }
175
176
    /**
177
     * @return string
178
     */
179 7
    public function getDisplayName()
180
    {
181 7
        return $this->displayName;
182
    }
183
184
    /**
185
     * @param string $displayName
186
     */
187 22
    public function setDisplayName($displayName)
188
    {
189 22
        $this->displayName = $this->castValueToSimpleType('string', $displayName, true);
190 22
    }
191
192
    /**
193
     * @return string
194
     */
195 7
    public function getDescription()
196
    {
197 7
        return $this->description;
198
    }
199
200
    /**
201
     * @param string $description
202
     */
203 22
    public function setDescription($description)
204
    {
205 22
        $this->description = $this->castValueToSimpleType('string', $description, true);
206 22
    }
207
208
    /**
209
     * @return PropertyType
210
     */
211 1
    public function getPropertyType()
212
    {
213 1
        return $this->propertyType;
214
    }
215
216
    /**
217
     * @param PropertyType $propertyType
218
     */
219 10
    public function setPropertyType(PropertyType $propertyType)
220
    {
221 10
        $this->propertyType = $propertyType;
222 10
    }
223
224
    /**
225
     * @return Cardinality
226
     */
227 1
    public function getCardinality()
228
    {
229 1
        return $this->cardinality;
230
    }
231
232
    /**
233
     * @param Cardinality $cardinality
234
     */
235 10
    public function setCardinality(Cardinality $cardinality)
236
    {
237 10
        $this->cardinality = $cardinality;
238 10
    }
239
240
    /**
241
     * COMPATIBILITY: required by CMIS auto-property mapping; the "choices" property
242
     * is sent in responses as "choice" (singular). PHP API allows properl plural name.
243
     *
244
     * @return ChoiceInterface[]
245
     */
246
    public function getChoice()
247
    {
248
        return $this->choices;
249
    }
250
251
    /**
252
     * COMPATIBILITY: required by CMIS auto-property mapping; the "choices" property
253
     * is sent in responses as "choice" (singular). PHP API allows properl plural name.
254
     *
255
     * @param ChoiceInterface[] $choices
256
     */
257
    public function setChoice(array $choices)
258
    {
259
        $this->choices = $choices;
260
    }
261
262
    /**
263
     * @return ChoiceInterface[]
264
     */
265 1
    public function getChoices()
266
    {
267 1
        return $this->choices;
268
    }
269
270
    /**
271
     * @param ChoiceInterface[] $choices
272
     */
273 2
    public function setChoices(array $choices)
274
    {
275 2
        $this->choices = $choices;
276 2
    }
277
278
    /**
279
     * @return array
280
     */
281 1
    public function getDefaultValue()
282
    {
283 1
        return $this->defaultValue;
284
    }
285
286
    /**
287
     * @param array $defaultValue
288
     */
289 2
    public function setDefaultValue(array $defaultValue)
290
    {
291 2
        $this->defaultValue = $defaultValue;
292 2
    }
293
294
    /**
295
     * @return Updatability
296
     */
297 1
    public function getUpdatability()
298
    {
299 1
        return $this->updatability;
300
    }
301
302
    /**
303
     * @param Updatability $updatability
304
     */
305 10
    public function setUpdatability(Updatability $updatability)
306
    {
307 10
        $this->updatability = $updatability;
308 10
    }
309
310
    /**
311
     * @return boolean
312
     */
313 8
    public function isInherited()
314
    {
315 8
        return $this->isInherited;
316
    }
317
318
    /**
319
     * @param boolean $isInherited
320
     */
321 24
    public function setIsInherited($isInherited)
322
    {
323 24
        $this->isInherited = $this->castValueToSimpleType('boolean', $isInherited);
324 24
    }
325
326
    /**
327
     * @return boolean
328
     */
329 8
    public function isQueryable()
330
    {
331 8
        return $this->isQueryable;
332
    }
333
334
    /**
335
     * @param boolean $isQueryable
336
     */
337 24
    public function setIsQueryable($isQueryable)
338
    {
339 24
        $this->isQueryable = $this->castValueToSimpleType('boolean', $isQueryable);
340 24
    }
341
342
    /**
343
     * @return boolean
344
     */
345 8
    public function isOrderable()
346
    {
347 8
        return $this->isOrderable;
348
    }
349
350
    /**
351
     * @param boolean $isOrderable
352
     */
353 24
    public function setIsOrderable($isOrderable)
354
    {
355 24
        $this->isOrderable = $this->castValueToSimpleType('boolean', $isOrderable);
356 24
    }
357
358
    /**
359
     * @return boolean
360
     */
361 8
    public function isRequired()
362
    {
363 8
        return $this->isRequired;
364
    }
365
366
    /**
367
     * @param boolean $isRequired
368
     */
369 24
    public function setIsRequired($isRequired)
370
    {
371 24
        $this->isRequired = $this->castValueToSimpleType('boolean', $isRequired);
372 24
    }
373
374
    /**
375
     * @return boolean
376
     */
377 8
    public function isOpenChoice()
378
    {
379 8
        return $this->isOpenChoice;
380
    }
381
382
    /**
383
     * @param boolean $isOpenChoice
384
     */
385 24
    public function setIsOpenChoice($isOpenChoice)
386
    {
387 24
        $this->isOpenChoice = $this->castValueToSimpleType('boolean', $isOpenChoice);
388 24
    }
389
}
390