Passed
Push — master ( 189420...0898fe )
by Alex
04:14
created

TEntitySetReferenceExpressionType::setEntitySet()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace AlgoWeb\ODataMetadata\MetadataV3\edm;
4
5
use AlgoWeb\ODataMetadata\IsOK;
6
use AlgoWeb\ODataMetadata\IsOKTraits\IsOKToolboxTrait;
7
use AlgoWeb\ODataMetadata\MetadataV3\edm\IsOKTraits\TQualifiedNameTrait;
8
9
/**
10
 * Class representing TEntitySetReferenceExpressionType
11
 *
12
 *
13
 * XSD Type: TEntitySetReferenceExpression
14
 */
15
class TEntitySetReferenceExpressionType extends IsOK
16
{
17
    use IsOKToolboxTrait, TQualifiedNameTrait;
18
    /**
19
     * @property string $entitySet
20
     */
21
    private $entitySet = null;
22
23
    /**
24
     * Gets as entitySet
25
     *
26
     * @return string
27
     */
28
    public function getEntitySet()
29
    {
30
        return $this->entitySet;
31
    }
32
33
    /**
34
     * Sets a new entitySet
35
     *
36
     * @param string $entitySet
37
     * @return self
38
     */
39
    public function setEntitySet($entitySet)
40
    {
41
        $this->entitySet = $entitySet;
42
        return $this;
43
    }
44
    
45
    public function isOK(&$msg = null)
46
    {
47
        if (!$this->isTQualifiedNameValid($this->entitySet)) {
48
            $msg = "Entity set must be a valid TQualifiedName";
49
            return false;
50
        }
51
        return true;
52
    }
53
}
54