Passed
Push — master ( 0b74cf...f6aee1 )
by Christopher
01:37
created

xsInteger   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Barnso
5
 * Date: 4/07/2017
6
 * Time: 12:47 AM
7
 */
8
9
namespace AlgoWeb\xsdTypes;
10
11
/**
12
 * The type xsd:integer represents an arbitrarily large integer, from which twelve other built-in integer types are
13
 * derived (directly or indirectly). An xsd:integer is a sequence of digits, optionally preceded by a + or -
14
 * sign. Leading zeros are permitted, but decimal points are not
15
 * @package AlgoWeb\xsdTypes
16
 */
17
class xsInteger extends xsDecimal
18
{
19
    /**
20
     * Construct
21
     *
22
     * @param mixed $value
23
     */
24
    public function __construct($value)
25
    {
26
        parent::__construct($value);
27
        $this->setFractionDigits(0);
28
        $this->setPatternFacet("[\-+]?[0-9]+");
29
    }
30
}