Passed
Push — master ( d898ef...46a72e )
by Christopher
02:06 queued 27s
created

xsNOTATION::isOK()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 5
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace AlgoWeb\xsdTypes;
4
5
/**
6
 * The type xsd:NOTATION represents a reference to a notation. A notation is a method of interpreting XML and
7
 * non-XML content. For example, if an element in an XML document contains binary graphics data in JPEG format,
8
 * a notation can be declared to indicate that this is JPEG data. An attribute of type xsd:NOTATION can then be used
9
 * to indicate which notation applies to the element's content. A xsd:NOTATION value must be a QName.
10
 *
11
 * xsd:NOTATION is the only built-in type that cannot be the type of attributes or elements. Instead,
12
 * you must define a new type that restricts xsd:NOTATION, applying one or more enumeration facets.
13
 * Each of these enumeration values must match the name of a declared notation.
14
 * @package AlgoWeb\xsdTypes
15
 */
16 View Code Duplication
abstract class xsNOTATION extends xsAnySimpleType
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
17
{
18
    use LengthTrait;
19
20
    /**
21
     * Construct
22
     *
23
     * @param string $value
24
     */
25
    public function __construct($value)
26
    {
27
        parent::__construct($value);
28
        $this->setWhiteSpaceFacet("collapse");
29
    }
30
31
    protected function isOK()
32
    {
33
        $this->checkMaxLength($this->__value);
34
        $this->checkMinLength($this->__value);
35
    }
36
}
37