Code Duplication    Length = 9-10 lines in 5 locations

src/MetadataV3/edm/Groups/TFacetAttributesTrait.php 1 location

@@ 142-151 (lines=10) @@
139
     * @param string $maxLength
140
     * @return self
141
     */
142
    public function setMaxLength($maxLength)
143
    {
144
        $msg = null;
145
        if (null != $maxLength && !$this->isTMaxLengthFacetValid($maxLength)) {
146
            $msg = "Max length must be a valid TMaxLengthFacet";
147
            throw new \InvalidArgumentException($msg);
148
        }
149
        $this->maxLength = $maxLength;
150
        return $this;
151
    }
152
153
    /**
154
     * Gets as fixedLength

src/MetadataV3/edm/Groups/TFunctionImportParameterAttributesTrait.php 1 location

@@ 169-178 (lines=10) @@
166
     * @param string $maxLength
167
     * @return self
168
     */
169
    public function setMaxLength($maxLength)
170
    {
171
        $msg = null;
172
        if (null != $maxLength && !$this->isTMaxLengthFacetValid($maxLength)) {
173
            $msg = "Max length must be a valid TMaxLengthFacet";
174
            throw new \InvalidArgumentException($msg);
175
        }
176
        $this->maxLength = $maxLength;
177
        return $this;
178
    }
179
180
    /**
181
     * Gets as precision

src/MetadataV3/edm/ssdl/TEntityPropertyType.php 1 location

@@ 206-214 (lines=9) @@
203
     * @param string $maxLength
204
     * @return self
205
     */
206
    public function setMaxLength($maxLength)
207
    {
208
        if (null != $maxLength && !(is_numeric($maxLength) && 0 < $maxLength)) {
209
            $msg = "Max length must be positive and numeric";
210
            throw new \InvalidArgumentException($msg);
211
        }
212
        $this->maxLength = $maxLength;
213
        return $this;
214
    }
215
216
    /**
217
     * Gets as fixedLength

src/MetadataV3/edm/ssdl/TPropertyType.php 1 location

@@ 201-210 (lines=10) @@
198
     * @param string $maxLength
199
     * @return self
200
     */
201
    public function setMaxLength($maxLength)
202
    {
203
        $msg = null;
204
        if (null != $maxLength && !(is_numeric($maxLength) && 0 <= $maxLength)) {
205
            $msg = "Max length must be numeric and non-negative";
206
            throw new \InvalidArgumentException($msg);
207
        }
208
        $this->maxLength = $maxLength;
209
        return $this;
210
    }
211
212
    /**
213
     * Gets as fixedLength

src/MetadataV3/edm/Groups/TCommonPropertyAttributesTrait.php 1 location

@@ 234-243 (lines=10) @@
231
     * @param string $maxLength
232
     * @return self
233
     */
234
    public function setMaxLength($maxLength)
235
    {
236
        $msg = null;
237
        if (null != $maxLength && !$this->isTMaxLengthFacetValid($maxLength)) {
238
            $msg = "Max length must be a valid TMaxLengthFacet";
239
            throw new \InvalidArgumentException($msg);
240
        }
241
        $this->maxLength = $maxLength;
242
        return $this;
243
    }
244
245
    /**
246
     * Gets as fixedLength