Passed
Push — master ( 4f7966...46bec3 )
by Alex
04:29
created

TModificationFunctionMappingComplexPropertyPropertyGroup   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 9
lcom 1
cbo 1
dl 0
loc 72
c 0
b 0
f 0
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getScalarProperty() 0 4 1
A setScalarProperty() 0 5 1
A getComplexProperty() 0 4 1
A setComplexProperty() 0 5 1
B isComplexPropertyPropertyGroupOK() 0 10 5
1
<?php
2
3
namespace AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\Groups;
4
5
use AlgoWeb\ODataMetadata\IsOKTraits\IsOKToolboxTrait;
6
use AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TModificationFunctionMappingComplexPropertyType;
7
use AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TModificationFunctionMappingScalarPropertyType;
8
9
trait TModificationFunctionMappingComplexPropertyPropertyGroup
10
{
11
    use IsOKToolboxTrait;
12
    /**
13
     * @property \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TModificationFunctionMappingScalarPropertyType
14
     * $scalarProperty
15
     */
16
    private $scalarProperty = null;
17
18
    /**
19
     * @property \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TModificationFunctionMappingComplexPropertyType
20
     * $complexProperty
21
     */
22
    private $complexProperty = null;
23
24
    /**
25
     * Gets as scalarProperty
26
     *
27
     * @return \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TModificationFunctionMappingScalarPropertyType
28
     */
29
    public function getScalarProperty()
30
    {
31
        return $this->scalarProperty;
32
    }
33
34
    /**
35
     * Sets a new scalarProperty
36
     *
37
     * @param \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TModificationFunctionMappingScalarPropertyType
38
     * $scalarProperty
39
     * @return self
40
     */
41
    public function setScalarProperty(TModificationFunctionMappingScalarPropertyType $scalarProperty)
42
    {
43
        $this->scalarProperty = $scalarProperty;
44
        return $this;
45
    }
46
47
    /**
48
     * Gets as complexProperty
49
     *
50
     * @return \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TModificationFunctionMappingComplexPropertyType
51
     */
52
    public function getComplexProperty()
53
    {
54
        return $this->complexProperty;
55
    }
56
57
    /**
58
     * Sets a new complexProperty
59
     *
60
     * @param \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TModificationFunctionMappingComplexPropertyType
61
     * $complexProperty
62
     * @return self
63
     */
64
    public function setComplexProperty(TModificationFunctionMappingComplexPropertyType $complexProperty)
65
    {
66
        $this->complexProperty = $complexProperty;
67
        return $this;
68
    }
69
70
    public function isComplexPropertyPropertyGroupOK(&$msg = null)
71
    {
72
        if (null != $this->scalarProperty && !$this->scalarProperty->isOK($msg)) {
73
            return false;
74
        }
75
        if (null != $this->complexProperty && !$this->complexProperty->isOK($msg)) {
76
            return false;
77
        }
78
        return true;
79
    }
80
}