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

TRuntimeConceptualModelsType::getSchema()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
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\edmx;
4
5
use AlgoWeb\ODataMetadata\IsOK;
6
use AlgoWeb\ODataMetadata\MetadataV3\edm\Schema;
7
8
/**
9
 * Class representing TRuntimeConceptualModelsType
10
 *
11
 *
12
 * XSD Type: TRuntimeConceptualModels
13
 */
14 View Code Duplication
class TRuntimeConceptualModelsType extends IsOK
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
15
{
16
17
    /**
18
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\Schema $schema
19
     */
20
    private $schema = null;
21
22
    /**
23
     * Gets as schema
24
     *
25
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\Schema
26
     */
27
    public function getSchema()
28
    {
29
        return $this->schema;
30
    }
31
32
    /**
33
     * Sets a new schema
34
     *
35
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\Schema $schema
36
     * @return self
37
     */
38
    public function setSchema(Schema $schema)
39
    {
40
        $this->schema = $schema;
41
        return $this;
42
    }
43
44
    public function isOK(&$msg = null)
45
    {
46
        if (null != $this->schema && !$this->schema->isOK($msg)) {
47
            return false;
48
        }
49
50
        return true;
51
    }
52
}
53