Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| OTP | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| getRegularExpression | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\OtpValueObjects; |
| 3 | |
| 4 | use Apie\Core\Attributes\ProvideIndex; |
| 5 | use Apie\Core\ValueObjects\Interfaces\StringValueObjectInterface; |
| 6 | use Apie\Core\ValueObjects\IsStringWithRegexValueObject; |
| 7 | use Apie\OtpValueObjects\Concerns\NoIndexing; |
| 8 | |
| 9 | #[ProvideIndex('noIndexing')] |
| 10 | class OTP implements StringValueObjectInterface |
| 11 | { |
| 12 | use IsStringWithRegexValueObject; |
| 13 | use NoIndexing; |
| 14 | |
| 15 | public static function getRegularExpression(): string |
| 16 | { |
| 17 | return '/^[\d]{6,8}$/'; |
| 18 | } |
| 19 | } |