| Total Complexity | 6 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class RegexBasedMatcher implements MatcherAPIInterface |
||
| 11 | { |
||
| 12 | 674 | public static function create() |
|
| 15 | } |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Returns whether the given national number (a string containing only decimal digits) matches |
||
| 19 | * the national number pattern defined in the given {@code PhoneNumberDesc} message. |
||
| 20 | * |
||
| 21 | * @param string $number |
||
| 22 | * @param PhoneNumberDesc $numberDesc |
||
| 23 | * @param boolean $allowPrefixMatch |
||
| 24 | * @return boolean |
||
| 25 | */ |
||
| 26 | 2912 | public function matchNationalNumber($number, PhoneNumberDesc $numberDesc, $allowPrefixMatch) |
|
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param string $number |
||
| 42 | * @param string $pattern |
||
| 43 | * @param $allowPrefixMatch |
||
| 44 | * @return bool |
||
| 45 | */ |
||
| 46 | 2912 | private function match($number, $pattern, $allowPrefixMatch) |
|
| 57 |