Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
7 / 7 |
|
100.00% |
7 / 7 |
CRAP | |
100.00% |
1 / 1 |
| Password | |
100.00% |
7 / 7 |
|
100.00% |
7 / 7 |
7 | |
100.00% |
1 / 1 |
| getMinLength | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getMaxLength | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getAllowedSpecialCharacters | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getMinSpecialCharacters | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getMinDigits | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getMinLowercase | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getMinUppercase | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\Fixtures\ValueObjects; |
| 3 | |
| 4 | use Apie\Core\ValueObjects\Interfaces\HasRegexValueObjectInterface; |
| 5 | use Apie\Core\ValueObjects\IsPasswordValueObject; |
| 6 | |
| 7 | class Password implements HasRegexValueObjectInterface |
| 8 | { |
| 9 | use IsPasswordValueObject; |
| 10 | |
| 11 | public static function getMinLength(): int |
| 12 | { |
| 13 | return 6; |
| 14 | } |
| 15 | |
| 16 | public static function getMaxLength(): int |
| 17 | { |
| 18 | return 42; |
| 19 | } |
| 20 | |
| 21 | public static function getAllowedSpecialCharacters(): string |
| 22 | { |
| 23 | return '!@#$%^&*-_+.'; |
| 24 | } |
| 25 | |
| 26 | public static function getMinSpecialCharacters(): int |
| 27 | { |
| 28 | return 1; |
| 29 | } |
| 30 | |
| 31 | public static function getMinDigits(): int |
| 32 | { |
| 33 | return 1; |
| 34 | } |
| 35 | |
| 36 | public static function getMinLowercase(): int |
| 37 | { |
| 38 | return 1; |
| 39 | } |
| 40 | |
| 41 | public static function getMinUppercase(): int |
| 42 | { |
| 43 | return 1; |
| 44 | } |
| 45 | } |