Passed
Push — master ( feaee9...2b3e4e )
by Alex
04:28
created

TPropertyValueType::getProperty()   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;
4
5
use AlgoWeb\ODataMetadata\IsOK;
6
use AlgoWeb\ODataMetadata\MetadataV3\edm\Groups\GExpressionTrait;
7
use AlgoWeb\ODataMetadata\MetadataV3\edm\Groups\GInlineExpressionsTrait;
8
9
/**
10
 * Class representing TPropertyValueType
11
 *
12
 *
13
 * XSD Type: TPropertyValue
14
 */
15
class TPropertyValueType extends IsOK
16
{
17
    use GInlineExpressionsTrait, GExpressionTrait;
18
    /**
19
     * @property string $property
20
     */
21
    private $property = null;
22
23
    public function __construct()
24
    {
25
        $this->gExpressionMaximum = 1;
26
        $this->gExpressionMinimum = 1;
27
    }
28
    
29
    /**
30
     * Gets as property
31
     *
32
     * @return string
33
     */
34
    public function getProperty()
35
    {
36
        return $this->property;
37
    }
38
39
    /**
40
     * Sets a new property
41
     *
42
     * @param string $property
43
     * @return self
44
     */
45
    public function setProperty($property)
46
    {
47
        $this->property = $property;
48
        return $this;
49
    }
50
    
51
    public function isOK(&$msg = null)
52
    {
53
        if (!$this->isGInlineExpressionsValid($msg)) {
54
            return false;
55
        }
56
        if (!$this->isGExpressionValid($msg)) {
57
            return false;
58
        }
59
60
        return true;
61
    }
62
}
63