Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| MaxInclusiveRule | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| name | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| symbol | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace WsdlToPhp\PackageGenerator\File\Validation; |
| 6 | |
| 7 | /** |
| 8 | * @see https://www.w3.org/TR/xmlschema-2/#rf-maxInclusive |
| 9 | * @see https://www.w3.org/TR/xmlschema-2/#d0e11648 for Examples: |
| 10 | * dateTime duration result |
| 11 | * 2000-01-12T12:13:14Z P1Y3M5DT7H10M3.3S 2001-04-17T19:23:17.3Z |
| 12 | * 2000-01 -P3M 1999-10 |
| 13 | * 2000-01-12 PT33H 2000-01-13 |
| 14 | * Validation Rule: maxInclusive Valid |
| 15 | * A value in an ·ordered· ·value space· is facet-valid with respect to ·maxInclusive·, determined as follows: |
| 16 | * - 1 if the ·numeric· property in {fundamental facets} is true, then the value ·must· be numerically less than or equal to {value}; |
| 17 | * - 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 less than or equal to {value}; |
| 18 | */ |
| 19 | final class MaxInclusiveRule extends AbstractBoundRule |
| 20 | { |
| 21 | public function name(): string |
| 22 | { |
| 23 | return 'maxInclusive'; |
| 24 | } |
| 25 | |
| 26 | public function symbol(): string |
| 27 | { |
| 28 | return self::SYMBOL_MAX_INCLUSIVE; |
| 29 | } |
| 30 | } |