Completed
Pull Request — master (#108)
by Alex
04:49
created

TCommonPropertyAttributesTrait::getSetterAccess()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace AlgoWeb\ODataMetadata\MetadataV3\edm\Groups;
4
5
use AlgoWeb\ODataMetadata\CodeGeneration\AccessTypeTraits;
6
use AlgoWeb\ODataMetadata\IsOKTraits\IsOKToolboxTrait;
7
use AlgoWeb\ODataMetadata\MetadataV3\edm\IsOKTraits\TCollationFacetTrait;
8
use AlgoWeb\ODataMetadata\MetadataV3\edm\IsOKTraits\TConcurrencyModeTrait;
9
use AlgoWeb\ODataMetadata\MetadataV3\edm\IsOKTraits\TIsFixedLengthFacetTrait;
10
use AlgoWeb\ODataMetadata\MetadataV3\edm\IsOKTraits\TIsUnicodeFacetTrait;
11
use AlgoWeb\ODataMetadata\MetadataV3\edm\IsOKTraits\TMaxLengthFacetTrait;
12
use AlgoWeb\ODataMetadata\MetadataV3\edm\IsOKTraits\TPrecisionFacetTrait;
13
use AlgoWeb\ODataMetadata\MetadataV3\edm\IsOKTraits\TPropertyTypeTrait;
14
use AlgoWeb\ODataMetadata\MetadataV3\edm\IsOKTraits\TScaleFacetTrait;
15
use AlgoWeb\ODataMetadata\MetadataV3\edm\IsOKTraits\TSimpleIdentifierTrait;
16
use AlgoWeb\ODataMetadata\MetadataV3\edm\IsOKTraits\TSridFacetTrait;
17
18
trait TCommonPropertyAttributesTrait
19
{
20
    use TSimpleIdentifierTrait, TMaxLengthFacetTrait, TIsFixedLengthFacetTrait, TPrecisionFacetTrait, TScaleFacetTrait,
21
        TIsUnicodeFacetTrait, TCollationFacetTrait, TSridFacetTrait, TConcurrencyModeTrait, AccessTypeTraits,
22
        IsOKToolboxTrait, TPropertyTypeTrait {
23
            TMaxLengthFacetTrait::normaliseString insteadof TPrecisionFacetTrait, TScaleFacetTrait, TSridFacetTrait;
24
            TMaxLengthFacetTrait::preserveString insteadof TPrecisionFacetTrait, TScaleFacetTrait, TSridFacetTrait;
25
            TMaxLengthFacetTrait::replaceString insteadof TPrecisionFacetTrait, TScaleFacetTrait, TSridFacetTrait;
26
            TMaxLengthFacetTrait::collapseString insteadof TPrecisionFacetTrait, TScaleFacetTrait, TSridFacetTrait;
27
            TMaxLengthFacetTrait::token insteadof TPrecisionFacetTrait, TScaleFacetTrait, TSridFacetTrait;
28
            TMaxLengthFacetTrait::string insteadof TPrecisionFacetTrait, TScaleFacetTrait, TSridFacetTrait;
29
            TMaxLengthFacetTrait::integer insteadof TPrecisionFacetTrait, TScaleFacetTrait, TSridFacetTrait;
30
            TMaxLengthFacetTrait::nonNegativeInteger insteadof TPrecisionFacetTrait, TScaleFacetTrait, TSridFacetTrait;
31
            TMaxLengthFacetTrait::decimal insteadof TPrecisionFacetTrait, TScaleFacetTrait, TSridFacetTrait;
32
            TMaxLengthFacetTrait::double insteadof TPrecisionFacetTrait, TScaleFacetTrait, TSridFacetTrait;
33
            TMaxLengthFacetTrait::dateTime insteadof TPrecisionFacetTrait, TScaleFacetTrait, TSridFacetTrait;
34
            TMaxLengthFacetTrait::hexBinary insteadof TPrecisionFacetTrait, TScaleFacetTrait, TSridFacetTrait;
35
            TSimpleIdentifierTrait::isNCName insteadof TPrecisionFacetTrait, TScaleFacetTrait, TSridFacetTrait,
36
                TMaxLengthFacetTrait, TPropertyTypeTrait;
37
            TSimpleIdentifierTrait::matchesRegexPattern insteadof TPrecisionFacetTrait, TScaleFacetTrait,
38
                TSridFacetTrait, TMaxLengthFacetTrait, TPropertyTypeTrait;
39
            TSimpleIdentifierTrait::isName insteadof TPrecisionFacetTrait, TScaleFacetTrait, TSridFacetTrait,
40
                TMaxLengthFacetTrait, TPropertyTypeTrait;
41
    }
42
43
    /**
44
     * @property string $name
45
     */
46
    private $name = null;
47
48
    /**
49
     * @property string $type
50
     */
51
    private $type = null;
52
53
    /**
54
     * @property boolean $nullable
55
     */
56
    private $nullable = true;
57
58
    /**
59
     * @property string $defaultValue
60
     */
61
    private $defaultValue = null;
62
63
    /**
64
     * @property string $maxLength
65
     */
66
    private $maxLength = null;
67
68
    /**
69
     * @property boolean $fixedLength
70
     */
71
    private $fixedLength = null;
72
73
    /**
74
     * @property integer $precision
75
     */
76
    private $precision = null;
77
78
    /**
79
     * @property integer $scale
80
     */
81
    private $scale = null;
82
83
    /**
84
     * @property boolean $unicode
85
     */
86
    private $unicode = null;
87
88
    /**
89
     * @property string $collation
90
     */
91
    private $collation = null;
92
93
    /**
94
     * @property string $sRID
95
     */
96
    private $sRID = null;
97
98
    /**
99
     * @property string $concurrencyMode
100
     */
101
    private $concurrencyMode = null;
102
103
    /**
104
     * @property string $setterAccess
105
     */
106
    private $setterAccess = null;
107
108
    /**
109
     * @property string $getterAccess
110
     */
111
    private $getterAccess = null;
112
113
    /**
114
     * Gets as name
115
     *
116
     * @return string
117
     */
118
    public function getName()
119
    {
120
        return $this->name;
121
    }
122
123
    /**
124
     * Sets a new name
125
     *
126
     * @param string $name
127
     * @return self
128
     */
129
    public function setName($name)
130
    {
131
        $msg = null;
0 ignored issues
show
Unused Code introduced by
$msg is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
132
        if (!$this->isTSimpleIdentifierValid($name)) {
133
            $msg = "Name must be a valid TSimpleIdentifier";
134
            throw new \InvalidArgumentException($msg);
135
        }
136
        $this->name = $name;
137
        return $this;
138
    }
139
140
    /**
141
     * Gets as type
142
     *
143
     * @return string
144
     */
145
    public function getType()
146
    {
147
        return $this->type;
148
    }
149
150
    /**
151
     * Sets a new type
152
     *
153
     * @param string $type
154
     * @return self
155
     */
156
    public function setType($type)
157
    {
158
        $msg = null;
0 ignored issues
show
Unused Code introduced by
$msg is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
159
        if (!$this->isTPropertyTypeValid($type)) {
160
            $msg = "Type must be a valid TPropertyType";
161
            throw new \InvalidArgumentException($msg);
162
        }
163
        $this->type = $type;
164
        return $this;
165
    }
166
167
    /**
168
     * Gets as nullable
169
     *
170
     * @return boolean
171
     */
172
    public function getNullable()
173
    {
174
        return $this->nullable;
175
    }
176
177
    /**
178
     * Sets a new nullable
179
     *
180
     * @param boolean $nullable
181
     * @return self
182
     */
183
    public function setNullable($nullable)
184
    {
185
        $this->nullable = boolval($nullable);
186
        return $this;
187
    }
188
189
    /**
190
     * Gets as defaultValue
191
     *
192
     * @return string
193
     */
194
    public function getDefaultValue()
195
    {
196
        return $this->defaultValue;
197
    }
198
199
    /**
200
     * Sets a new defaultValue
201
     *
202
     * @param string $defaultValue
203
     * @return self
204
     */
205
    public function setDefaultValue($defaultValue)
206
    {
207
        if (is_numeric($defaultValue)) {
208
            $defaultValue = strval($defaultValue);
209
        }
210
        if (null !== $defaultValue && !is_string($defaultValue)) {
211
            $msg = "Default value must be resolvable to a string";
212
            throw new \InvalidArgumentException($msg);
213
        }
214
        $this->defaultValue = $defaultValue;
215
        return $this;
216
    }
217
218
    /**
219
     * Gets as maxLength
220
     *
221
     * @return string
222
     */
223
    public function getMaxLength()
224
    {
225
        return $this->maxLength;
226
    }
227
228
    /**
229
     * Sets a new maxLength
230
     *
231
     * @param string $maxLength
232
     * @return self
233
     */
234 View Code Duplication
    public function setMaxLength($maxLength)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
235
    {
236
        $msg = null;
0 ignored issues
show
Unused Code introduced by
$msg is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
237
        if (null != $maxLength && !$this->isTMaxLengthFacetValid($maxLength)) {
238
            $msg = "Max length must be a valid TMaxLengthFacet";
239
            throw new \InvalidArgumentException($msg);
240
        }
241
        $this->maxLength = $maxLength;
242
        return $this;
243
    }
244
245
    /**
246
     * Gets as fixedLength
247
     *
248
     * @return boolean
249
     */
250
    public function getFixedLength()
251
    {
252
        return $this->fixedLength;
253
    }
254
255
    /**
256
     * Sets a new fixedLength
257
     *
258
     * @param boolean $fixedLength
259
     * @return self
260
     */
261
    public function setFixedLength($fixedLength)
262
    {
263
        $this->fixedLength = boolval($fixedLength);
264
        return $this;
265
    }
266
267
    /**
268
     * Gets as precision
269
     *
270
     * @return integer
271
     */
272
    public function getPrecision()
273
    {
274
        return $this->precision;
275
    }
276
277
    /**
278
     * Sets a new precision
279
     *
280
     * @param integer $precision
281
     * @return self
282
     */
283 View Code Duplication
    public function setPrecision($precision)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
284
    {
285
        $msg = null;
0 ignored issues
show
Unused Code introduced by
$msg is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
286
        if (null != $precision && !$this->isTPrecisionFacetValid($precision)) {
287
            $msg = "Precision must be a valid TPrecisionFacet";
288
            throw new \InvalidArgumentException($msg);
289
        }
290
        $this->precision = $precision;
291
        return $this;
292
    }
293
294
    /**
295
     * Gets as scale
296
     *
297
     * @return integer
298
     */
299
    public function getScale()
300
    {
301
        return $this->scale;
302
    }
303
304
    /**
305
     * Sets a new scale
306
     *
307
     * @param integer $scale
308
     * @return self
309
     */
310 View Code Duplication
    public function setScale($scale)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
311
    {
312
        $msg = null;
0 ignored issues
show
Unused Code introduced by
$msg is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
313
        if (null != $scale && !$this->isTScaleFacetValid($scale)) {
314
            $msg = "Scale must be a valid TScaleFacet";
315
            throw new \InvalidArgumentException($msg);
316
        }
317
        $this->scale = $scale;
318
        return $this;
319
    }
320
321
    /**
322
     * Gets as unicode
323
     *
324
     * @return boolean
325
     */
326
    public function getUnicode()
327
    {
328
        return $this->unicode;
329
    }
330
331
    /**
332
     * Sets a new unicode
333
     *
334
     * @param boolean $unicode
335
     * @return self
336
     */
337 View Code Duplication
    public function setUnicode($unicode)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
338
    {
339
        $msg = null;
0 ignored issues
show
Unused Code introduced by
$msg is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
340
        if (null != $unicode && !$this->isTIsUnicodeFacetTraitValid($unicode)) {
341
            $msg = "Unicode must be a valid TUnicodeFacet";
342
            throw new \InvalidArgumentException($msg);
343
        }
344
        $this->unicode = boolval($unicode);
345
        return $this;
346
    }
347
348
    /**
349
     * Gets as collation
350
     *
351
     * @return string
352
     */
353
    public function getCollation()
354
    {
355
        return $this->collation;
356
    }
357
358
    /**
359
     * Sets a new collation
360
     *
361
     * @param string $collation
362
     * @return self
363
     */
364
    public function setCollation($collation)
365
    {
366
        $this->collation = $collation;
367
        return $this;
368
    }
369
370
    /**
371
     * Gets as sRID
372
     *
373
     * @return string
374
     */
375
    public function getSRID()
376
    {
377
        return $this->sRID;
378
    }
379
380
    /**
381
     * Sets a new sRID
382
     *
383
     * @param string $sRID
384
     * @return self
385
     */
386 View Code Duplication
    public function setSRID($sRID)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
387
    {
388
        $msg = null;
0 ignored issues
show
Unused Code introduced by
$msg is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
389
        if (null != $sRID && !$this->isTSridFacetValid($sRID)) {
390
            $msg = "SRID must be a valid TSridFacet";
391
            throw new \InvalidArgumentException($msg);
392
        }
393
        $this->sRID = $sRID;
394
        return $this;
395
    }
396
397
    /**
398
     * Gets as concurrencyMode
399
     *
400
     * @return string
401
     */
402
    public function getConcurrencyMode()
403
    {
404
        return $this->concurrencyMode;
405
    }
406
407
    /**
408
     * Sets a new concurrencyMode
409
     *
410
     * @param string $concurrencyMode
411
     * @return self
412
     */
413
    public function setConcurrencyMode($concurrencyMode)
414
    {
415
        $msg = null;
0 ignored issues
show
Unused Code introduced by
$msg is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
416
        if (null != $concurrencyMode && !$this->isTConcurrencyModeValid($concurrencyMode)) {
417
            $msg = "ConcurrencyMode must be a valid TConcurrencyMode";
418
            throw new \InvalidArgumentException($msg);
419
        }
420
        $this->concurrencyMode = $concurrencyMode;
421
        return $this;
422
    }
423
424
    /**
425
     * Gets as setterAccess
426
     *
427
     * @return string
428
     */
429
    public function getSetterAccess()
430
    {
431
        return $this->setterAccess;
432
    }
433
434
    /**
435
     * Sets a new setterAccess
436
     *
437
     * @param string $setterAccess
438
     * @return self
439
     */
440 View Code Duplication
    public function setSetterAccess($setterAccess)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
441
    {
442
        $msg = null;
0 ignored issues
show
Unused Code introduced by
$msg is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
443
        if (null != $setterAccess && !$this->isTAccessOk($setterAccess)) {
444
            $msg = "Setter access must be a valid TAccess";
445
            throw new \InvalidArgumentException($msg);
446
        }
447
        $this->setterAccess = $setterAccess;
448
        return $this;
449
    }
450
451
    /**
452
     * Gets as getterAccess
453
     *
454
     * @return string
455
     */
456
    public function getGetterAccess()
457
    {
458
        return $this->getterAccess;
459
    }
460
461
    /**
462
     * Sets a new getterAccess
463
     *
464
     * @param string $getterAccess
465
     * @return self
466
     */
467 View Code Duplication
    public function setGetterAccess($getterAccess)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
468
    {
469
        $msg = null;
0 ignored issues
show
Unused Code introduced by
$msg is not used, you could remove the assignment.

This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.

$myVar = 'Value';
$higher = false;

if (rand(1, 6) > 3) {
    $higher = true;
} else {
    $higher = false;
}

Both the $myVar assignment in line 1 and the $higher assignment in line 2 are dead. The first because $myVar is never used and the second because $higher is always overwritten for every possible time line.

Loading history...
470
        if (null != $getterAccess && !$this->isTAccessOk($getterAccess)) {
471
            $msg = "Getter access must be a valid TAccess";
472
            throw new \InvalidArgumentException($msg);
473
        }
474
        $this->getterAccess = $getterAccess;
475
        return $this;
476
    }
477
478
    public function isTCommonPropertyAttributesValid(&$msg = null)
479
    {
480 View Code Duplication
        if (!$this->isTSimpleIdentifierValid($this->name)) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
481
            $msg = "Name must be a valid TSimpleIdentifier: " . get_class($this);
482
            return false;
483
        }
484
        if (!$this->isTPropertyTypeValid($this->type)) {
485
            $msg = "Type must be a valid TPropertyType: " . get_class($this);
486
            return false;
487
        }
488 View Code Duplication
        if (null != $this->nullable && $this->nullable !== boolval($this->nullable)) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
489
            $msg = "Nullable must be boolean: " . get_class($this);
490
            return false;
491
        }
492 View Code Duplication
        if (null != $this->defaultValue && !is_string($this->defaultValue)) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
493
            $msg = "Default value must be a string: " . get_class($this);
494
            return false;
495
        }
