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

TPropertyReferenceExpressionType   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 2
dl 0
loc 38
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getProperty() 0 4 1
A setProperty() 0 5 1
A isOK() 0 7 2
1
<?php
2
3
namespace AlgoWeb\ODataMetadata\MetadataV3\edm;
4
5
use AlgoWeb\ODataMetadata\IsOK;
6
use AlgoWeb\ODataMetadata\MetadataV3\edm\Groups\GExpressionTrait;
7
8
/**
9
 * Class representing TPropertyReferenceExpressionType
10
 *
11
 *
12
 * XSD Type: TPropertyReferenceExpression
13
 */
14
class TPropertyReferenceExpressionType extends IsOK
15
{
16
    use GExpressionTrait;
17
    /**
18
     * @property string $property
19
     */
20
    private $property = null;
21
22
    /**
23
     * Gets as property
24
     *
25
     * @return string
26
     */
27
    public function getProperty()
28
    {
29
        return $this->property;
30
    }
31
32
    /**
33
     * Sets a new property
34
     *
35
     * @param string $property
36
     * @return self
37
     */
38
    public function setProperty($property)
39
    {
40
        $this->property = $property;
41
        return $this;
42
    }
43
44
    public function isOK(&$msg = null)
45
    {
46
        if (!$this->isGExpressionValid($msg)) {
47
            return false;
48
        }
49
        return true;
50
    }
51
}
52