| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function __construct($config = []) |
||
| 15 | { |
||
| 16 | $this->pattern = $this->replaceParams( |
||
| 17 | '/^\+?({part1})? ?(?(?=\()(\({part2}\) ?{part3})|([. -]?({part2}[. -]*)?{part3}))$/', |
||
| 18 | [ |
||
| 19 | 'part1' => '\d{0,3}', |
||
| 20 | 'part2' => '\d{1,3}', |
||
| 21 | 'part3' => '((\d{3,5})[. -]?(\d{4})|(\d{2}[. -]?){4})', |
||
| 22 | ] |
||
| 23 | ); |
||
| 24 | |||
| 25 | parent::__construct($config); |
||
| 26 | |||
| 27 | $this->message = '{attribute} must be a valid phone number'; |
||
| 28 | } |
||
| 29 | |||
| 40 |