| Total Complexity | 5 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class PhoneNumber extends \Overtrue\EasySms\PhoneNumber |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * +8618888888888. |
||
| 9 | * |
||
| 10 | * @return string |
||
| 11 | */ |
||
| 12 | 12 | public function getUniversalNumber() |
|
| 13 | { |
||
| 14 | 12 | return $this->getPrefixedNumber('+'); |
|
| 15 | } |
||
| 16 | |||
| 17 | /** |
||
| 18 | * 008618888888888. |
||
| 19 | * |
||
| 20 | * @return string |
||
| 21 | */ |
||
| 22 | 2 | public function getZeroPrefixedNumber() |
|
| 23 | { |
||
| 24 | 2 | return $this->getPrefixedNumber('00'); |
|
| 25 | } |
||
| 26 | |||
| 27 | 12 | public function getPrefixedNumber($prefix) |
|
| 28 | { |
||
| 29 | 12 | return $this->getPrefixedIDDCode($prefix) . $this->number; |
|
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param string $prefix |
||
| 34 | * |
||
| 35 | * @return string|null |
||
| 36 | */ |
||
| 37 | 12 | public function getPrefixedIDDCode($prefix) |
|
| 40 | } |
||
| 41 | } |
||
| 42 |