Passed
Push — master ( feaee9...2b3e4e )
by Alex
04:28
created

TCollectionTypeType::setFixedLength()   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\edm;
4
5
use AlgoWeb\ODataMetadata\IsOK;
6
use AlgoWeb\ODataMetadata\MetadataV3\edm\Groups\TFacetAttributesTrait;
7
8
/**
9
 * Class representing TCollectionTypeType
10
 *
11
 *
12
 * XSD Type: TCollectionType
13
 */
14
class TCollectionTypeType extends IsOK
15
{
16
    use TFacetAttributesTrait;
17
    /**
18
     * @property string $elementType
19
     */
20
    private $elementType = null;
21
22
    /**
23
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TCollectionTypeType $collectionType
24
     */
25
    private $collectionType = null;
26
27
    /**
28
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TReferenceTypeType $referenceType
29
     */
30
    private $referenceType = null;
31
32
    /**
33
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyType[] $rowType
34
     */
35
    private $rowType = null;
36
37
    /**
38
     * @property \AlgoWeb\ODataMetadata\MetadataV3\edm\TTypeRefType $typeRef
39
     */
40
    private $typeRef = null;
41
42
    /**
43
     * Gets as elementType
44
     *
45
     * @return string
46
     */
47
    public function getElementType()
48
    {
49
        return $this->elementType;
50
    }
51
52
    /**
53
     * Sets a new elementType
54
     *
55
     * @param string $elementType
56
     * @return self
57
     */
58
    public function setElementType($elementType)
59
    {
60
        $this->elementType = $elementType;
61
        return $this;
62
    }
63
64
    /**
65
     * Gets as collectionType
66
     *
67
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TCollectionTypeType
68
     */
69
    public function getCollectionType()
70
    {
71
        return $this->collectionType;
72
    }
73
74
    /**
75
     * Sets a new collectionType
76
     *
77
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TCollectionTypeType $collectionType
78
     * @return self
79
     */
80
    public function setCollectionType(TCollectionTypeType $collectionType)
81
    {
82
        $this->collectionType = $collectionType;
83
        return $this;
84
    }
85
86
    /**
87
     * Gets as referenceType
88
     *
89
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TReferenceTypeType
90
     */
91
    public function getReferenceType()
92
    {
93
        return $this->referenceType;
94
    }
95
96
    /**
97
     * Sets a new referenceType
98
     *
99
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TReferenceTypeType $referenceType
100
     * @return self
101
     */
102
    public function setReferenceType(TReferenceTypeType $referenceType)
103
    {
104
        $this->referenceType = $referenceType;
105
        return $this;
106
    }
107
108
    /**
109
     * Adds as property
110
     *
111
     * @return self
112
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyType $property
113
     */
114
    public function addToRowType(TPropertyType $property)
115
    {
116
        $this->rowType[] = $property;
117
        return $this;
118
    }
119
120
    /**
121
     * isset rowType
122
     *
123
     * @param scalar $index
124
     * @return boolean
125
     */
126
    public function issetRowType($index)
127
    {
128
        return isset($this->rowType[$index]);
129
    }
130
131
    /**
132
     * unset rowType
133
     *
134
     * @param scalar $index
135
     * @return void
136
     */
137
    public function unsetRowType($index)
138
    {
139
        unset($this->rowType[$index]);
140
    }
141
142
    /**
143
     * Gets as rowType
144
     *
145
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyType[]
146
     */
147
    public function getRowType()
148
    {
149
        return $this->rowType;
150
    }
151
152
    /**
153
     * Sets a new rowType
154
     *
155
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TPropertyType[] $rowType
156
     * @return self
157
     */
158
    public function setRowType(array $rowType)
159
    {
160
        $this->rowType = $rowType;
161
        return $this;
162
    }
163
164
    /**
165
     * Gets as typeRef
166
     *
167
     * @return \AlgoWeb\ODataMetadata\MetadataV3\edm\TTypeRefType
168
     */
169
    public function getTypeRef()
170
    {
171
        return $this->typeRef;
172
    }
173
174
    /**
175
     * Sets a new typeRef
176
     *
177
     * @param \AlgoWeb\ODataMetadata\MetadataV3\edm\TTypeRefType $typeRef
178
     * @return self
179
     */
180
    public function setTypeRef(TTypeRefType $typeRef)
181
    {
182
        $this->typeRef = $typeRef;
183
        return $this;
184
    }
185
186
    public function isOK(&$msg = null)
187
    {
188
        if (!$this->isTFacetAttributesTraitValid($msg)) {
189
            return false;
190
        }
191
        return true;
192
    }
193
}
194