Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
CanadianPhoneNumber | |
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 Canada in national format or E164 format')] |
11 | class CanadianPhoneNumber extends PhoneNumber |
12 | { |
13 | use CanCreateRandomPhoneNumber; |
14 | |
15 | public static function fromCountry(): CountryAlpha2 |
16 | { |
17 | return CountryAlpha2::Canada; |
18 | } |
19 | } |