Total Complexity | 9 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 84.62% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class PhoneFormatter |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * @param $phone |
||
13 | * @return string |
||
14 | */ |
||
15 | public static function run($phone) |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * @param $phone |
||
22 | * @param array $options |
||
23 | * @return string |
||
24 | */ |
||
25 | 3 | public static function a($phone, array $options = [], $countCodeLength = 1) |
|
26 | { |
||
27 | 3 | return Html::a(self::format($phone, $countCodeLength), "tel:+{$phone}", $options); |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * @param $phone |
||
32 | * @return string |
||
33 | */ |
||
34 | 7 | public static function format($phone, $countCodeLength = 1) |
|
48 | } |
||
49 | } |