Passed
Push — master ( 43888e...80ce50 )
by Christopher
02:32 queued 30s
created

xsToken   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Barnso
5
 * Date: 30/06/2017
6
 * Time: 8:16 PM
7
 */
8
9
namespace AlgoWeb\xsdTypes;
10
11
/**
12
 * The type xsd:token represents a character string that may contain any Unicode character allowed by XML. Certain characters, namely the "less than" symbol (<) and the ampersand (&), must be escaped (using the entities &lt; and &amp;, respectively) when used in strings in XML instances.
13
 *
14
 * The name xsd:token may be slightly confusing because it implies that there may be only one token with no whitespace. In fact, there can be whitespace in a token value. The xsd:token type has a whiteSpace facet of collapse, which means that the processor replaces each carriage return, line feed, and tab by a single space. After this replacement, each group of consecutive spaces is collapsed into one space character, and all leading and trailing spaces are removed. This processing is equivalent to the processing of non-CDATA attribute values in XML 1.0.
15
 *
16
 * @package AlgoWeb\xsdTypes
17
 */
18
class xsToken extends xsNormalizedString
19
{
20
    /**
21
     * Construct
22
     *
23
     * @param mixed $value
24
     */
25
    public function __construct($value)
26
    {
27
        parent::__construct($value);
28
        $this->setWhiteSpaceFacet("collapse");
29
    }
30
}
31