Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| FileExtension | |
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\Export\ValueObjects; |
| 3 | |
| 4 | use Apie\Core\ValueObjects\Interfaces\HasRegexValueObjectInterface; |
| 5 | use Apie\Core\ValueObjects\Interfaces\StringValueObjectInterface; |
| 6 | use Apie\Core\ValueObjects\IsStringWithRegexValueObject; |
| 7 | |
| 8 | class FileExtension implements StringValueObjectInterface, HasRegexValueObjectInterface |
| 9 | { |
| 10 | use IsStringWithRegexValueObject; |
| 11 | |
| 12 | public static function getRegularExpression(): string |
| 13 | { |
| 14 | return '/^[a-zA-Z0-9]{1,10}(\.[a-zA-Z0-9]{1,10})*$/'; |
| 15 | } |
| 16 | } |