1 | <?php |
||
10 | class AllowedRecipientsValidatorSanitiser |
||
11 | { |
||
12 | use ValidatesAttributes; |
||
13 | |||
14 | protected $libPhoneNumber; |
||
15 | |||
16 | 2 | public function __construct() |
|
20 | |||
21 | /** |
||
22 | * @param $attribute |
||
23 | * @param $value |
||
24 | * @param $parameters |
||
25 | * @param $validator |
||
26 | * @return bool |
||
27 | */ |
||
28 | 1 | public function validate($attribute, $value, $parameters, $validator): bool |
|
50 | |||
51 | /** |
||
52 | * Get formatted phone number in E.164 standard without (+). |
||
53 | * This method will return false if the number is not valid. |
||
54 | * |
||
55 | * @param string $phoneNumber |
||
56 | * |
||
57 | * @return mixed |
||
58 | */ |
||
59 | 1 | public function getFormattedNumber(string $phoneNumber) |
|
81 | |||
82 | /** |
||
83 | * Get phoneNumberObject. |
||
84 | * |
||
85 | * @param string $phoneNumber |
||
86 | * |
||
87 | * @return mixed |
||
88 | */ |
||
89 | 2 | protected function getPhoneNumberObject(string $phoneNumber) |
|
104 | |||
105 | /** |
||
106 | * @param string $phoneNumber |
||
107 | * @return string |
||
108 | */ |
||
109 | 2 | protected function sanitisePhoneNumber(string $phoneNumber): string |
|
115 | |||
116 | /** |
||
117 | * @param string $phoneNumber |
||
118 | * @return string |
||
119 | */ |
||
120 | 2 | protected function getDigits(string $phoneNumber): string |
|
124 | |||
125 | /** |
||
126 | * @param string $phoneNumber |
||
127 | * @return string |
||
128 | */ |
||
129 | 2 | protected function formatNumber(string $phoneNumber): string |
|
140 | } |
||
141 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.