Passed
Push — master ( 583371...613693 )
by Alex
03:44
created

TEndPropertyType::setName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Importance

Changes 0
Metric Value
dl 5
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace AlgoWeb\ODataMetadata\MetadataV3\mapping\cs;
4
5
/**
6
 * Class representing TEndPropertyType
7
 *
8
 *
9
 * XSD Type: TEndProperty
10
 */
11 View Code Duplication
class TEndPropertyType
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...
12
{
13
14
    /**
15
     * @property string $name
16
     */
17
    private $name = null;
18
19
    /**
20
     * @property \MetadataV3\mapping\cs\TScalarPropertyType[] $scalarProperty
21
     */
22
    private $scalarProperty = array(
23
        
24
    );
25
26
    /**
27
     * Gets as name
28
     *
29
     * @return string
30
     */
31
    public function getName()
32
    {
33
        return $this->name;
34
    }
35
36
    /**
37
     * Sets a new name
38
     *
39
     * @param string $name
40
     * @return self
41
     */
42
    public function setName($name)
43
    {
44
        $this->name = $name;
45
        return $this;
46
    }
47
48
    /**
49
     * Adds as scalarProperty
50
     *
51
     * @return self
52
     * @param \MetadataV3\mapping\cs\TScalarPropertyType $scalarProperty
53
     */
54
    public function addToScalarProperty(\MetadataV3\mapping\cs\TScalarPropertyType $scalarProperty)
55
    {
56
        $this->scalarProperty[] = $scalarProperty;
57
        return $this;
58
    }
59
60
    /**
61
     * isset scalarProperty
62
     *
63
     * @param scalar $index
64
     * @return boolean
65
     */
66
    public function issetScalarProperty($index)
67
    {
68
        return isset($this->scalarProperty[$index]);
69
    }
70
71
    /**
72
     * unset scalarProperty
73
     *
74
     * @param scalar $index
75
     * @return void
76
     */
77
    public function unsetScalarProperty($index)
78
    {
79
        unset($this->scalarProperty[$index]);
80
    }
81
82
    /**
83
     * Gets as scalarProperty
84
     *
85
     * @return \MetadataV3\mapping\cs\TScalarPropertyType[]
86
     */
87
    public function getScalarProperty()
88
    {
89
        return $this->scalarProperty;
90
    }
91
92
    /**
93
     * Sets a new scalarProperty
94
     *
95
     * @param \MetadataV3\mapping\cs\TScalarPropertyType[] $scalarProperty
96
     * @return self
97
     */
98
    public function setScalarProperty(array $scalarProperty)
99
    {
100
        $this->scalarProperty = $scalarProperty;
101
        return $this;
102
    }
103
}
104