Total Complexity | 5 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class CountryPhoneCallback |
||
6 | { |
||
7 | /** |
||
8 | * Create a new phone validator instance. |
||
9 | * |
||
10 | * @param mixed $value The phone number to validate. |
||
11 | * @param string $code The country codes to validate against. String can be separated by comma |
||
12 | * @param string|null $attribute |
||
13 | */ |
||
14 | public function __construct(protected $value, protected string $code, $attribute = null) |
||
15 | { |
||
16 | } |
||
17 | |||
18 | |||
19 | |||
20 | protected function validateBJ(): bool |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * Call the phone validator method for each country code and return the results. |
||
27 | * |
||
28 | * @throws \BadMethodCallException if the validator method for a country code does not exist. |
||
29 | * |
||
30 | * @return array An array of validation results, where each key is a country code and the value is either `true` or `false`. |
||
31 | */ |
||
32 | public function callPhoneValidator(): array |
||
53 |