Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| DutchPhoneNumber | |
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\ExampleValue; |
| 6 | use Apie\Core\Attributes\FakeMethod; |
| 7 | use Apie\CountryAndPhoneNumber\Concerns\CanCreateRandomPhoneNumber; |
| 8 | use PrinsFrank\Standards\Country\CountryAlpha2; |
| 9 | |
| 10 | #[FakeMethod('createRandomInstance')] |
| 11 | #[Description('A phone number valid in the Netherlands in national format or E164 format')] |
| 12 | #[ExampleValue('+31612345678')] |
| 13 | #[ExampleValue('0612345678')] |
| 14 | class DutchPhoneNumber extends PhoneNumber |
| 15 | { |
| 16 | use CanCreateRandomPhoneNumber; |
| 17 | |
| 18 | public static function fromCountry(): CountryAlpha2 |
| 19 | { |
| 20 | return CountryAlpha2::Netherlands; |
| 21 | } |
| 22 | } |