Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | public function passes($attribute, $value) |
||
22 | { |
||
23 | if (is_string($this->code)) { |
||
24 | $passes = (new CountryPhoneCallback($value, $this->code))->callPhoneValidator(); |
||
25 | return collect($passes)->some(fn ($passe) => $passe); |
||
|
|||
26 | } |
||
27 | return preg_match('/^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/', $value); |
||
28 | } |
||
40 |