496 View Code Duplication
        if (null != $this->maxLength && !$this->isTMaxLengthFacetValid($this->maxLength)) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
497
            $msg = "Max length must be a valid TMaxLengthFacet: " . get_class($this);
498
            return false;
499
        }
500 View Code Duplication
        if (null != $this->fixedLength && !$this->isTIsFixedLengthFacetTraitValid($this->fixedLength)) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
501
            $msg = "Max length must be a valid TFixedLengthFacet: " . get_class($this);
502
            return false;
503
        }
504 View Code Duplication
        if (null != $this->precision && !$this->isTPrecisionFacetValid($this->precision)) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
505
            $msg = "Precision must be a valid TPrecisionFacet: " . get_class($this);
506
            return false;
507
        }
508 View Code Duplication
        if (null != $this->scale && !$this->isTScaleFacetValid($this->scale)) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
509
            $msg = "Scale must be a valid TScaleFacet: " . get_class($this);
510
            return false;
511
        }
512 View Code Duplication
        if (null != $this->unicode && !$this->isTIsUnicodeFacetTraitValid($this->unicode)) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
513
            $msg = "Unicode must be a valid TUnicodeFacet: " . get_class($this);
514
            return false;
515
        }
516 View Code Duplication
        if (null != $this->collation && !$this->isTCollationFacetValid($this->collation)) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
517
            $msg = "Collation must be a valid TCollationFacet: " . get_class($this);
518
            return false;
519
        }
520 View Code Duplication
        if (null != $this->sRID && !$this->isTSridFacetValid($this->sRID)) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
521
            $msg = "SRID must be a valid TSridFacet: " . get_class($this);
522
            return false;
523
        }
524
        if (null != $this->concurrencyMode && !$this->isTConcurrencyModeValid($this->concurrencyMode)) {
525
            $msg = "ConcurrencyMode must be a valid TConcurrencyMode: " . get_class($this);
526
            return false;
527
        }
528 View Code Duplication
        if (null != $this->setterAccess && !$this->isTAccessOk($this->setterAccess)) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
529
            $msg = "Setter access must be a valid TAccess: " . get_class($this);
530
            return false;
531
        }
532 View Code Duplication
        if (null != $this->getterAccess && !$this->isTAccessOk($this->getterAccess)) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
533
            $msg = "Getter access must be a valid TAccess: " . get_class($this);
534
            return false;
535
        }
536
537
        return true;
538
    }
539
}
540