| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 70 | public function clientValidateAttribute($model, $attribute, $view) |
||
| 71 | { |
||
| 72 | $js = parent::clientValidateAttribute($model, $attribute, $view); |
||
| 73 | if (!$this->enableIdn) { |
||
| 74 | return $js; |
||
| 75 | } |
||
| 76 | |||
| 77 | PunycodeAsset::register($view); |
||
| 78 | |||
| 79 | return "value = punycode.toASCII(value); $js"; |
||
| 80 | } |
||
| 81 | |||
| 83 |