Passed
Push — master ( 418524...2ac80a )
by Alex
03:43
created

TRuntimeMappingsType   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

3 Methods

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