Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
60.00% |
3 / 5 |
|
60.00% |
3 / 5 |
CRAP | |
0.00% |
0 / 1 |
SnowflakeWithPrefixExample | |
60.00% |
3 / 5 |
|
60.00% |
3 / 5 |
6.60 | |
0.00% |
0 / 1 |
getSeparator | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getField | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getPassword | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getPrefix | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | namespace Apie\Fixtures\ValueObjects; |
3 | |
4 | use Apie\Core\ValueObjects\DatabaseText; |
5 | use Apie\Core\ValueObjects\SnowflakeIdentifier; |
6 | |
7 | class SnowflakeWithPrefixExample extends SnowflakeIdentifier |
8 | { |
9 | protected static function getSeparator(): string |
10 | { |
11 | return '-'; |
12 | } |
13 | |
14 | public function __construct(private ?DatabaseText $field, private Password $password) |
15 | { |
16 | $this->toNative(); |
17 | } |
18 | |
19 | public function getField(): ?DatabaseText |
20 | { |
21 | return $this->field; |
22 | } |
23 | |
24 | public function getPassword(): Password |
25 | { |
26 | return $this->password; |
27 | } |
28 | |
29 | public static function getPrefix(): string |
30 | { |
31 | return 'snowflake'; |
32 | } |
33 | } |