Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
OTP
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 getRegularExpression
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\OtpValueObjects;
3
4use Apie\Core\Attributes\ProvideIndex;
5use Apie\Core\ValueObjects\Interfaces\StringValueObjectInterface;
6use Apie\Core\ValueObjects\IsStringWithRegexValueObject;
7use Apie\OtpValueObjects\Concerns\NoIndexing;
8
9#[ProvideIndex('noIndexing')]
10class 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}