Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| PhpDateIntervalString | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| getRegularExpression | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | namespace Apie\Core\ValueObjects; |
| 3 | |
| 4 | use Apie\Core\ValueObjects\Interfaces\HasRegexValueObjectInterface; |
| 5 | |
| 6 | class PhpDateIntervalString implements HasRegexValueObjectInterface |
| 7 | { |
| 8 | use IsStringWithRegexValueObject; |
| 9 | |
| 10 | public static function getRegularExpression(): string |
| 11 | { |
| 12 | return '/^P((\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?|(\d+W))$/'; |
| 13 | } |
| 14 | } |