Completed
Push — feature/issue-168 ( f01c3b...77e7a9 )
by Mikaël
23:44
created

MinInclusiveRule   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 17
rs 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A symbol() 0 3 1
A name() 0 3 1
1
<?php
2
3
namespace WsdlToPhp\PackageGenerator\File\Validation;
4
5
/**
6
 * Class MinInclusiveRule
7
 * @link https://www.w3.org/TR/xmlschema-2/#rf-minInclusive
8
 * @link https://www.w3.org/TR/xmlschema-2/#d0e11648 for Examples:
9
 *  dateTime	            duration	        result
10
 *  2000-01-12T12:13:14Z	P1Y3M5DT7H10M3.3S	2001-04-17T19:23:17.3Z
11
 *  2000-01	                -P3M                1999-10
12
 *  2000-01-12	            PT33H	            2000-01-13
13
 * Validation Rule: minInclusive Valid
14
 * A value in an ·ordered· ·value space· is facet-valid with respect to ·minInclusive· if:
15
 *  - 1 if the ·numeric· property in {fundamental facets} is true, then the value ·must· be numerically greater than or equal to {value};
16
 *  - 2 if the ·numeric· property in {fundamental facets} is false (i.e., {base type definition} is one of the date and time related datatypes), then the value ·must· be chronologically greater than or equal to {value};
17
 */
18
class MinInclusiveRule extends AbstractBoundRule
19
{
20
21
    /**
22
     * @return string
23
     */
24 48
    public function name()
25
    {
26 48
        return 'minInclusive';
27
    }
28
29
    /**
30
     * @return string
31
     */
32 48
    public static function symbol()
33
    {
34 48
        return self::SYMBOL_MIN_INCLUSIVE;
35
    }
36
}
37