| 1 | <?php |
||
| 23 | class Phone |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | private $value; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Constructor. |
||
| 32 | * |
||
| 33 | * @param string $value |
||
| 34 | * |
||
| 35 | * @throws InvalidPhoneNumberException |
||
| 36 | */ |
||
| 37 | 11 | public function __construct(string $value) |
|
| 48 | |||
| 49 | /** |
||
| 50 | * Get the value of phone |
||
| 51 | * |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | 4 | public function getValue(): string |
|
| 58 | |||
| 59 | /** |
||
| 60 | * Implement __toString |
||
| 61 | * |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | 3 | public function __toString(): string |
|
| 68 | } |
||
| 69 |