Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
25.00% |
1 / 4 |
|
25.00% |
1 / 4 |
CRAP | |
0.00% |
0 / 1 |
| LanguageExtension | |
25.00% |
1 / 4 |
|
25.00% |
1 / 4 |
10.75 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getSingleton | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getIdentifiers | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getSeparator | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | namespace Apie\IanaValueObjects\LanguageTag; |
| 3 | |
| 4 | use Apie\Core\Lists\IdentifierList; |
| 5 | use Apie\Core\ValueObjects\SingleLetter; |
| 6 | use Apie\Core\ValueObjects\SnowflakeIdentifier; |
| 7 | |
| 8 | final class LanguageExtension extends SnowflakeIdentifier |
| 9 | { |
| 10 | public function __construct( |
| 11 | private readonly SingleLetter $singleton, |
| 12 | private readonly IdentifierList $identifiers |
| 13 | ) { |
| 14 | } |
| 15 | |
| 16 | public function getSingleton(): SingleLetter |
| 17 | { |
| 18 | return $this->singleton; |
| 19 | } |
| 20 | |
| 21 | public function getIdentifiers(): IdentifierList |
| 22 | { |
| 23 | return $this->identifiers; |
| 24 | } |
| 25 | |
| 26 | public static function getSeparator(): string |
| 27 | { |
| 28 | return '-'; |
| 29 | } |
| 30 | } |