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

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