| Code Coverage | ||||||||||
| Lines | Functions and Methods | Classes and Traits | ||||||||
| Total |  | 100.00% | 9 / 9 |  | 100.00% | 1 / 1 | CRAP |  | 100.00% | 1 / 1 | 
| PhoneNumberAndCountryMismatch |  | 100.00% | 9 / 9 |  | 100.00% | 1 / 1 | 2 |  | 100.00% | 1 / 1 | 
| __construct |  | 100.00% | 9 / 9 |  | 100.00% | 1 / 1 | 2 | |||
| 1 | <?php | 
| 2 | namespace Apie\CountryAndPhoneNumber\Exceptions; | 
| 3 | |
| 4 | use Apie\Core\Exceptions\ApieException; | 
| 5 | use PrinsFrank\Standards\Country\CountryAlpha2; | 
| 6 | use Throwable; | 
| 7 | |
| 8 | class PhoneNumberAndCountryMismatch extends ApieException | 
| 9 | { | 
| 10 | public function __construct(CountryAlpha2 $country, ?CountryAlpha2 $phoneCountry, ?Throwable $previous = null) | 
| 11 | { | 
| 12 | parent::__construct( | 
| 13 | sprintf( | 
| 14 | 'Phone number and country are not from the same country. Country is "%s", phone number is "%s"', | 
| 15 | $country->value, | 
| 16 | $phoneCountry ? $phoneCountry->value : '(unknown)' | 
| 17 | ), | 
| 18 | 0, | 
| 19 | $previous | 
| 20 | ); | 
| 21 | } | 
| 22 | } |