| Conditions | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | function addMessage(messages, message, value) { |
||
| 8 | function validatePhone(value, messages, options) { |
||
|
|
|||
| 9 | value = value.replace(/\D/g, ''); |
||
| 10 | |||
| 11 | if (isEmpty(value)) { |
||
| 12 | return; |
||
| 13 | } |
||
| 14 | |||
| 15 | if (value.length > 12 || value.length < 11) |
||
| 16 | addMessage(messages, "Телефонный номер должны быть длиною 11 или 12 цифр.", value); |
||
| 17 | |||
| 18 | |||
| 19 | } |
||
| 20 | |||
| 21 |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.