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

TModificationFunctionMappingAssociationEndPropertyGroup   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 0
dl 0
loc 41
c 0
b 0
f 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getScalarProperty() 0 4 1
A setScalarProperty() 0 5 1
A isModificationFunctionMappingAssociationOK() 0 7 3
1
<?php
2
3
namespace AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\Groups;
4
5
use AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TModificationFunctionMappingScalarPropertyType;
6
7
trait TModificationFunctionMappingAssociationEndPropertyGroup
8
{
9
    //Grouping for property bindings in function mapping end property.
10
11
    /**
12
     * @property \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TModificationFunctionMappingScalarPropertyType
13
     * $scalarProperty
14
     */
15
    private $scalarProperty = null;
16
17
    /**
18
     * Gets as scalarProperty
19
     *
20
     * @return \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TModificationFunctionMappingScalarPropertyType
21
     */
22
    public function getScalarProperty()
23
    {
24
        return $this->scalarProperty;
25
    }
26
27
    /**
28
     * Sets a new scalarProperty
29
     *
30
     * @param \AlgoWeb\ODataMetadata\MetadataV3\mapping\cs\TModificationFunctionMappingScalarPropertyType
31
     * $scalarProperty
32
     * @return self
33
     */
34
    public function setScalarProperty(TModificationFunctionMappingScalarPropertyType $scalarProperty)
35
    {
36
        $this->scalarProperty = $scalarProperty;
37
        return $this;
38
    }
39
40
    public function isModificationFunctionMappingAssociationOK(&$msg = null)
41
    {
42
        if (null != $this->scalarProperty && !$this->scalarProperty->isOK($msg)) {
43
            return false;
44
        }
45
        return true;
46
    }
47
}