Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| BelgianPhoneNumber | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| fromCountry | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\CountryAndPhoneNumber; |
| 3 | |
| 4 | use Apie\Core\Attributes\Description; |
| 5 | use Apie\Core\Attributes\FakeMethod; |
| 6 | use Apie\CountryAndPhoneNumber\Concerns\CanCreateRandomPhoneNumber; |
| 7 | use PrinsFrank\Standards\Country\CountryAlpha2; |
| 8 | |
| 9 | #[FakeMethod('createRandomInstance')] |
| 10 | #[Description('A phone number valid in Belgium in national format or E164 format')] |
| 11 | class BelgianPhoneNumber extends PhoneNumber |
| 12 | { |
| 13 | use CanCreateRandomPhoneNumber; |
| 14 | |
| 15 | public static function fromCountry(): CountryAlpha2 |
| 16 | { |
| 17 | return CountryAlpha2::Belgium; |
| 18 | } |
| 19 | } |