Code Duplication    Length = 9-10 lines in 12 locations

src/MetadataV3/edmx/TEntityTypeShapeType.php 2 locations

@@ 145-153 (lines=9) @@
142
     * @param float $width
143
     * @return self
144
     */
145
    public function setWidth($width)
146
    {
147
        if (null != $width && (!is_numeric($width) || 0 >= $width)) {
148
            $msg = "Width value must be numeric and positive";
149
            throw new \InvalidArgumentException($msg);
150
        }
151
        $this->width = $width;
152
        return $this;
153
    }
154
155
    /**
156
     * Gets as height
@@ 171-179 (lines=9) @@
168
     * @param float $height
169
     * @return self
170
     */
171
    public function setHeight($height)
172
    {
173
        if (null != $height && (!is_numeric($height) || 0 >= $height)) {
174
            $msg = "Height value must be numeric and positive";
175
            throw new \InvalidArgumentException($msg);
176
        }
177
        $this->height = $height;
178
        return $this;
179
    }
180
181
    /**
182
     * Gets as isExpanded

src/MetadataV3/edm/ssdl/TEntityPropertyType.php 2 locations

@@ 253-261 (lines=9) @@
250
     * @param integer $precision
251
     * @return self
252
     */
253
    public function setPrecision($precision)
254
    {
255
        if (null != $precision && !(is_numeric($precision) && 0 < $precision)) {
256
            $msg = "Precision must be positive and numeric";
257
            throw new \InvalidArgumentException($msg);
258
        }
259
        $this->precision = $precision;
260
        return $this;
261
    }
262
263
    /**
264
     * Gets as scale
@@ 279-287 (lines=9) @@
276
     * @param integer $scale
277
     * @return self
278
     */
279
    public function setScale($scale)
280
    {
281
        if (null != $scale && !(is_numeric($scale) && 0 < $scale)) {
282
            $msg = "Scale must be positive and numeric";
283
            throw new \InvalidArgumentException($msg);
284
        }
285
        $this->scale = $scale;
286
        return $this;
287
    }
288
289
    /**
290
     * Gets as unicode

src/MetadataV3/edm/ssdl/TPropertyType.php 2 locations

@@ 249-258 (lines=10) @@
246
     * @param integer $precision
247
     * @return self
248
     */
249
    public function setPrecision($precision)
250
    {
251
        $msg = null;
252
        if (null != $precision && !(is_numeric($precision) && 0 <= $precision)) {
253
            $msg = "Precision must be numeric and non-negative";
254
            throw new \InvalidArgumentException($msg);
255
        }
256
        $this->precision = $precision;
257
        return $this;
258
    }
259
260
    /**
261
     * Gets as scale
@@ 276-285 (lines=10) @@
273
     * @param integer $scale
274
     * @return self
275
     */
276
    public function setScale($scale)
277
    {
278
        $msg = null;
279
        if (null != $scale && !(is_numeric($scale) && 0 <= $scale)) {
280
            $msg = "Scale must be numeric and non-negative";
281
            throw new \InvalidArgumentException($msg);
282
        }
283
        $this->scale = $scale;
284
        return $this;
285
    }
286
287
    /**
288
     * Gets as unicode

src/MetadataV3/edm/Groups/TCommonPropertyAttributesTrait.php 2 locations

@@ 262-271 (lines=10) @@
259
     * @param integer $precision
260
     * @return self
261
     */
262
    public function setPrecision($precision)
263
    {
264
        $msg = null;
265
        if (null != $precision && !$this->isTPrecisionFacetValid($precision)) {
266
            $msg = "Precision must be a valid TPrecisionFacet";
267
            throw new \InvalidArgumentException($msg);
268
        }
269
        $this->precision = $precision;
270
        return $this;
271
    }
272
273
    /**
274
     * Gets as scale
@@ 289-298 (lines=10) @@
286
     * @param integer $scale
287
     * @return self
288
     */
289
    public function setScale($scale)
290
    {
291
        $msg = null;
292
        if (null != $scale && !$this->isTScaleFacetValid($scale)) {
293
            $msg = "Scale must be a valid TScaleFacet";
294
            throw new \InvalidArgumentException($msg);
295
        }
296
        $this->scale = $scale;
297
        return $this;
298
    }
299
300
    /**
301
     * Gets as unicode

src/MetadataV3/edm/Groups/TFacetAttributesTrait.php 2 locations

@@ 182-191 (lines=10) @@
179
     * @param integer $precision
180
     * @return self
181
     */
182
    public function setPrecision($precision)
183
    {
184
        $msg = null;
185
        if (null != $precision && !$this->isTPrecisionFacetValid($precision)) {
186
            $msg = "Precision must be a valid TPrecisionFacet";
187
            throw new \InvalidArgumentException($msg);
188
        }
189
        $this->precision = $precision;
190
        return $this;
191
    }
192
193
    /**
194
     * Gets as scale
@@ 209-218 (lines=10) @@
206
     * @param integer $scale
207
     * @return self
208
     */
209
    public function setScale($scale)
210
    {
211
        $msg = null;
212
        if (null != $scale && !$this->isTScaleFacetValid($scale)) {
213
            $msg = "Scale must be a valid TScaleFacet";
214
            throw new \InvalidArgumentException($msg);
215
        }
216
        $this->scale = $scale;
217
        return $this;
218
    }
219
220
    /**
221
     * Gets as unicode

src/MetadataV3/edm/Groups/TFunctionImportParameterAttributesTrait.php 2 locations

@@ 177-186 (lines=10) @@
174
     * @param integer $precision
175
     * @return self
176
     */
177
    public function setPrecision($precision)
178
    {
179
        $msg = null;
180
        if (null != $precision && !$this->isTPrecisionFacetValid($precision)) {
181
            $msg = "Precision must be a valid TPrecisionFacet";
182
            throw new \InvalidArgumentException($msg);
183
        }
184
        $this->precision = $precision;
185
        return $this;
186
    }
187
188
    /**
189
     * Gets as scale
@@ 204-213 (lines=10) @@
201
     * @param integer $scale
202
     * @return self
203
     */
204
    public function setScale($scale)
205
    {
206
        $msg = null;
207
        if (null != $scale && !$this->isTScaleFacetValid($scale)) {
208
            $msg = "Scale must be a valid TScaleFacet";
209
            throw new \InvalidArgumentException($msg);
210
        }
211
        $this->scale = $scale;
212
        return $this;
213
    }
214
215
    /**
216
     * Gets as sRID